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
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to