[squeak-dev] Custom FillStyles (Morphic)

Eric Gade eric.gade at gmail.com
Tue Dec 15 19:53:52 UTC 2020


Hello all,

Does anyone have pointers on creating highly-customized fill styles for
Morphs? I have some interface elements that require specific canvas drawing
operations as their fills.

I had originally done this work in Pharo, but they treat FillStyle
differently. In that system whenever Canvas >> fillRectangle:fillStyle: is
sent, the result is simply:
```
fillRectangle: aRect fillStyle: aFillStyle
    aFillStyle fillRectangle: aRect on: self
```
This gives each FillStyle subclass the chance to perform explicit
operations on the passed canvas.

I would like to keep this library (a recreation of the Platinum interface)
as cross platform as possible. Right now I see the following options:
1. Add a new kind of FillStyle check in the various Canvas operations that
require it (ie isSolidFill and friends), which requires modifying base
methods;
2. Forget using FillStyles at all and fold all drawing operations into my
Morphs themselves;
3. Something else

I'm hoping there's a slight chance someone on this list might have a #3!

Thanks for any pointers,

-- 
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20201215/27407634/attachment.html>


More information about the Squeak-dev mailing list