Re: GnomeCanvasPixbuf
- From: "John R. Sheets" <dusk ravendusk org>
- To: Gnome Developers List <gnome-devel-list gnome org>
- Subject: Re: GnomeCanvasPixbuf
- Date: Thu, 16 Dec 1999 09:16:42 -0600
On Dec 16, 1999, Jamie Guinan <guinan@bluebutton.com> wrote:
>
> I hacked in a GnomeCanvasPixbuf item, but it causes
> the app to crash on me (with or without _aa on the
> canvas). The app runs fine without the GnomeCanvasPixbuf.
>
> Any suggestions? Any sample code I should look at?
Sure. Usually when the canvas crashes on a canvas item, it's because
you're passing in the wrong type in the argument list. Your code looks
like this:
setup_item(gnome_canvas_item_new (group,
gnome_canvas_pixbuf_get_type (),
"pixbuf", pixbuf,
"x", 100,
"y", 100,
NULL));
Those x & y parameters are supposed to be gdoubles. You should do this
instead:
setup_item(gnome_canvas_item_new (group,
gnome_canvas_pixbuf_get_type (),
"pixbuf", pixbuf,
"x", 100.0,
"y", 100.0,
NULL));
When in doubt of arg types, check the docs:
http://developer.gnome.org/doc/API/gdk-pixbuf/gnomecanvaspixbuf.html
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]