[cairo] drawing with a mask

Bill Spitzak spitzak at thefoundry.co.uk
Wed Feb 18 17:06:03 PST 2009

M Joonas Pihlaja wrote:

> I think the default scaling settings might also explain the gradient 
> you mentioned seeing if using an entirely opaque mask. In this case 
> the pixels outside the mask are treated as transparent, so when 
> scaling up they "leak" into the mask area covered by the top-left 
> pixel due to filtering.  The most way to fix all this is to reset the 
> current transformation matrix back to the identity before calling 
> cairo_mask_surface() or use cairo_push_group/pop_group().

Another example where the expected behavior is EXTEND_PAD. I really 
think the default in Cairo will have to be changed.

Bill Spitzak, Senior Software Engineer
The Foundry, 618 Hampton Drive, Venice, CA, 90291, USA
Tel: +1 310 399-4555 * Fax: +1 310 450-4516 * Web: www.thefoundry.co.uk
The Foundry Visionmongers Ltd * Registered in England and Wales No: 4642027

More information about the cairo mailing list