diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2023-02-19 21:10:58 +1030 |
---|---|---|
committer | Adrian Johnson <ajohnson@redneon.com> | 2023-04-18 18:27:12 +0930 |
commit | b53b48116e610d61cdf630c24a11b59a18345e16 (patch) | |
tree | 3bc8f3410e795ce81c1408b9d7f3a217033d29ba /src/cairo-pdf-operators.c | |
parent | e7ed40a71dac04cb4c608b409b04577d01f08454 (diff) | |
download | cairo-b53b48116e610d61cdf630c24a11b59a18345e16.tar.gz |
Make cairo_tag_begin/end work correctly in groups
Fixes #508
Diffstat (limited to 'src/cairo-pdf-operators.c')
-rw-r--r-- | src/cairo-pdf-operators.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/cairo-pdf-operators.c b/src/cairo-pdf-operators.c index 328e893d7..176f45b48 100644 --- a/src/cairo-pdf-operators.c +++ b/src/cairo-pdf-operators.c @@ -1568,10 +1568,16 @@ _cairo_pdf_operators_tag_begin (cairo_pdf_operators_t *pdf_operators, return status; } - _cairo_output_stream_printf (pdf_operators->stream, - "/%s << /MCID %d >> BDC\n", - tag_name, - mcid); + if (mcid >= 0) { + _cairo_output_stream_printf (pdf_operators->stream, + "/%s << /MCID %d >> BDC\n", + tag_name, + mcid); + } else { + _cairo_output_stream_printf (pdf_operators->stream, + "/%s BMC\n", + tag_name); + } return _cairo_output_stream_get_status (pdf_operators->stream); } |