GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with gdk_draw_point ()

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Example Code
Author Message
elzbieta



Joined: 09 Aug 2008
Posts: 3

PostPosted: Sat Aug 09, 2008 1:56 pm    Post subject: Problem with gdk_draw_point () Reply with quote

Hello everyone
I'm writing gtk C program that has to read points from file and then present it in some drawing area or just any window. There is problem with gdk_draw_point () fucntion. I know what is the 1 and 3 and 4 argument of this function but have no idea what to do with 'colour' argument. Is it something with styles? I need to bind some style with widget first? Do I need to use library gtk/styles in this code? Thanks for any help, I'm just begginer...
Back to top
dreblen
Never Seen the Sunlight


Joined: 14 Jun 2007
Posts: 538
Location: Falun, WI USA

PostPosted: Sat Aug 09, 2008 9:21 pm    Post subject: Reply with quote

It's a GdkGC
http://library.gnome.org/devel/gdk/stable/gdk-Graphics-Contexts.html
this can be seen from the function documentation
http://library.gnome.org/devel/gdk/stable/gdk-Drawing-Primitives.html#gdk-draw-point
I've never used gdk_draw_point or GdkGC, so I can't offer too much help, but these links should point you in the right direction
Back to top
elzbieta



Joined: 09 Aug 2008
Posts: 3

PostPosted: Sun Aug 10, 2008 9:19 am    Post subject: Reply with quote

Ok thanks, so I think I need touse one more library,
#include <gdk/gdk.h>
not only <gtk/gtk.h>
Back to top
dreblen
Never Seen the Sunlight


Joined: 14 Jun 2007
Posts: 538
Location: Falun, WI USA

PostPosted: Mon Aug 11, 2008 3:00 am    Post subject: Reply with quote

no, gtk.h #includes gdk/gdk.h, so you don't need to do it yourself.
Gdk can be thought of as a lower level of Gtk, so if you're using Gtk, you're already using Gdk, just not directly all the time
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Example Code All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP