[cairo] Should Cairo support non-bitmap memory surfaces?

M Joonas Pihlaja jpihlaja at cc.helsinki.fi
Sat May 22 02:04:29 PDT 2010

On Sat, 22 May 2010, Adrian Lopez wrote:

> Drawing a filled shape with a solid border and transparency applied to the
> whole currently requires the creation of an intermediate surface (so the
> fill doesn't show through the border).

Yes.  You're supposed to use cairo_surface_create_similar() or other 
such means to create "similar surfaces" to your target surface.  
Cairo will do its best to keep your vector drawing from being unduly 
rasterised, if your target surface itself is a vector surface.

> If this is correct, I hereby propose the creation of a high-level surface
> type containing only drawing commands.
> Does this sound like a good idea?

Yes, sounds like a great idea.  Cairo's master branch contains a new 
surface type called cairo_recording_surface_t which does exactly what 
you propose.



More information about the cairo mailing list