Re: Scale Gtk::Image
- From: Murray Cumming <murrayc murrayc com>
- To: Daniel Elstner <daniel kitta googlemail com>
- Cc: gtkmm-list gnome org
- Subject: Re: Scale Gtk::Image
- Date: Fri, 26 Jun 2009 18:07:33 +0200
On Fri, 2009-06-26 at 17:44 +0200, Daniel Elstner wrote:
> Am Freitag, den 26.06.2009, 09:47 +0200 schrieb Dimitri Holz:
> > I'm doing a small program how show photos or make presentation of many
> > photos and it should scale Gtk::Image to the size of window. For showing
> > photos I use Gtk::Image, but I can't find a way to scaling it.
>
> I think it will normally be just as large as the image it shows. If you
> want to display a scaled image, then load it into a Gdk::Pixbuf and
> scale that. I think there is even a method to load and scale an image
> file at the same time.
>
> Then just tell the Gtk::Image to display your scaled Gdk::Pixbuf.
This is what I do in Glom:
http://git.gnome.org/cgit/glom/tree/glom/utility_widgets/imageglom.cc#n292
I call that scale() method in my expose_event handler.
--
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]