mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-02-15 18:30:30 +01:00
[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
This commit is contained in:
parent
a9f51c2973
commit
e1ded5b1e0
1 changed files with 5 additions and 5 deletions
|
|
@ -2539,6 +2539,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,
|
||||
|
|
@ -2547,11 +2552,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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue