Re: Question on GnomeCanvasImage
- From: Federico Mena Quintero <federico redhat com>
- To: loban enigma caltech edu
- CC: gnome-list gnome org
- Subject: Re: Question on GnomeCanvasImage
- Date: Wed, 1 Dec 1999 10:37:44 -0500
> board_image is a GdkImlibImage created by loading a PNG file. The PNG file
> has transparancy in it. From fiddling around I noticed that board emits
> an event signal only if I move my mouse over the non-transparent part of my
> image - which is good. However, two problems:
>
> (a) After update_board is called and the image is rotated by 30
> degrees successfully, it seems that the "area" over which my
> mouse movement generates an event signal is no longer "the
> non-transparent part of the image".
> (b) After update_board is called 2 times, board doesn't generate
> an event signal anymore.
Eeeek. The GnomeCanvasImage item is completely hosed with respect to
affine transformations. I am sorry that you are being bit by this
problem:-(
You may want to use the GnomeCanvasPixbuf item in the gdk-pixbuf
module, which properly supports affines in both Gdk and AA modes.
This canvas item will eventually be moved to the core libgnomeui. In
addition, you can use the GdkPixbuf library, which IMO is much nicer
than Imlib :-)
There is a comparison between Imlib and GdkPixbuf in
http://developer.gnome.org/feature/current/html/gdk-pixbuf.html
The GdkPixbuf reference documentation is available at
http://developer.gnome.org/doc/API/gdk-pixbuf/book1.html
Good luck,
Federico
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]