<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">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<p>Just for interest, is this changeset still on your list? :)</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Thiede, Christoph<br>
<b>Gesendet:</b> Montag, 9. September 2019 15:01:09<br>
<b>An:</b> gettimothy via Squeak-dev<br>
<b>Betreff:</b> Re: [squeak-dev] TranslucentColor for World: Rendering issue</font>
<div> </div>
</div>
<div><style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<p>Hi,</p>
<p><br>
</p>
<p>how would you think about the attached change set?</p>
<p><br>
</p>
<p>> <span style="font-size:12pt">In a not so distant future, we want to revive worlds-in-worlds again. :-)</span></p>
<div>Sounds interesting :)</div>
<div><br>
</div>
<div><span style="font-size:12pt">> </span><span style="font-size:12pt">Never use "World". Use "Project current world" if you want to access the project's current world. For worlds-in-worlds, only "ActiveWorld" would return the correct world.</span><br>
</div>
<div><span style="font-size:12pt">Just for interest, what is "World" good for?</span></div>
<div><span style="font-size:12pt"><br>
</span></div>
<div><span style="font-size:12pt">Best,</span></div>
<div><span style="font-size:12pt">Christoph</span></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>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel<br>
<b>Gesendet:</b> Montag, 9. September 2019 09:09:09<br>
<b>An:</b> gettimothy via Squeak-dev<br>
<b>Betreff:</b> Re: [squeak-dev] TranslucentColor for World: Rendering issue</font>
<div> </div>
</div>
<div>
<div id="__MailbirdStyleContent" style="font-size:10pt; font-family:Arial; color:#000000">
> The given code piece produces a failure. Should we forbid transparent World colors?
<div><br>
</div>
<div>Only if that PasteUpMorph is the project's world. In a not so distant future, we want to revive worlds-in-worlds again. :-)</div>
<div><br>
</div>
<div><b>aWorldMorph == Project current world</b></div>
<div><br>
</div>
<div>For not yet running worlds, this might be a better check:</div>
<div><br>
</div>
<div><b>aWorldMorph owner isNil</b></div>
<div><br>
</div>
<div>Anyway, #isWorldMorph is not sufficient for this issue.</div>
<div><br>
</div>
<div>Best,</div>
<div>Marcel</div>
<div><br>
</div>
<div>P.S.: Never use "World". Use "Project current world" if you want to access the project's current world. For worlds-in-worlds, only "ActiveWorld" would return the correct world.</div>
<div><br>
</div>
<div class="mb_sig"></div>
<blockquote class="history_container" type="cite" style="border-left-style:solid; border-width:1px; margin-top:20px; margin-left:0px; padding-left:10px; min-width:500px">
<p style="color:#AAAAAA; margin-top:10px">Am 06.09.2019 21:33:45 schrieb Thiede, Christoph <christoph.thiede@student.hpi.uni-potsdam.de>:</p>
<div style="font-family:Arial,Helvetica,sans-serif">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<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><span style="font-size:10pt; color:#808080"></span></div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</body>
</html>