View previous topic :: View next topic |
Author |
Message |
mingwu
Joined: 25 Oct 2004 Posts: 3
|
Posted: Mon Jan 03, 2005 11:44 pm Post subject: pixmap.drawRectangle bug |
|
|
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 |
|
|
Ant
Joined: 06 Mar 2004 Posts: 306 Location: Canada
|
Posted: Wed Jan 05, 2005 2:49 am Post subject: Re: pixmap.drawRectangle bug |
|
|
thank you, I couldn't find the problem yet, I'm working on it.
Ant |
|
Back to top |
|
|
|
|
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
|