[plt-dev] update on experiment in re-implementing MrEd
> One piece of the puzzle is easy to split from the rest: implementing
> the `dc<%>' classes on top of Cairo.
I'm not gonna volunteer to do this, as I don't think I have time to
complete the job. However I couldn't stop myself fiddling around with
the code, and I've gone and implemented draw-rectangle for Cocoa (code
is not committed). Two points:
1. The Cairo code will be mostly generic, so I think there should be a
dc base class/mixin/trait in common
2. The Cairo drawing model is quite different to the dc model. dc is
immediate -- you call functions and the shapes appear immediately. The
Cairo model is to specify the path completely and only then stroke
and/or fill the path. Presumably this enables GPU optimisations. This
naturally leads to functions like line_to etc. The Cairo model also
goes beyond dc, offering alpha channel, masking, etc. No doubt you
know all this. How do you envisage extending the dc to offer these
features?
Cheers,
N.