[cairo] Problem in using cairo_set_source_rgb

Jeff Muizelaar jeff at infidigm.net
Mon Feb 5 21:07:19 PST 2007


The inputs to cairo_set_source_rgb range from 0..1.

line green would then be
cairo_set_source_rgb(cr2, 50.0/255.0, 205.0/255.0, 50.0/255.0).

-Jeff

On Mon, Feb 05, 2007 at 11:03:39PM -0600, ken carlino wrote:
> Hi,
> 
> I am try to use cairo_set_source_rgb() to set the color to lime green.
> When i set the rgb to 50, 205, 50, from here, it is lime green:
> http://www.pitt.edu/~nisg/cis/web/cgi/rgb.html
> 
> 
> But nothing shows up. Here is my code:
> // does not work (nothing shows) when  I use lime green
>      cairo_set_source_rgb(cr2, 50.0, 205.0, 50.0);
> // works when i set the color to red
> 	    //            cairo_set_source_rgb(cr2, 1.0, 0.0, 0.0);
>            cairo_stroke(cr2);
> 
> I appreciate if someone can help me with it. It works if i set it to
> red (1.0, 0.0, 0.0).
> 
> Thank you.
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://cairographics.org/cgi-bin/mailman/listinfo/cairo


More information about the cairo mailing list