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.
This commit is contained in:
Vladimir Vukicevic 2007-11-06 15:06:06 -08:00
parent 9b8d9f2859
commit 95ede9ea59

View file

@ -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;