[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: get size of a GTKImage
- From: "Brian J. Tarricone" <bjt23 cornell edu>
- To: gtk-app-devel-list gnome org
- Subject: Re: get size of a GTKImage
- Date: Mon, 20 Jun 2005 14:55:35 -0700
davidgn servidor unam mx wrote:
> I am writing some app where I need to move an image around inside a GtkFixed,
> and I need to get it's size.
>
> I create the image from a file with gtk_image_set_from_file()
>
> Is there an easy way? I managed to get it's dimensions by getting it's
> pixbuf,
> but how can I be sure if it will always have an associated pixbuf?
>
> Reason is I want to center it initially and redimension it's container
> so that
> it fits.
>
> Any suggestion?
After it's been realised, you can get the size from
widget->allocation.width and widget->allocation.height.
-brian
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]