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 Jul 23, 2014 1:40 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: how to set the line color with gdk_draw_segments ()
PostPosted: Sun Feb 19, 2012 11:30 pm 
Offline

Joined: Sat Feb 18, 2012 10:34 pm
Posts: 4
hi,

this is a second topic to my first one, "image is not visible".

Within a C-function which is called by an ADA main program I want to display images and plot colored lines on the images. With cairo I don't get anything displayed, see my first topic.

Now I tried it with gdk_draw_rgb_image() for the images and gdk_draw_segments () for the lines.
I can see the images but only parts of the lines.
I am testing it with a loop of some images and a fixed set of 5 lines.
Sometimes there are 3 lines visible but not with full length. Sometimes all 5 lines are visible but again not with the full length and one of them has a gap.
All lines are plotted in black. So I have to change the color.

The documentation told me that every window has 5 graphic contexts.
Which one shall be changed to get colored lines and how to do it?
Has somebody an explanation why the lines are not plotted with full length?

_________________
gtkNiko


Top
 Profile  
 
 Post subject: Re: how to set the line color with gdk_draw_segments ()
PostPosted: Tue Feb 21, 2012 10:18 am 
Offline
Never Seen the Sunlight

Joined: Thu Mar 24, 2011 2:10 pm
Posts: 328
Location: Sydney, Australia
Keep on trying with cairo. The use of gdk for drawing is depreciated in gtk.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group