Re: Drawing area with different layers
- From: Chris <plutino gmail com>
- To: Tadej BorovÅak <tadeboro gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Drawing area with different layers
- Date: Mon, 28 Feb 2011 17:33:59 -0800
Thanks Tadej. I spent some time reading cairo document and tried what
you suggested. I store a cairo surface and use cario_paint to redraw
the surface. The result, however, is the same as I did with
gdk_draw_drawable: the background is scribled. The problem might be
that the drawing surface is not properly set to transparent. Do you
know how to do that?
On Mon, Feb 28, 2011 at 9:34 AM, Tadej BorovÅak <tadeboro gmail com> wrote:
I'm new to gtk programming so this might be a very dummy question. ÂI
use a DrawingArea to draw a map with three layers: the background map,
the legend window, and app data. ÂSince the legend layer does not
change often, can I store it in a pixmap and simply copy it rather
than redraw it every time the map and app data change?
I would suggest that you use cairo to do all of the drawing. Then you
can "store" your drawings onto cairo surface and paint it when needed.
tadeboro gmail com
tadej borovsak gmail com
[Date Prev][Date Next
] [Thread Prev][Thread Next