diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2006-10-25 21:40:08 -0400 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2006-11-02 13:02:08 -0800 |
commit | b20171cf303cd4404fee31da77128a57c3ad4a8d (patch) | |
tree | a75f595e8ec59ce128f614bf02d0366ab3b64b84 | |
parent | cc8dd91ac2bdbd5d366ab29872f71a9a3a7a25a0 (diff) |
[PDF] Set CTM before path construction
The previous order is undefined according to the PDF spec. The resulting PDF
was being misrendered using OS X Preview viewer. This was reported in this
thread:
http://lists.freedesktop.org/archives/cairo/2006-October/008271.html
(cherry picked from e1ded5b1e042c8cefa7f136228d5a63a7bdf84b5 commit)
-rw-r--r-- | src/cairo-pdf-surface.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c index df43a5dc1..49d76a757 100644 --- a/src/cairo-pdf-surface.c +++ b/src/cairo-pdf-surface.c @@ -2506,6 +2506,11 @@ _cairo_pdf_surface_stroke (void *abstract_surface, info.output = surface->output; info.ctm_inverse = ctm_inverse; + _cairo_output_stream_printf (surface->output, + "q %f %f %f %f %f %f cm\r\n", + ctm->xx, ctm->yx, ctm->xy, ctm->yy, + ctm->x0, ctm->y0); + status = _cairo_path_fixed_interpret (path, CAIRO_DIRECTION_FORWARD, _cairo_pdf_path_move_to, @@ -2514,11 +2519,6 @@ _cairo_pdf_surface_stroke (void *abstract_surface, _cairo_pdf_path_close_path, &info); - _cairo_output_stream_printf (surface->output, - "q %f %f %f %f %f %f cm\r\n", - ctm->xx, ctm->yx, ctm->xy, ctm->yy, - ctm->x0, ctm->y0); - _cairo_output_stream_printf (surface->output, "S Q\r\n"); return status; |