mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-07 23:00:25 +01:00
image: Invert recording matrix before replay
Hmm, still not quite right but an improvement. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
9bf21c74ae
commit
af6ee4e82e
1 changed files with 7 additions and 2 deletions
|
|
@ -639,7 +639,7 @@ _pixman_image_for_recording (cairo_image_surface_t *dst,
|
|||
} else
|
||||
extend = CAIRO_EXTEND_NONE;
|
||||
|
||||
if (extents == CAIRO_EXTEND_NONE)
|
||||
if (extend == CAIRO_EXTEND_NONE)
|
||||
limit = *extents;
|
||||
|
||||
clone = cairo_image_surface_create (dst->format, limit.width, limit.height);
|
||||
|
|
@ -653,6 +653,9 @@ _pixman_image_for_recording (cairo_image_surface_t *dst,
|
|||
&pattern->base.matrix);
|
||||
if (tx | ty)
|
||||
cairo_matrix_translate (m, tx, ty);
|
||||
|
||||
status = cairo_matrix_invert (m);
|
||||
assert (status == CAIRO_STATUS_SUCCESS);
|
||||
} else {
|
||||
/* XXX extract scale factor for repeating patterns */
|
||||
}
|
||||
|
|
@ -673,9 +676,11 @@ _pixman_image_for_recording (cairo_image_surface_t *dst,
|
|||
pixman_image_unref (pixman_image);
|
||||
pixman_image= NULL;
|
||||
}
|
||||
} else {
|
||||
*ix = -limit.x;
|
||||
*iy = -limit.y;
|
||||
}
|
||||
|
||||
|
||||
return pixman_image;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue