[cairo] Group surface size

Chris Wilson chris at chris-wilson.co.uk
Tue May 14 03:28:37 PDT 2013


On Tue, May 14, 2013 at 12:22:32PM +0200, Donn wrote:
> On 14/05/2013 12:07, Chris Wilson wrote:
> >The group takes the size (and location) of the current clip extents.
> Does this mean I should set a clip before I call push_group? Something like:
> 
> cairo_save()
> draw a rectangle of 16x16 at correct position
> cairo_clip()
> cairo_push_group()
> draw my icon
> pat = cairo_pop_group()
> cairo.restore()

Yes. Maybe do a reset-clip after the save as well.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the cairo mailing list