[cairo] Subtractive API, part 0
Kai-Uwe Behrmann
ku.b at gmx.de
Thu Jan 28 04:47:43 PST 2010
Am 28.01.10, 13:09 +0100 schrieb Arjen Nienhuis:
> cairo_set_source_icc_color(cairo_t *cr, float srgb_fallback_r, float
> srgb_fallback_g, float srgb_fallback_b, cairo_profile_t *profile,
> <array of float>)
It remembers me how named colours are used in Oyranos. However some
questions remain open with Cairo not doing ICC style colour conversions:
* What is about images? really multiplying memory usage?
* What is with the compositing colour space? Non selectable?
An other idea slightly in this direction is to pass a real colour object
to Cairo.
typedef struct {
float srgba_fallback[4]; /**< gamma 2.2? */
#ifdef DO_IT_BETTER
/** zero terminated list of data blobs, not necessarily text
* e.g. can contain spot colour names, reflectance ...
*/
char ** properties;
int * properties_len; /**< length per properties element */
int * properties_type; /**< enum? define? mask? */
#endif
cairo_profile_t * profile;
float native_color[];
} cairo_color_t;
cairo_set_source_icc_color(cairo_t *cr, cairo_color_t * color);
A sRGB fallback is in place, even though from a design point of view
CIE*XYZ would be much clearer.
One object means fewer typing.
Reuseable cairo_color_t objects.
Completely sticking to sRGB would be somehow weak. As a means to get the
CM ball rolling it might fit its purpouse.
kind regards
Kai-Uwe Behrmann
--
developing for colour management
www.behrmann.name + www.oyranos.org
More information about the cairo
mailing list