On 03/12/12 10:28, J. Liles wrote:
> Just to keep this discussion sane: the only thing that widgets
> containing only straight lines have to benefit from Cario is alpha
> blending.
> And any changes to style would be better made in the
> boxtypes... It's more important that fl_line, arc, curve, polygon and
> friends use Cairo so that diagonal lines and curves don't show
> aliasing.
I see, so it sounds like what you're looking for
is to have a Cairo enabled build of FLTK
that redirects calls like fl_line()
to use Cairo instead of xlib.
The benefit being any lines drawn by FLTK widgets that might
use e.g. diagonal lines or draw rounded edges can benefit
looks-wise via anti-aliasing.
This, as opposed to improving the overall look of FLTK by
redesigning the widgets to use Cairo so as to make skinning
widgets possible.
It's my understanding (I might be wrong) that currently a Cairo
enabled build of FLTK really only enables a few things so that
*Cairo* drawing calls can draw into FLTK windows, but not much
else has been done to make use of Cairo internally by FLTK.
I think the graphics driver abstraction added to fltk 1.3.x
might help make this easy.
From what I can tell, calls like fl_arc() end up calling
fl_graphics_driver->arc(x,y,w,h,a1,a2) to do the actual work,
which I think Fl_Device actually handles.
So this can probably be done by changing Fl_Device.H
so that the current 'Xlib' section has some extra ifdefs
for Cairo so that if Cairo is enabled, fl_xxx calls
invoke cairo functions instead of Xlib.
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev