[cairo] API proposal: cairo_format_from_content and cairo_content_from_format

Carl Worth cworth at cworth.org
Mon Apr 23 17:24:13 PDT 2007


On Mon, 23 Apr 2007 17:32:39 -0400, Behdad Esfahbod wrote:
> Given the definition above, it's apparently something image-surface
> centric.  I was ignoring that until Max showed us how OO.o has the two
> following functions implemented:
>
> Format cairoHelperFormatFromContent(Content aContent);
> int cairoHelperX11FormatFromContent(Content aContent);
>
> Now that makes a lot more sense.

Yeah, that's really the only way it would start making any
sense. Within the context of a given backend, you could want to ask
what format is associated with the surface returned by create_similar
for a particular content value.

But even then, it still doesn't make a lot of sense. For example, if
you're running an X server with a 565 visual, then doing
create_similar with CAIRO_CONTENT_COLOR will give you a surface
targeting an X11 Pixmap with a 565 visual. But we still don't have any
cairo_format_t to describe that, so I don't see how trying to map a
content to a format in an "xlib aware" fashion would help.

I guess I still don't see where this would be used. In what sequences
does OO.o find this useful?

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20070423/a052ff91/attachment.pgp


More information about the cairo mailing list