Re: Custom DrawingArea doesn't show



On Thu, 2008-08-14 at 23:17 +0200, Herwig Hochleitner wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I just found out that it works correctly if I create the cairo context
> from the event.window I get at do_expose_event.

the C documentation for gdk_cairo_create() has a note:

  Note that due to double-buffering, Cairo contexts created in a GTK+
  expose event handler cannot be cached and reused between different
  expose events.

you need to create and destroy the cairo context for each expose event.

> The question remains whether this is desired behaviour and if it is,
> should there be some checks in the api for this
> (ContextOutdatedError?)?

this is something better asked on the mailing list for the gtk+ python
bindings.

ciao,
 Emmanuele.

-- 
Emmanuele Bassi,
W: http://www.emmanuelebassi.net
B: http://log.emmanuelebassi.net



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