Re: need help for: GnomeCanvasImage



lauris wrote:
> 
> Hello
> 
> 1. What version of Gnome libs & imlib?
my libversions are:

gtk-config --version
1.2.3

gnome-config --version
gnome-libs 1.0.9

imlib-config --version
1.9.4

> 2. You should specify image width/height. These are
I tryed it before, but end up with  segmentation fault:
... I thought the libary get thw width and height from the image itself
...

  GdkImlibImage *gimg;
  gimg =
gdk_imlib_load_image("/home/zahl/C++/dsp/develop/Gxsm/src/xxsmlogo.xpm");
  GnomeCanvasItem *item2 = gnome_canvas_item_new(gnome_canvas_root(
GNOME_CANVAS(area)),
 						 GNOME_TYPE_CANVAS_IMAGE,
						 "image", gimg,
						 "x", 20.0,
						 "y", 20.0,
						 "width", gimg->rgb_width,
						 "height", gimg->rgb_height,
						 //"anchor", GTK_ANCHOR_NORTH_WEST,
						 NULL);

Do you know if it should work as I wrote above ?
Is there a default for "anchor" ?

> commented out in your example. GnomeCanvasImage defaults to 0.0 x 0.0
> & I'm not sure, what imlib thinks about it. Probably it does not allocate
> 0x0 pixmap & returns NULL.

> 3. It is GnomeCanvasImage bug. Library should always check input values &
> return with meaningful errors/warnings, never simply abort.
Hmmm.

Has someone a running example ?

-- 
with friendly regards / mit freundlichem Gruss,
                   Percy Zahl
Email: zahl@fkp.uni-hannover.de
Dipl.Phys. P.Zahl: http://www.fkp.uni-hannover.de/~zahl/main.html
Institut f"ur Festk"orperphysik, Appelstr. 2, D-30167 Hannover
Tel.Labor: +49 (0)511/762-4825, Fax: -4877



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]