FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

pixmap.drawRectangle bug

 
Post new topic   Reply to topic     Forum Index -> gtkD
View previous topic :: View next topic  
Author Message
mingwu



Joined: 25 Oct 2004
Posts: 3

PostPosted: Mon Jan 03, 2005 11:44 pm    Post subject: pixmap.drawRectangle bug Reply with quote

I'm trying to port the example from:

http://www.gtk.org/tutorial/sec-scribble.html

But it always core dumps. Here is the source to show the bug:

--------------------------------------------------------------------------
module hw.HelloWorld;

private import dui.All;

class HelloWorld : MainWindow
{
this()
{
super("DUI Hello World");
setBorderWidth(10);
//add(new Label("Hello World"));

DrawingArea drawingArea;
Pixmap pixmap;
drawingArea = new DrawingArea(100, 100);
add(drawingArea);
drawingArea.show();
/* --- Create a new pixmap with new size --- */
pixmap = new Pixmap( drawingArea.getDrawable(),
drawingArea.getWidth(),
drawingArea.getHeight(),
-1
);
/* --- Clear pixmap (background image) --- */
pixmap.drawRectangle
(1,
0, 0,
drawingArea.getWidth(),
drawingArea.getHeight());
printf("here is the bug!\n");

show();
}
}

void main(char[][] args)
{
DUI dui = DUI.dui(args); // inits DUI
new HelloWorld();
dui.go(); // starts the event main loop
}
--------------------------------------------------------------------------

$ ./HelloWorld

(HelloWorld:15479): Gdk-CRITICAL **: file gdkpixmap-x11.c: line 170 (gdk_pixmap_new): assertion `(drawable != NULL) || (depth != -1)' failed
Segmentation fault
Back to top
View user's profile Send private message
Ant



Joined: 06 Mar 2004
Posts: 306
Location: Canada

PostPosted: Wed Jan 05, 2005 2:49 am    Post subject: Re: pixmap.drawRectangle bug Reply with quote

mingwu wrote:
I'm trying to port the example from:

http://www.gtk.org/tutorial/sec-scribble.html

But it always core dumps. Here is the source to show the bug


thank you, I couldn't find the problem yet, I'm working on it.

Ant
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> gtkD All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group