Re: Zoom/magnification of images in GDK
- From: Tadej BorovÅak <tadeboro gmail com>
- To: lindleyf cox net
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Zoom/magnification of images in GDK
- Date: Wed, 21 Apr 2010 09:16:14 +0200
Hello
Now, I know how I could do this if I used gtkglext to get OpenGL in the picture, so I could throw the image
into a texture and then render it at an arbitrary size. But I was wondering if there were any options built
into GTK/GDK which would allow me to avoid the extra dependency?
There are three options that I can remember now:
1. Convert your gray pixels into GdkPixbuf and then scale it using
gdk_pixbuf_scale() to proper size, then draw it.
2. Convert your gray pixels into GdkPixbuf and then scale it using
cairo directly when drawing.
3. Convert your gray pixels into CairoImageSurface and then scale it
using cairo directly when drawing.
Those three methods won't require you to add any additional
dependencies, since everything listed above is part of the standard
GTK+ installation.
Tadej
--
Tadej BorovÅak
tadeboro.blogspot.com
tadeboro gmail com
tadej borovsak gmail com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]