[cairo] minimal cairo drawing loop

Dov Grobgeld dov.grobgeld at gmail.com
Tue May 8 05:21:55 PDT 2012


Cairo is a library for drawing images, and it does not have any user
interface associated with it. The questions you ask are assuming that you
have an event loop where you have redrawing etc. That is not the case for
cairo.

That said, there are several graphics toolkits that make use of cairo. One
of them is gtk that in its latest version, gtk-3.0, uses cairo exclusively
for all its compositions. If that is what you are looking for you should
have a look at http://developer.gnome.org/gtk3/3.0/gtk-getting-started.html.

Regards,
Dov


On Tue, May 8, 2012 at 11:35 AM, Davide Calaminici <amiblit at gmail.com>wrote:

> Hello everyone,
>
> just looking for a simple c code to create a minimal drawing loop.
>
> What i want to get is the following.
>
> Load an image
> create a surface where to draw
>
> draw lines on the surface
> clear the drawing area without cancelling the background image
> draw again
>
>
> eventually, is it possible to use two surface and swap the surface in a
> similar way of the double buffering technique?
>
> thank you very much.
>
> --
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20120508/484cd6ed/attachment.html>


More information about the cairo mailing list