diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-04-25 09:44:18 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-04-25 09:45:41 +0100 |
commit | 240ebaf81a42c24c4d4267879c5ef8102e97017e (patch) | |
tree | 4456197b8e6e374af31bb03c2b7d7f7dd96101ff /src/cairo-clip.c | |
parent | 4d3632761b928c14fb1ce257af077f45658d8537 (diff) |
clip: Fix sign reverse when combining with the clip surface.
Finally, found the reversed sign in the clipping code, thanks cu!
Fixes: test/clip-shape
Diffstat (limited to 'src/cairo-clip.c')
-rw-r--r-- | src/cairo-clip.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/src/cairo-clip.c b/src/cairo-clip.c index ff4aeb63..6b9ffd28 100644 --- a/src/cairo-clip.c +++ b/src/cairo-clip.c @@ -1190,26 +1190,6 @@ _cairo_clip_combine_with_surface (cairo_clip_t *clip, assert (clip_path != NULL); - if (clip_path->surface != NULL && - clip_path->surface->backend == dst->backend) - { - cairo_surface_pattern_t pattern; - - _cairo_pattern_init_for_surface (&pattern, clip_path->surface); - pattern.base.filter = CAIRO_FILTER_NEAREST; - cairo_matrix_init_translate (&pattern.base.matrix, - -dst_x + clip_path->extents.x, - -dst_y + clip_path->extents.y); - status = _cairo_surface_paint (dst, - CAIRO_OPERATOR_IN, - &pattern.base, - NULL); - - _cairo_pattern_fini (&pattern.base); - - return status; - } - need_translate = dst_x | dst_y; do { if (clip_path->surface != NULL && @@ -1219,8 +1199,8 @@ _cairo_clip_combine_with_surface (cairo_clip_t *clip, _cairo_pattern_init_for_surface (&pattern, clip_path->surface); cairo_matrix_init_translate (&pattern.base.matrix, - -dst_x + clip_path->extents.x, - -dst_y + clip_path->extents.y); + dst_x - clip_path->extents.x, + dst_y - clip_path->extents.y); pattern.base.filter = CAIRO_FILTER_NEAREST; status = _cairo_surface_paint (dst, CAIRO_OPERATOR_IN, |