On 22/03/2008, Gary Chambers gazzaguru2@btinternet.com wrote:
The current experiment works by double dispatch to "simple" methods that were previously the main entry point on Canvas, for compatibility. So provides the flexibility of FillStyles to utilise the existing capabilities of various canvasses.
Ideally the whole thing could be restructured back to Canvas to efficiently deal with compositing. For the moment this achieves the overall aim without excessive redesign.
I think that your work with FillStyles highlighted some problems in Morphic, which cannot be handled as extension. For instance, a reason why morph asks if fillstyle isOrientedFill is to update a oriented fill origin point, when morph changes it's position.
Which, in own turn, shows that it was a bad design choice to specify origin of gradient in screen-space coordinates, instead of coordinates relative to morph.
But now, we can easily deal with that, because we dispatch to fill style. So, fill style can choose how it can fill, and using what coordinates - relative to morph or absolute. And finally, we can get rid isXXXFill protocol.