Jon, I think we're in agreement.

As regards extending libxmi-1.2 to a libxmi-2.0 whose first stage would be
useful in liXMI and libGWT, the first extension should certainly be to the
case of compound polygons.  I'll try to find the time for that.

>> Right now,
>> each function in the first stage draws pixels by invoking the macro
>> MI_PAINT_SPANS, which doesn't take `vis' as an argument.  Are you planning
>> to change that?
>
>Thank you for reminding me about those macros.  I think that most of them
>will vanish eventually.  The compile-time nature of those macros means that
>run-time API cutins (which are the core of the GGI library system) cannot
>be implemented at those points.

Agreed; in fact when designing the libxmi API, I almost added a way for the
user to specify a callback function that would be substituted at run time
for MI_PAINT_SPANS.  That seems to be more or less what you're proposing.

In fact, do you see any other reasonable run-time cut-ins for the first
stage code?  If the first stage is a pure span-generation module, for use
with fairly dumb targets that have no direct support for drawing arcs etc.,
I don't see anything else that could be optimized in a target-specific way.
Although maybe a new MI_PAINT_RECTANGLE callback could be substituted in a
few places for MI_PAINT_SPANS.

Your comments have also given me some ideas on the locking issue.  In
libXMI, do you think that a cache of rasterized arcs, or other primitives,
should be handled in the scan-generation code (by delegation to passed-in
locking primitives, in effect via a callback), or at a level above the
first stage?

The reason that I'm asking is that I'd like to keep our first stages
compatible.  I might be able to replace libxmi's stack-based locking scheme
for the arc cache without too much trouble.

In fact possibly the best thing for me to do, in libxmi-2.0, would be for
me to separate cleanly the two stages, and in the first stage, make
MI_PAINT_SPANS, MI_PAINT_RECTANGLE, and some_sort_of_locking_primitive,
specificable by the caller.  Any thoughts on this?

--Robert

Reply via email to