[squeak-dev] Morph corner radius set to 8 does surprising things
tim Rowledge
tim at rowledge.org
Tue Dec 6 05:26:58 UTC 2016
> On 05-12-2016, at 6:57 PM, Bob Arning <arning315 at comcast.net> wrote:
>
> This method in HandMorph seems to have a view of corner rounding that depends on a particular corner geometry.
Thanks; that seems to be the responsible method. I’m quite at a loss to explain what was being thought of for the hack. Most … unusual.
> You might try changing the highlighted code to
>
>
>
> nPix := cacheCanvas form tallyPixelValues first.
> "--> begin rounded corners hack <---"
> cachedCanvasHasHoles := true "(nPix = 48
> and: [submorphs size = 1 and: [submorphs first wantsRoundedCorners]])
> ifTrue: [false]
> ifFalse: [nPix > 0]".
> "--> end rounded corners hack <—"
Instead of simply forcing cachedCanvasHasHoles to be true, it seems to work cleanly with
cachedCanvasHasHoles := nPix >0.
which at least makes use of the tallyPixelValues first - which is quite a bit of work.
tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Useful random insult:- Wasn't fully debugged before being released.
More information about the Squeak-dev
mailing list
|