Re: Scrolledwindow, layout and drawing area
- From: jcupitt gmail com
- To: "fzamperini tiscali it" <fzamperini tiscali it>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Scrolledwindow, layout and drawing area
- Date: Fri, 7 Sep 2007 08:50:48 +0100
Hi Federico,
On 9/7/07, fzamperini tiscali it <fzamperini tiscali it> wrote:
other widgets (like side panes, menu bar etc.); I need zooming and
panning features, so I went for a scrolled window => layout =>
drawingarea.
Why do you need the layout? You can just put a drawingarea inside a
scrolledwindow. To zoom, just change the size of the drawing area and
queue a repaint.
To achieve zooming I handle the scroll event by scaling the original
size pixbuf and copying it to an off screen pixbuf that is copied on
the drawingarea in the expose_event handler.
This will waste a lot of memory in the X server. I would keep the
original image in your client program, then in the expose handler,
just zoom up the bit of the image you need.
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]