Fix misplacement of PS origin, (was translating vertically by width instead of height).

This commit is contained in:
Carl Worth 2003-10-31 21:56:14 +00:00
parent c6255f9c29
commit 51da155707
3 changed files with 6 additions and 2 deletions

View file

@ -1,5 +1,9 @@
2003-11-01 Carl Worth <cworth@isi.edu>
* src/cairo_ps_surface.c (_cairo_ps_surface_show_page): Fix
misplacement of PS origin, (was translating vertically by width
instead of height).
* configure.in (CAIRO_VERSION): Bumped version to 0.1.10 for new
functions cairo_set_target_ps, cairo_ps_surface_create, and
cairo_show_page.

View file

@ -325,7 +325,7 @@ _cairo_ps_surface_show_page (void *abstract_surface)
fprintf (file, "gsave\n");
/* Image header goop */
fprintf (file, "%g %g translate\n", 0.0, surface->width_inches * 72.0);
fprintf (file, "%g %g translate\n", 0.0, surface->height_inches * 72.0);
fprintf (file, "%g %g scale\n", 72.0 / surface->x_ppi, 72.0 / surface->y_ppi);
fprintf (file, "/DeviceRGB setcolorspace\n");
fprintf (file, "<<\n");

View file

@ -325,7 +325,7 @@ _cairo_ps_surface_show_page (void *abstract_surface)
fprintf (file, "gsave\n");
/* Image header goop */
fprintf (file, "%g %g translate\n", 0.0, surface->width_inches * 72.0);
fprintf (file, "%g %g translate\n", 0.0, surface->height_inches * 72.0);
fprintf (file, "%g %g scale\n", 72.0 / surface->x_ppi, 72.0 / surface->y_ppi);
fprintf (file, "/DeviceRGB setcolorspace\n");
fprintf (file, "<<\n");