]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Tue, 27 Mar 2012 14:56:21 +0000 (14:56 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Tue, 27 Mar 2012 14:56:21 +0000 (14:56 +0000)
coders/pango.c

index 75fc60661625434b7e159ea9b5ae3a8b37260e90..5752790c58f09a0d8c1c791f6e38e0626c159072 100644 (file)
@@ -326,7 +326,7 @@ static Image *ReadPANGOImage(const ImageInfo *image_info,
   if (image->columns == 0)
     {
       pango_layout_get_pixel_extents(layout,NULL,&extent);
-      image->columns=extent.x+extent.width;
+      image->columns=extent.x+extent.width+2*page.x;
     }
   else
     {
@@ -337,7 +337,7 @@ static Image *ReadPANGOImage(const ImageInfo *image_info,
   if (image->rows == 0)
     {
       pango_layout_get_pixel_extents(layout,NULL,&extent);
-      image->rows=extent.y+extent.height;
+      image->rows=extent.y+extent.height+2*page.y;
     }
   else
     {
@@ -364,6 +364,7 @@ static Image *ReadPANGOImage(const ImageInfo *image_info,
   cairo_set_operator(cairo_image,CAIRO_OPERATOR_CLEAR);
   cairo_paint(cairo_image);
   cairo_set_operator(cairo_image,CAIRO_OPERATOR_OVER);
+  cairo_translate(cairo_image,page.x,page.y);
   pango_cairo_show_layout(cairo_image,layout);
   cairo_destroy(cairo_image);
   cairo_surface_destroy(surface);