Re: gtk_rgba_parse retunr wrong color
- From: Eric Williams <ericwill redhat com>
- To: gtk-app-devel-list gnome org
- Subject: Re: gtk_rgba_parse retunr wrong color
- Date: Fri, 23 Jun 2017 13:38:59 -0400
Hello,
On 06/23/2017 10:54 AM, Rúben Rodrigues wrote:
Hi,
Someone knows why gdk_rgba_parse returns worng color?
I have this gdk_rgba_parse(&front_color,"rgb(8,178,23)");
cairo_set_source_rgba(cr, front_color.red, front_color.blue,
front_color.green, front_color.alpha);
The color should be green but returns blue...
Thanks
The order of the parameters to cairo_set_source_rgba() are wrong. It
should be: cr, red, green, blue, alpha.
See:
https://www.cairographics.org/manual/cairo-cairo-t.html#cairo-set-source-rgba
--
Eric Williams
Associate Software Engineer - Eclipse Team
Red Hat
[
Date Prev][
Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]