[compiz] Annotate, guiding line patches with questions
Mirco Müller
macslow at bangang.de
Thu Jan 4 17:37:23 PST 2007
Am Mittwoch, den 03.01.2007, 19:21 +0100 schrieb David Reveman:
> > 2) It seems like adding text with cairo/opengl would
> > lead to lots of headaches, limitations and bloat.
> > My idea is that a seperate helper app could be written
> > which could provide a palette as well as text entering
> > functionality. I could add an extra action to launch
> > it, and it could launch the app via dbus to enter text.
> > Does this sound like a good idea?
>
> I'm not sure. How advanced does the text need to be in the annotate
> plugin? If the toy text API in cairo is good enough, then using it to
> render text would be very easy.
If you want proper text (pango-based) have a look at this here and
check it out with...
git clone http://people.freedesktop.org/~macslow/glitz-test.git
Have a look at demo_textpath() and fps_to_surface() in
cairo-rendering.c, which uses pango via cairo. The results are good
enough to allow even international/unicode text. While it is not
directly uploadable to a GL-texture (still a bit work needed) I will
release an additional example-program (at
http://cairographics.org/OpenGL) that does use those functions for a
proper texture-based text-rendering generated from cairo-surfaces in a
normal OpenGL-program.
But if you like to give it a shot right away that code is probably good
enough to get you going quickly.
Best regards...
Mirco "MacSlow" Müller
--
email - macslow at bangang.de
www - http://macslow.thepimp.net
lowfat - http://macslow.thepimp.net/sponsor-it
More information about the compiz
mailing list