Re: transparent layer over image




On Oct 25, 2004, at 6:55 AM, dmitriy kuvshinov wrote:

are you wanting to draw annotations on the image without altering the pixbuf's data? you can either use Gdk drawing primitives to draw directly on the screen after drawing the image (which can be a pain to keep up), or use Gnome2::Canvas for structured graphics. otherwise, you can just alter the image data, keeping a pristine copy separate from the annotated one.

I want to make the gauge of overcast (then to lay out the gauge under GPL the license). I have already made all calculations and have collected as *.xs the module.

if you already have XS code in your module, then it will be much easier for you to draw on the image in C.

you can pass the GdkPixbuf to your xsub, draw on it in C (where there is no need to copy data, unpack/pack pixels, and all that mess), and then display the pixbuf from perl.

to do this you'll need to #include <gtk2perl.h> in your XS file, so that your code will know how to extract the GdkPixbuf* from the Gtk2::Gdk::Pixbuf reference. you can use ExtUtils::Depends to find the necessary CFLAGS and typemaps.

--
elysse (pregnant): are your hands cold?
me: uh, i suppose so.
elysse: will you put them on me?




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