PDA

View Full Version : Drawing With Cario



solarwind
May 19th, 2008, 12:15 AM
Is it possible to draw directly onto the screen using Cairo? I want to make a desktop widget but I need to know how to draw directly onto the screen with Cairo. I want to make something similar to conky, but has a different purpose.

sznurek
May 19th, 2008, 01:07 PM
http://conky.svn.sourceforge.net/viewvc/conky/branches/conky1.5/src/x11.c?view=markup
(it is code for finding desktop window, setting transparent background etc.)
+

http://www.cairographics.org/manual/cairo-XLib-Surfaces.html#cairo-xlib-surface-create
(you already know this, right?)

solarwind
May 19th, 2008, 05:38 PM
http://conky.svn.sourceforge.net/viewvc/conky/branches/conky1.5/src/x11.c?view=markup
(it is code for finding desktop window, setting transparent background etc.)
+

http://www.cairographics.org/manual/cairo-XLib-Surfaces.html#cairo-xlib-surface-create
(you already know this, right?)

Hmmm, are there any examples for those? I've never done this before and don't know where to start.

Edit: Found this http://en.literateprograms.org/Hello_World_(C,_Cairo)#chunk%20def:x