<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hi,</p>
<p><br>
</p>
<p>should it be a valid state for the World (not an arbitrary PasteUpMorph, but one that #isWorldMorph) to have a transparent TranslucentColor? The current implementation does not forbid this.</p>
<p><br>
</p>
<p>I know this would not make much sense, but I discovered a quite interesting rendering problem:</p>
<p><br>
</p>
<p></p>
<div></div>
<div>World color: (Color darkGray alpha: 0.2).</div>
<div>MagnifierMorph new openInWorld.</div>
<div>bg := BackgroundMorph new</div>
<div><span style="white-space:pre"></span>addMorph: Morph new;</div>
<div><span style="white-space:pre"></span>position: 200 @ 100;</div>
<div><span style="white-space:pre"></span>extent: 128 @ 128; "works"</div>
<div><span style="white-space:pre"></span>openInWorld.</div>
<div></div>
<div><br>
</div>
<div>Hover the BackgroundMorph, and the magnifier will work as expected.</div>
<div>Now do:</div>
<div><br>
</div>
<div>bg extent: 128 @ 127. "fails"</div>
<div><br>
</div>
<div>On my machine (SqueakCog, build <span>15341b5,</span> on Win1903), the magnifier now does not always display the BackgroundMorph but most of the time its background. I can also perceive some flickering, only few frames are rendered correctly.</div>
<div>I also tested other ratios, it seems as if the error occurs iff the BackgroundMorph's bounds area (number of pixels) is lower than 2e14.</div>
By debugging the <span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">number of unique colors in #magnifiedForm|form,
 I found out that the defect must occur somewhere in Display>>#copy:. Unfortunately, I could not reproduce it by stepping through the code.</span>
<p></p>
<p><br>
</p>
<p><span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">As said before, I see that a transparent World color is probably useless,
 but as I do not understand all relevant code entirely, I thought there could be a more general defect somewhere, beyond this situation.</span></p>
<p>tldr:<br>
</p>
<p></p>
<ol style="margin-bottom: 0px; margin-top: 0px;">
<li><span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">The given code piece produces a failure. Should we forbid transparent
 World colors?</span></li><li><span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">Where does this weird 2e14 limit come from?</span></li><li><span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">By the way: For testing, I turned the conditional in <span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">#magnifiedForm </span>off,
 in order to always call PasteUpMorph>>#patchAt:without:andNothingAbove:. The comment indicates that Display>>#copy: would be faster, but I could not measure any difference in performance. Is this conditional still needed? The
<span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">
#patchAt:without:andNothingAbove: variant also seems not to be affected by the described rendering issue.</span></span></li></ol>
<div><br>
</div>
<div>I would be very happy about your reactions :-)</div>
<div><br>
</div>
<div>Best,</div>
<div>Christoph</div>
<p></p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</body>
</html>