Re: resizing a Gtk2::Image



Is there a method of Gtk2::Image objects that can resize/rescale/resample
an image?

nope.

GtkImage is just a widget that displays images.

the image it displays can be a GdkPixmap or a GdkPixbuf, and it's *that* image
that you want to resize/rescale/resample.  there's a rather full-featured API
for scaling GdkPixbufs (Gtk2::Gdk::Pixbuf in perl).

That is as I had expected :-/

by default the GtkImage tracks the size of its source image, but i imagine
that if you really really need to you could call set_size_request (widget
method) on the GtkImage --- although i don't actually know what would happen.

The widget resizes but the image itself stays the same size.

Incidentally, has the API changed for timeouts between Gtk and Gtk2? Gtk2->timeout_add doesn't seem to work. 
I have browed through the various documents but didn't see anything pertinent, although this could be because 
I have a mild allergy to manuals :-p

Thanks a lot,

Gavin.

--
Gavin Brown
e: gavin brown uk com
w: http://jodrell.net/
PGP/GPG key ID: 891D8FCA




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