From 95ede9ea59eb1e2d7fe10fbc698f3f9fff192e79 Mon Sep 17 00:00:00 2001 From: Vladimir Vukicevic Date: Tue, 6 Nov 2007 15:06:06 -0800 Subject: [PATCH] Use correct surface resolution when creating paginated fallback image If a surface resolution is set via _cairo_surface_set_resolution, it needs to be used when the fallback image is created. The user sets the fallback resolution on the paginated surface, so we need to divide that by the resolution of the actual (target) surface, not the paginated surface. --- src/cairo-paginated-surface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cairo-paginated-surface.c b/src/cairo-paginated-surface.c index e25204e08..d3c6a4505 100644 --- a/src/cairo-paginated-surface.c +++ b/src/cairo-paginated-surface.c @@ -241,8 +241,8 @@ static cairo_int_status_t _paint_fallback_image (cairo_paginated_surface_t *surface, cairo_box_int_t *box) { - double x_scale = surface->base.x_fallback_resolution / surface->base.x_resolution; - double y_scale = surface->base.y_fallback_resolution / surface->base.y_resolution; + double x_scale = surface->base.x_fallback_resolution / surface->target->x_resolution; + double y_scale = surface->base.y_fallback_resolution / surface->target->y_resolution; cairo_matrix_t matrix; int x, y, width, height; cairo_status_t status;