[cairo] cairo and gdk/X11

Dan Amelang daniel.amelang at gmail.com
Sun Jun 10 10:53:20 PDT 2007


On 6/10/07, Tamas K Papp <tpapp at princeton.edu> wrote:
>
> Thanks for your answers.  Recording operations in my application would
> be clumsy, so I started looking at another solution: drawing into a
> buffer with cairo and copying it onto the screen when needed.

Yes, we've advised people to use that technique in the past.
Basically, you can use a separate cairo surface to "cache" the drawing
and "paint" it to the destination surface as needed. If you search the
mailing list archives, you'll find at least two long threads on how
and when to use this technique (you don't need to use a Gdk or Gtk
anything to make this work, just cairo surfaces). Look for the words
'surface', 'cache', and/or 'lander' (which is the name of a game that
was written to use cairo that uses this technique).

Let us know if you need more direction,

Dan


More information about the cairo mailing list