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 the latest cairo version from cvs today (11/17/05) which is 1.1.1, I think. Kind regards, Mike Wimmer
Created attachment 3827 [details] Test program Code to test the Bug. Using the PS backend of cairo, it draws a diagonal line from the lower left corner to the upper right corner of the picture, first using a transformation matrix and the directly. It creates two ps-files: "test1.ps" (using the transformation matrix) and "test2.ps" without the transformation matrix.
Created attachment 3828 [details] Output of cairotest.c using transformation matrix ps-file, output created with transformation matrix. The diagonal line is shifted to the left, out of the bounding box.
Created attachment 3829 [details] Output of cairotest.c without using transformation matrix ps-output without using a transformation matrix. The coordinates have been calculated manually and the ps-file shows a diagonal line as expected.
Just tested. Fixed already.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.