Re: Zooming in GtkDrawingArea
- From: Paul Davis <pbd op net>
- To: Olexiy Avramchenko <ath beast stu cn ua>
- Cc: gao chaowei <chaoweigao hotmail com>, gtk-list gnome org
- Subject: Re: Zooming in GtkDrawingArea
- Date: Mon, 09 Sep 2002 10:35:57 -0400
>> 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]