summaryrefslogtreecommitdiff
path: root/src/cairo-pdf-surface.c
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2010-11-20 00:50:04 +1030
committerAdrian Johnson <ajohnson@redneon.com>2010-11-21 20:34:18 +1030
commited87ddddb3994f126e0f2d18fa23da6bc5ed579e (patch)
tree853ac99d9e2c817a590eac0338ebe935515518fc /src/cairo-pdf-surface.c
parentccff76433e1cd068e5534d0ab633c27b0faf47d2 (diff)
PS/PDF: Fix regression when changing page size to a larger size
https://bugs.freedesktop.org/show_bug.cgi?id=24691 (cherry picked from commit e7c5f470436220668e50201d775a9fec47162a67)
Diffstat (limited to 'src/cairo-pdf-surface.c')
-rw-r--r--src/cairo-pdf-surface.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index ae2e4f544..0f4171373 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -645,6 +645,7 @@ cairo_pdf_surface_set_size (cairo_surface_t *surface,
double height_in_points)
{
cairo_pdf_surface_t *pdf_surface = NULL; /* hide compiler warning */
+ cairo_status_t status;
if (! _extract_pdf_surface (surface, &pdf_surface))
return;
@@ -652,6 +653,11 @@ cairo_pdf_surface_set_size (cairo_surface_t *surface,
_cairo_pdf_surface_set_size_internal (pdf_surface,
width_in_points,
height_in_points);
+ status = _cairo_paginated_surface_set_size (pdf_surface->paginated_surface,
+ width_in_points,
+ height_in_points);
+ if (status)
+ status = _cairo_surface_set_error (surface, status);
}
static void
@@ -1720,8 +1726,6 @@ _cairo_pdf_surface_finish (void *abstract_surface)
surface->font_subsets = NULL;
}
- _cairo_surface_clipper_reset (&surface->clipper);
-
return status;
}
@@ -3571,6 +3575,8 @@ _cairo_pdf_surface_show_page (void *abstract_surface)
if (unlikely (status))
return status;
+ _cairo_surface_clipper_reset (&surface->clipper);
+
status = _cairo_pdf_surface_write_page (surface);
if (unlikely (status))
return status;