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

Adrian Lopez adrianlopezroche at gmail.com
Fri May 21 22:54:07 PDT 2010


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). Likewise, compositing a group of
objects separately from other objects already on a surface requires the
creation of an intermediate surface containing only the objects to be
composited. Unless I'm mistaken about the way Cairo works, such intermediate
surfaces assume the form of a bitmap with a given resolution, adding to the
memory footprint during rendering and making it impossible to export these
images as 100% resolution-independent SVGs.

If this is correct, I hereby propose the creation of a high-level surface
type containing only drawing commands. These surfaces could then be blended
together with a target surface just like for image surfaces, but the new
surface type would retain the vector nature of any vector-based drawing
commands. This would in turn allow for the creation of pure vector images
when rendering such surfaces to an SVG target (assuming SVG is compatible
with this approach).

Does this sound like a good idea?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20100522/55304e0d/attachment.html>


More information about the cairo mailing list