GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Thu Sep 18, 2014 7:40 am

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Serious Bug in gtk_draw_layout
PostPosted: Tue Apr 10, 2007 11:13 am 
Offline
Familiar Face

Joined: Wed Mar 07, 2007 6:53 am
Posts: 12
The x and y cordinates are of "gint" type which the manuals explain as being the normal "int of C language". Under Windows(32 bit) or Linux int is 32 bits long. But the above function doesn't draw beyond 32767 concluding " gint " as 16 bit long int. My Layout is really huge (more than 100,000 pixels) and gdk_draw_string/text are deprecated functions. Help Me . what do i do?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 10, 2007 11:55 am 
Offline
Familiar Face

Joined: Tue Feb 13, 2007 3:45 pm
Posts: 30
Location: Madrid, Spain
gtk_draw_layout() seems to be deprecated, use gtk_paint_layout() (link) instead and tell us if you experience the same bug.


Top
 Profile  
 
 Post subject: All in vain
PostPosted: Tue Apr 24, 2007 6:39 am 
Offline
Familiar Face

Joined: Wed Mar 07, 2007 6:53 am
Posts: 12
I replaced gdk_draw_layout with gtk_paint_layout but didn't succeed. Its the same problem again. I 'm actually trying to draw a graph and the X- axis marks ranging to 5000. Each mark at the width of 20 pixels. The graph starts x = 100. So we have 100 + 20*5000 = 100100. The last mark drawn is 1632 which is at 1632 * 20 + 100 = 32740 th pixel position. The next mark obviously crosses 32767 mark and is thus not drawn.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 09, 2007 5:32 am 
Offline
Familiar Face

Joined: Tue Mar 27, 2007 8:56 am
Posts: 26
Are you sure that X11 now can accept a coordinate greater an unsigned 16-bit integer?


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 10, 2007 8:36 am 
Offline
Familiar Face

Joined: Wed Mar 07, 2007 6:53 am
Posts: 12
The functions for drawing the primitives too have arguments of type "gint". And I 'm able to draw at a point beyond this limit. I found this problem not only gtk_draw_layout but also with _draw_string and _text. I discovered that point were drawn but there labels were not which preciesly due to this limit.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 10, 2007 3:58 pm 
Offline
Familiar Face

Joined: Tue Mar 27, 2007 8:56 am
Posts: 26
X windows have a maximum size of 32768 pixels.
http://developer.gnome.org/doc/GGAD/sec-gdkwindow.html

I'm not sure if the documentation is now outdated. Did you use Linux or windows ?


Top
 Profile  
 
 Post subject: Gtk Layout
PostPosted: Thu May 24, 2007 5:55 am 
Offline
Familiar Face

Joined: Wed Mar 07, 2007 6:53 am
Posts: 12
I work on Windows XP.


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

All times are UTC


Who is online

Users browsing this forum: Yahoo [Bot] and 4 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