Re: Zooming in GtkDrawingArea



>> How can i zoom in or zoom out what i have drawing in an efficient way.
>> If other way can achieve this goal. Anybody have idea? Wait for your
>> help!! 
>
>Zoom is possible via pixbuf. Make pixbuf from pixmap
>(gdk_pixbuf_get_from_drawable() function).
>Scale pixbuf to another pixbuf with a preffered size
>(gdk_pixbuf_scale*() functions).
>Draw scaled pixbuf to drawable you like (drawing area window on expose
>event, or
>another pixmap).
>
>"gtk-doc/gdk/gdk-drawing-primitives.html"
>"gtk-doc/gdk/gdk-pixbufs.html"
>"gtk-doc/gdk-pixbuf/gdk-pixbuf-scaling.html"

use the GnomeCanvas.

its much easier, and zooming comes for free. for some operations, its
much faster too.

--p



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