[cairo] Postscript backend
Michael Wimmer
mike.wimmer at web.de
Mon Oct 24 05:46:10 PDT 2005
Hi,
I've got some problems using the Postscript backend of cairo.
I guess it's a bug but it could just as well be my limited understanding
of cairo ...
So here's the problem:
The following code snippet should produce a line from the lower left corner
to the upper right corner of the picture:
------------------------------------------------------
cairo_surface_t *surface=cairo_ps_surface_create("test.ps",200,200);
cairo_t *cr=cairo_create(surface);
cairo_matrix_t matrix;
matrix.xx=1.0;
matrix.xy=0.0;
matrix.yx=0.0;
matrix.yy=-1.0;
matrix.x0=0.0;
matrix.y0=200;
cairo_set_matrix(cr,&matrix);
cairo_move_to(cr,0,0);
cairo_line_to(cr,200,200);
cairo_stroke(cr);
cairo_show_page(cr);
cairo_destroy(cr);
cairo_surface_destroy(surface);
----------------------------------------------------
it should actually be equivalent to
---------------------------------------------------
cairo_move_to(cr,0,200);
cairo_line_to(cr,200,0);
cairo_stroke(cr);
----------------------------------------------------
These code snippets do produce the same result for the Xlib
and pdf backends, for the ps backend, the first snippet creates
a diagonal line that is shifted to the left, out of the bounding box,
so that it's only visible in the upper left corner. The second snippet
gives the correct result.
This was tested using cairo 1.0.2 .
Kind regards,
Mike Wimmer
______________________________________________________________________
XXL-Speicher, PC-Virenschutz, Spartarife & mehr: Nur im WEB.DE Club!
Jetzt gratis testen! http://freemail.web.de/home/landingpad/?mc=021130
More information about the cairo
mailing list