[cairo] using cairo in c++

John Taber jtaber at johntaber.net
Tue Oct 11 04:06:45 PDT 2005


Thks for the info - but fltk 2.0.x-r4586 does not fully build with the
enabled-cairo option - (it fails on compiling Fluid with "libcairo.so.2
- cannot open shared object file ...)

Following the partial build - I tried a helloworld program (without any
cairo commands) - fails on linking libfltk.a (fillrect.o) - undefined
reference to cairo_rectangle - so somehow it is using cairo in base fltk 
libs though those libs are apparently not correctly built.

Not sure if this is related to cairo pkgs, fltk makefiles, fltk
namespaces, or even something else (btw compiled under gcc 3.3.5).  If 
its a pure Fltk issue, I'll move this over to the Fltk list.  I checked 
that both the fltk make and my make for helloworld linked to the 
/usr/lib directory - I noticed Cairo headers are in /usr/include/cairo

Bill Spitzak wrote:
> The 2.0 CVS version of fltk can be compiled to use cairo for drawing 
> everything(*). Run configure with --enable_cairo (or something like 
> that). There is then a static cairo context called "fltk::cc" which you 
> can use as the first argument to all your drawing.
> 
> Cairo should replace the need for fltk to do it's own device-indepent 
> drawing layer, so Fl_Device has not been implemented in fltk2.
> 
> (*) well not everything yet. It is still drawing images and fonts using 
> Xft/XRender, but this will be fixed. Biggest problem is that cairo has 
> no "list the toy fonts" call and fltk needs this.
> 
> John Taber wrote:
> 
>> How would I use cairo with c++ and the Fltk widget set?  I didn't see 
>> any examples.   There was an old 2003 list msg from Bill Spitzak that 
>> indicated he used an addon Fl_Device but since Cairo has changed a 
>> lot, any ideas?
>> _______________________________________________
>> cairo mailing list
>> cairo at cairographics.org
>> http://cairographics.org/cgi-bin/mailman/listinfo/cairo
>>
> 
> 



More information about the cairo mailing list