Re: Zoom/magnification of images in GDK



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]