[cairo] Spot colors (and CMYK)

ecir hana ecir.hana at gmail.com
Fri Feb 19 09:39:24 PST 2010


On Thu, Feb 18, 2010 at 6:51 AM, Kai-Uwe Behrmann <ku.b at gmx.de> wrote:
>
> /* a small sequence */
> cairo_color_t * colour = cairo_color_create( /**/ );
> cairo_source_color_set( cr, color );
> cairo_rectangle( cr, /**/ );
> cairo_color_set_native_channels( color, 0.2, 0.2, 0.2, 1.0 );
> cairo_set_source_color( cr, color );
> cairo_rectangle( cr, /**/ );
> cairo_color_set_native_channels( color, 0.5, 0.5, 0.5, 1.0 );
> cairo_set_source_color( cr, color );
> cairo_rectangle( cr, /**/ );

Another thing I don't understand is why you call
"cairo_set_source_color()" every time after
"cairo_color_set_native_channels()"? Because either
"color_set_native_channels()" creates every time new color (which
doesn't seems so as you don't supply its result into
"set_source_color()" or "cairo_color_set_native_channels()" mutates
"color" but then you don't have to set it all the time again.


More information about the cairo mailing list