[cairo] cairo and gdk/X11
daniel.amelang at gmail.com
Wed Jun 6 19:56:40 PDT 2007
On 6/6/07, Tamas K Papp <tpapp at princeton.edu> wrote:
> I have looked at the Cairo tutorial code and saw that it works by
> calling the draw function to redraw everything whenever required (if
> the window is resized/exposed etc). Is there a way to avoid this, eg
> by making Cairo remember the draw operations and replay them when
Nope. Cairo is a an immediate-mode graphics library; it has no
remebrance of drawings past.
If rerendering the whole scene is costly, it is best to use the
"damaged" area of the screen (you get this from the expose event) to
determine what needs to be redrawn, so you can skip the rest.
cairo_clip is a handy way to tell cairo not to bother rendering
anything outside a particular region, although it's best if you just
don't bother issuing unecessary drawing calls.
Hope that helps,
More information about the cairo