On 10.06.2012, at 04:45, Greg Ercolano wrote: > On 06/09/12 16:44, Greg Ercolano wrote: >> Are there any examples of e.g. gradient filled rects and circs >> in fltk2/3 that can be backported to 1.3.x? > > I just took a quick look the fltk3, and a quick case insensitive > grep for 'gradient' didn't seem to show any drawing functions > that would draw gradients.
No, there is no such code in FLTK3 yet. There is not even an API. In WIN32, we have AlphaBlend() which copies bitmaps with alpha. GDI+ was introduced with WindowsXP and adds 2D Vector graphics, better imaging, and typography. There is also for example the LinearGradientBrush class and much more. On X11, the XRender extension is available under XFree86 and many more Unix implementations. It takes care of transparency and geometry rendering. As for gradients, I am still searching for that. Quartz has all vector drawing and compositing we need, alpha blending, compositing and much more. See for example CGShading and CGGradient. Thanks to the Driver interface, all this could be implemented with perfect backwards compatibility ;-) As a final remark, I would also *love* to have an OpenGL driver. Imagine having a half-transparent UI over a 3D scene like modern CAD systems have. Very nice! > If that's the case.. > > ..perhaps a good place to start would be Dmitri's code > which I think includes gradient functions for his gradX > theme, as this is work is already done, and porting in > his functions could help get that theme into the lib. Do you have a link? I am not quite sure which one that is. > Matt, perhaps as you say there's native gradient functions > on each platform we could later adapt our code to use, > and use our own code to fall back to on limited platforms > (such as embedded platforms with limited graphics). I think we must agree on a useful API for FLTK and then implement the various platforms. - Matthias _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

