[cairo] [RFC] Color space API (partial proposal)
spitzak at gmail.com
Mon Feb 22 13:53:48 PST 2010
I do not think cairo_color_t is necessary, just the cairo_color_space_t.
I would prefer to set colors with an api like this:
cairo_set_source_color(cairo_t*, cairo_color_space_t*, void* data)
The reason is that the "data" is quite likely already in a memory
structure with the correct format (such as an array of float).
This also makes the emulation of the existing color api trivial without
allocating any temporary objects.
I also feel it may be possible to unify images and colors with this,
something I consider fairly important. A "color" is just a 1x1 image. We
could make cairo_color_space_t be a full description of the pixels in an
More information about the cairo