RE : GooCanvas : Clipboard copy



Hey,

>You probably need to set the default color back to black, after
clearing the background, i.e.
> cairo_set_source_rgb(cr, 0.0, 0.0, 0.0);

I have found the solution !!! The problem is in the
convert_color_channel() function.

The original code is :

guchar convert_color_channel(guchar src, guchar alpha)
{
	return alpha ? ((src << 8) - src) / alpha : 0;
}

And the "GOOD" code is :

guchar convert_color_channel(guchar src, guchar alpha)
{
	return alpha ? ((src << 8) - src) / alpha : 255;
}

Thank you for your help Damon,

Cyril

NB : I have retrieved the original page of this code :
http://davyd.ucc.asn.au/projects/gtk-utils/cairo_convert_to_pixbuf.html



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]