>
> On 04.02.2011, at 17:46, [email protected] wrote:
>
> > Author: manolo
> > Date: 2011-02-04 08:46:41 -0800 (Fri, 04 Feb 2011)
> > New Revision: 8367
> > Log:
> > Removed the requirement of declaring class =
> Fl_PostScript_Graphics_Driver friend of
> > class Fl_Graphics_Driver. This is undesirable because it obliges a =
> user (e.g., Mingodad
> > and his PDF driver) who develops a new graphics driver to change the =
> FLTK source code.
> > Just declaring font() public instead of private is enough.
>
> Shouldn't all those stubs be public? Combined with the ability to have =
> multiple devices "open" at the same time (instead of having one =
> "current"), I can see some uses, but also I think it would remove =
> "friend" clutter.=20=
>
I'm not in favor of making all those stubs public, at least for 1.3,
for these reasons:
- There would be two different ways in the API to do exactly
the same thing, fl_graphics_driver->xxx() and fl_xxx(),
a source of confusion.
- The Fl_Graphics_Driver API is smaller than the series of
fl_xxx() functions that deal with drawing, colors and fonts:
o some functions are independent from any graphics driver
(e.g., fl_color_average())
o others don't draw anything (e.g., fl_color(void))
o others are deliberately out of this API (e.g., fl_width()
because fonts are a very complex business already with the
display, so we don't multiply that to yet other devices)
so the ability to work with the fl_graphics_driver->xxx() calls
only is incomplete
- The full parallel use of two graphics contexts is not yet ready,
even with Mingodad's patch about STR #2535, because there remains
some global variables (e.g., fl_color_, the current color)
- Thus, there remains much work to hunt for these variables and
be sure not to forget any
- Switch between surfaces (and associated graphics drivers)
is very simple and fast:
my_surface->set_current()
But I agree there's much clutter of friend functions in the
Fl_Graphics_Driver class. And I'm ready to make them public
if it's deemed preferable.
What are the current plans for the full 1.3 release ?
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev