Re: Size of GtkImage?



On Wednesday, July 23, 2003, at 11:29  AM, Matthias Bläsing wrote:

I allready looked at the API at gtk.org, but couldn't find a function,
that returns the actual size of the GtkImage in Pixels, to scale the
Pixbuf.

Is there a way to retrieve the size of the GtkImage?

you could use the widget's allocation --- $gtkimage->allocation->width and $gtkimage->allocation->height .

or fetch the GtkImage's GdkPixbuf and ask its size. this only works for certain settings on the GtkImage... see http://developer.gnome.org/doc/API/2.0/gtk/GtkImage.html#gtk-image-get- pixbuf




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