GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Tue Sep 02, 2014 9:15 am

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 
Offline
Familiar Face

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

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
Code:
cairo_set_source_rgb(cr, red, green, blue);
cairo_fill_preserve(cr);

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?


Top
 Profile  
 
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: Google Adsense [Bot] and 3 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