[cairo] Cairo and SDL

Bill Spitzak spitzak at gmail.com
Fri Mar 19 16:26:42 PDT 2010


I posted this before, here is code that allows you to draw in an X11 
window using Cairo but no toolkit.

-------- Original Message --------
Subject: Self-contained X11 source code to draw with Cairo
Date: Tue, 20 Oct 2009 16:17:28 -0700
From: Bill Spitzak <spitzak at gmail.com>
To: Taoufik Dachraoui <taoufik.dachraoui at wanadoo.fr>
CC: cairo at cairographics.org
References: <A4E2F14C-6B28-4D63-8C5E-202EFD2EE6FF at wanadoo.fr> 
<4AD35F00.3030100 at gmail.com> <4AD3965B.1060600 at gmail.com>

This is a cleaned up version of my code to use Cairo without using gtk
or another toolkit.

In this version the code you may actually want to alter to change what
the program does has been extracted into functions at the bottom, making
it a lot easier to adapt. This has also been tested and works with pango
drawing (requires pkg-config to compile, however).

Hope some Cairo users enjoy this. Please send any feedback!

Bill Spitzak


-------------- next part --------------
A non-text attachment was scrubbed...
Name: x11cairo.c
Type: text/x-csrc
Size: 14204 bytes
Desc: not available
URL: <http://lists.cairographics.org/archives/cairo/attachments/20100319/07d25a45/attachment.c>


More information about the cairo mailing list