But the fillstyle is only now aware of the canvas, not the morph (was neither before).
Agree with you on relative vs absolute coordinates though.
TC. Gary.
----- Original message ----- From: Igor Stasenko siguctua@gmail.com To: Squeak's User Interface e canv ui@lists.squeakfoundation.org Sent: Sun, 23 Mar 2008, 03:17:39 GMT Subject: Re: [UI] A small change... for a start 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.
On 23/03/2008, Gary Chambers gazzaguru2@btinternet.com wrote:
But the fillstyle is only now aware of the canvas, not the morph (was neither before).
Yes, it's not and shouldn't be. As far a morph provides a coordinates of areas to fill, only the fillstyle can choose how to fill them. An isXXXFill patterns is really shows that parts of fillstyle behavior are handled by external entities, which adds complexity and uncertainty to many places in code.
Agree with you on relative vs absolute coordinates though.
TC. Gary.