diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-04-28 14:26:21 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-04-30 10:16:24 +0100 |
commit | 8ded35fd69ed0bbb07359c0278071a25af66571c (patch) | |
tree | e6b44acf234b3399306240600c29f470e6045e92 /test/subsurface-similar-repeat.c | |
parent | 5fc04bba9fa8ddda8cf7d7a97015f21a21429172 (diff) | |
download | cairo-8ded35fd69ed0bbb07359c0278071a25af66571c.tar.gz |
ps: Enable native encoding of subsurface patterns.
Carefully handle subsurfaces of a recording surface through the analysis
and paginated surfaces so that we can generate a native pattern for the
vector backends, demonstrated by the PostScript backend.
Nothing remarkable, just a lot of bookkeeping to track the wrapped
surface types and to apply the correct offsets when generating the
subsurface pattern.
Diffstat (limited to 'test/subsurface-similar-repeat.c')
-rw-r--r-- | test/subsurface-similar-repeat.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/subsurface-similar-repeat.c b/test/subsurface-similar-repeat.c index 492bc7744..5f17b490c 100644 --- a/test/subsurface-similar-repeat.c +++ b/test/subsurface-similar-repeat.c @@ -40,6 +40,7 @@ draw (cairo_t *cr, int width, int height) 60, 60); cr_region = cairo_create (similar); cairo_surface_destroy (similar); + cairo_set_source_rgb (cr_region, .5, .5, .0); cairo_paint (cr_region); similar = cairo_surface_reference (cairo_get_target (cr_region)); @@ -48,6 +49,7 @@ draw (cairo_t *cr, int width, int height) /* fill the centre */ region = cairo_surface_create_for_rectangle (similar, 20, 20, 20, 20); cairo_surface_destroy (similar); + cr_region = cairo_create (region); cairo_surface_destroy (region); @@ -69,6 +71,7 @@ draw (cairo_t *cr, int width, int height) cairo_set_source_surface (cr, cairo_get_target (cr_region), 20, 20); cairo_destroy (cr_region); + cairo_pattern_set_extend (cairo_get_source (cr), CAIRO_EXTEND_REPEAT); cairo_paint (cr); |