<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">On Mon, Oct 15, 2018 at 1:17 PM tim Rowledge <<a href="mailto:tim@rowledge.org">tim@rowledge.org</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><br>
<br>
> On 2018-10-15, at 1:57 AM, <a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a> wrote:<br>
> <br>
> Patrick Rein uploaded a new version of Graphics to project The Trunk:<br>
> <a href="http://source.squeak.org/trunk/Graphics-pre.404.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/trunk/Graphics-pre.404.mcz</a><br>
> <br>
> ==================== Summary ====================<br>
> <br>
> Name: Graphics-pre.404<br>
> Author: pre<br>
> Time: 15 October 2018, 9:57:15.384742 am<br>
> UUID: a816199d-b2b6-7247-a8f8-898c605829df<br>
> Ancestors: Graphics-pre.403<br>
> <br>
> Removes odd behavior of colorFromPixelValue:depth: which returns transparent instead of 32bit rgb black<br>
<br>
Umm, as best I remember we expect and require 32bit 0.0.0.0 to be transparent. It is an artefact from way back and has caused much confusion; but a lot of code is based on it.<br></blockquote><div><br></div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">0-0-0-0 is transparent because alpha is 0, that is not the issue. But 255-0-0-0 also used to be treated as transparent because that's what you get when converting from a 16 bit form, in which 0-0-0 is treated as transparent by certain bitblt rules, whereas 0-0-1 is black. Cf. fixAlpha.</div></div><div><br></div><div><div>(Color black pixelValueForDepth: 16)<span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"> hex</span></div><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">=> 16r000</span>1</div><div>(Color black pixelValueForDepth: 32) hex</div><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">=></span> 16rFF000001</div></div><div><br></div><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">(</span>Color transparent pixelValueForDepth: 16)<span class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,0)"> hex</span><br></div><div><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,0)">=> 16r0000</span></div></div><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">(</span>Color transparent pixelValueForDepth: 32<span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">) hex</span><br></div><div><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,0)">=> 16r00000000</span></div></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
If you've found a way to avoid it and not break all that code - or better yet, I'm misremembering! - then good.<br>
</blockquote><div> </div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">We're not doing a lot of 16/32 bpp conversions nowadays so I expect we won't run into too many issues. Someone should check the bitblt rules to see which ones treat the x-0-0-0 value specially.</div></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"><br></div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">- Bert -</div><br></div></div></div></div></div></div></div></div></div></div>