[cairo] Changing line color
opustenom at hotmail.com
Fri Aug 27 05:41:49 PDT 2010
In order for my pdf file to look nicer, I changed the background to black, and now
I need to emphasize a number of lines between certain coordinates. Some lines need
to be shown as red, some as green, and some as blue, or a variation.
I tested the above requirement with the code below:
cairo_set_line_width (cr, .5);
cairo_set_source_rgb(cr, 1, 0, 0);
cairo_move_to (cr, 152.84, -50.0);
cairo_line_to (cr, 83.97, 30.93);
cairo_set_source_rgb(cr, 0, 0, 1);
cairo_move_to(cr, 90, 1);
cairo_line_to(cr, 40, 1);
However, both lines are displayed as blue, with a very thin red line in the middle of it.
Is there a way to specify that one line needs to be only blue, and the other only red?
What would be the code to try?
I appreciate your help.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cairo