GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Wed Aug 31, 2016 9:44 pm

All times are UTC

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: multiple rectangles in cairo?
PostPosted: Thu Mar 20, 2008 5:38 pm 
Familiar Face

Joined: Wed Mar 19, 2008 3:23 pm
Posts: 19

I Have a little problem concerning cairo and rectangles. I want to draw multiple rectangles (without borders) in different colors, but when cairo is finished drawing, all rectangles have the same color as I specified the last rectangle to have. After closing a path I run
cairo_set_source_rgb(cr, red, green, blue);

where *cr is the cairo rectangle to draw in. The variables red, green and blue have different values each time the rectangle is drawn. Do I have to create a new layer or something, to be able to have more colors at once? Or do I have to use another function than cairo_set_source_rgb?

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group