- From: "Dr. David Alan Gilbert" <gtkperl treblig org>
- To: gtk-perl-list gnome org
- Subject: Of Gtk::Gdk::ImlibImage
- Date: Sun, 12 Aug 2001 02:16:05 +0100
To learn Gtk-perl a bit I've been writing a little space invader game (I
prefer learning languages by doing pointless things).
I have one problem left that I haven't yet solved and that is how to do
a more accurate ship/bomb intersection on the canvas. At the moment I'm just
using the bounding box (and once I had done the coordinate i2w conversion) that
works OK but I'd like to get a bit more precision by looking at the image
representing the ship. I'm using load_image to read the image from an xpm file.
I can't seem to find the appropriate way of testing a pixel value at a
given x,y offset in my ImLibImage (i.e. the ship!) image. (Actually I want
the mask and not the value).
Is there a way to do this from ImLibImage in gtk-perl? If ImLibImage is not
the right tool for the job what is?
Thanks in advance,
---------------- Have a happy GNU millennium! ----------------------
/ Dr. David Alan Gilbert | Running GNU/Linux on Alpha,68K| Happy \
\ gro.gilbert @ treblig.org | MIPS,x86,ARM, SPARC and HP-PA | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/
] [Thread Prev