Please find the attached screenshots. For the two magnified ones, I have added a rectangle with an outset of 2 in the background, so if the round rect is touching the black border, it has occluding pixels.<br>
<br>
Looking forward to your review/feedback!<br>
<br>
Best,<br>
Christoph<br>
<br>
<font color="#808080">---<br>
</font><font color="#808080"><i>Sent from </i></font><font color="#808080"><i><a href="https://github.com/hpi-swa-lab/squeak-inbox-talk"><u><font color="#808080">Squeak Inbox Talk</font></u></a></i></font><br>
<br>
On 2022-05-20T20:50:12+00:00, commits@source.squeak.org wrote:<br>
<br>
> A new version of Morphic was added to project The Inbox:<br>
> http://source.squeak.org/inbox/Morphic-ct.1998.mcz<br>
> <br>
> ==================== Summary ====================<br>
> <br>
> Name: Morphic-ct.1998<br>
> Author: ct<br>
> Time: 20 May 2022, 10:50:05.367428 pm<br>
> UUID: 8ff0b2bd-e9c1-8a40-b996-c5e4e6278b63<br>
> Ancestors: Morphic-ct.1996<br>
> <br>
> Proposal to fix protruding pixels in rounded rects. This can be reproduced as follows:<br>
> <br>
>     Turn on the preference #alternateHandlesLook and blue-drag any morph to the left/to the bottom.<br>
>     <br>
>     Alternatively, do the following:<br>
>     <br>
>         m := RectangleMorph new.<br>
>         <br>
>         m borderWidth: 0.<br>
>         m useRoundedCorners.<br>
>         m color: Color blue.<br>
>         m fillStyle: ((GradientFillStyle ramp: {0.0 -> Color red. 1.0 -> Color blue})<br>
>             origin: m topLeft;<br>
>             direction: m extent;<br>
>             yourself).<br>
>         <br>
>         m openInWorld.<br>
>         m position: 100 asPoint.<br>
>         <br>
>         m left: m left - 1. "evaluate"<br>
>         m left: m left - 1. "step"<br>
>         m left: m left - 1. "by"<br>
>         m left: m left - 1. "step"<br>
> <br>
> Debugging reveals that the BalloonCanvas draws some pixels outside of the bounds of the morph, so the damage is not recorded properly (all screenshots will be sent in a follow-up email).<br>
> <br>
> This proposed fix effectively reverts Morphic-MAD.203 and restores the original version of BalloonCanvas>>#makeRoundRectShape:radius: (ar 7/22/2009 21:34) from Morphic-ar.136 by Andreas Raab (just made the formatting consistent). The patch of Michael Davies seemed suspicious to me, here is his version message:<br>
> <br>
>     Name: Morphic-MAD.203<br>
>     Author: MAD<br>
>     Time: 6 October 2009, 7:24:39 am<br>
>     UUID: 3098c8d3-ea9e-4db8-910e-53d9bf57f9e2<br>
>     Ancestors: Morphic-ar.202<br>
> <br>
>     Hack to fix problem with rounding of buttons - I'm happy to take advice on how to address the underlying problem. [...]<br>
> <br>
> I cannot make any sense out of this. Neither in a current Trunk image nor in an old Squeak 4.4 image, I can find any rounding problems with buttons when I revert to Andreas' original implementation. A pixel-by-pixel comparison only shows that Michael's version draws pixels outside of the bounds, but otherwise, both rectangles look identical (none of them are rendered symmetrically, by the way). In order to fix the obvious problem, I propose to revert to the original version.<br>
> <br>
> =============== Diff against Morphic-ct.1996 ===============<br>
> <br>
> Item was changed:<br>
>   ----- Method: BalloonCanvas>>makeRoundRectShape:radius: (in category 'private') -----<br>
>   makeRoundRectShape: aRectangle radius: radius<br>
>       "decompose a rounded rectangle into bezier form"<br>
>       | ovalDiameter rectExtent segments points endPoint seg idx offset rectOffset |<br>
>       ovalDiameter := (radius * 2) asPoint min: aRectangle extent.<br>
>       (ovalDiameter x <= 0 or: [ovalDiameter y <= 0]) ifTrue: [<br>
>           "degenerates into rectangle - just hand back four lines"<br>
>           | topLeft topRight bottomLeft bottomRight |<br>
>           topLeft := aRectangle topLeft.<br>
>           topRight := aRectangle topRight.<br>
>           bottomLeft := aRectangle bottomLeft.<br>
>           bottomRight := aRectangle bottomRight.<br>
>   <br>
>           points := Array new: 4 * 3.<br>
>           points at: 1 put: topLeft.<br>
>           points at: 2 put: topLeft.<br>
>           points at: 3 put: topRight.<br>
>   <br>
>           points at: 4 put: topRight.<br>
>           points at: 5 put: topRight.<br>
>           points at: 6 put: bottomRight.<br>
>   <br>
>           points at: 7 put: bottomRight.<br>
>           points at: 8 put: bottomRight.<br>
>           points at: 9 put: bottomLeft.<br>
>   <br>
>           points at: 10 put: bottomLeft.<br>
>           points at: 11 put: bottomLeft.<br>
>           points at: 12 put: topLeft.<br>
>           ^points<br>
>       ].<br>
>       rectExtent := aRectangle extent - ovalDiameter.<br>
>       rectOffset := aRectangle origin.<br>
>       segments := Bezier2Segment makeEllipseSegments: (0 @ 0 extent: ovalDiameter).<br>
>       "patch up the segments to include lines connecting the oval parts.<br>
>       we need: 8*3 points for the oval parts + 4*3 points for the connecting lines"<br>
>       points := Array new: 12 * 3.<br>
>       idx := 0.<br>
> +     endPoint := segments last end + rectOffset.<br>
> -     "Tweaked offsets to clean up curves. MAD"<br>
> -     endPoint := segments last end + rectOffset + (0 @ -1).<br>
>       1 to: 8 by: 2 do: [:i |<br>
> +         i = 1 ifTrue: [offset := rectOffset + (rectExtent x @ 0)].<br>
> +         i = 3 ifTrue: [offset := rectOffset + rectExtent].<br>
> +         i = 5 ifTrue: [offset := rectOffset + (0 @ rectExtent y)].<br>
> +         i = 7 ifTrue: [offset := rectOffset].<br>
> -         i = 1 ifTrue: [offset := rectOffset + (rectExtent x @ 0) + (1 @ -1)]. "top, tr"<br>
> -         i = 3 ifTrue: [offset := rectOffset + rectExtent + (1 @ 1)]. "right, br"<br>
> -         i = 5 ifTrue: [offset := rectOffset + (0 @ rectExtent y) + (0 @ 1)]. "bottom, bl"<br>
> -         i = 7 ifTrue: [offset := rectOffset + (0 @ -1)]."left, tl"<br>
>           seg := segments at: i.<br>
>           "insert a line segment for the horizontal part of the round rect"<br>
>           points at: (idx := idx + 1) put: endPoint.<br>
>           points at: (idx := idx + 1) put: endPoint.<br>
>           points at: (idx := idx + 1) put: seg start + offset.<br>
>           "now the first half-arc"<br>
>           points at: (idx := idx + 1) put: seg start + offset.<br>
>           points at: (idx := idx + 1) put: seg via + offset.<br>
>           points at: (idx := idx + 1) put: seg end + offset.<br>
>           "the second half-arc"<br>
>           seg := segments at: i + 1.<br>
>           points at: (idx := idx + 1) put: seg start + offset.<br>
>           points at: (idx := idx + 1) put: seg via + offset.<br>
>           points at: (idx := idx + 1) put: seg end + offset.<br>
>           endPoint := seg end + offset.<br>
>       ].<br>
>       ^points!<br>
> <br>
> <br>
["alternateHandlesDamage.png"]<br>
["roundRectDamage.png"]<br>
["roundRectMichael.png"]<br>
["roundRectAndreas.png"]