Re: cairo drawing commands to gdk_invalidate_region
- From: Dov Grobgeld <dov grobgeld gmail com>
- To: Paul Davis <paul linuxaudiosystems com>
- Cc: gtk-devel-list gnome org
- Subject: Re: cairo drawing commands to gdk_invalidate_region
- Date: Tue, 17 Aug 2010 20:54:53 +0300
How is update() supposed to know what region to invalidate? By a list of GdkRegions as a parameters? The dual functionality of draw is just a way of automizing this.
Dov
On Tue, Aug 17, 2010 at 18:50, Paul Davis
<paul linuxaudiosystems com> wrote:
On Tue, Aug 17, 2010 at 9:11 AM, Dov Grobgeld <
dov grobgeld gmail com> wrote:
> Sorry, I still don't get it. In my scenario there is initially is no
> external request of a region that should be drawn. The only source of what
> should be drawn, including what areas should be exposed, are in the draw()
> routine. The challenge is to translate a set of drawing routines to a set of
> invalidation areas.
This is how you described it:
>Here is a description of my flow, which might e.g. be used to draw a rubber band box:
>
> 1. motion event calls update()
> 2. update() calls draw() in order to get regions to expose.
> 3. update() calls gdk_invalidate_region() based on output from draw
> 4. exposure-event callback calls draw() to carry out the drawing for each region
this is wrong. update() should just call gdk_invalidate_region(). this
will cause expose to be invoked with the region passed in.
the way you've described it above, your draw() method does two
entirely separate tasks.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]