[cairo] Spot colors (and CMYK)

Bill Spitzak spitzak at gmail.com
Thu Feb 18 09:31:28 PST 2010


I would not use varargs either.

However a pointer to the color array could be used. I would prefer this 
over a structure that contains both info about the color type and the 
values, because in many cases the array is already available in memory, 
but Cairo's structure is not.

So something like:

cairo_set_color(cairo_t*, cairo_color_type_description*, void* data)

If we do this I think it is FAR more important to have "this pixel from 
this image" than any of this color management stuff. Please add this if 
we are going to go down this route!

Jon Cruz wrote:
> 
> On Feb 17, 2010, at 1:56 PM, M Joonas Pihlaja wrote:
> 
>> On Wed, 17 Feb 2010, ecir hana wrote:
>>
>>> or even better:
>>>
>>> cairo_set_source_native_channels(cairo_t *cr, ...);
>>>
>>> No?
>>
>> No.  Varargs are the bane of any language binding.
> 
> And I go as far as to say that for most any other uses varargs are quite 
> evil and far to often wander off into bug-land. Most often this is due 
> to varargs being used in place of taking the time to understand a whole 
> problem and architecting a proper solution. There are exceptions, of 
> course, but those really need to be well thought out.
> 


More information about the cairo mailing list