[squeak-dev] Form>asFormOfDepth: appears to break transparency

Casey Ransberger casey.obrien.r at gmail.com
Mon Oct 13 10:04:17 UTC 2014


He was probably overworked.

On Sun, Oct 12, 2014 at 6:01 AM, J. Vuletich (mail lists) <
juanlists at jvuletich.org> wrote:

>
> Quoting tim Rowledge <tim at rowledge.org>:
>
>  On 11-10-2014, at 12:23 PM, J. Vuletich (mail lists) <
>> juanlists at jvuletich.org> wrote:
>>
>>> Yes. In Squeak there is a bug in #asFormOfDepth: . The last lines are:
>>>
>>>         "Special case: For a 16 -> 32 bit conversion fill the alpha
>>> channel because it gets lost in translation."
>>>         (self depth = 16 and:[d= 32]) ifTrue:[newForm fillAlpha: 255].
>>>
>>> But they should be as in Cuis:
>>>
>>>         "If we build a 32bpp from one of smaller depth,
>>>         it will have zero in the alpha channel (until BitBlt is fixed!)"
>>>         d = 32 ifTrue: [
>>>                 newForm fixAlpha ].
>>>
>>> I think this should fix your problem.
>>>
>>
>> Yup. Given that there is a bitblt rule specifically to fix this problem,
>> and a method specifically provided to use said bitblt to specifically fix
>> this problem, I’m more than a bit puzzled as to why the most important bit
>> of code (to be specific) in the image that needs this specific bit of code,
>> doesn’t, specifically, have it. Even weirder is that Andreas wrote it and
>> five years later carefully rewrote asFormOfDepth: to deal with this problem
>> *and didn’t use his own careful fix*.
>>
>
> Yes. I'm puzzled too. Anybody can shed some light on this?
>
> In any case, the Cuis way works.
>
>
>>> Besides, the sample code I sent gets transparent, although the stuff in
>>> the Form, 16rFF000000, is opaque black. This is because of another bug,
>>> this one at #colorFromPixelValue:depth: . I suggest taking the code
>>> verbatim from Cuis.
>>>
>>
>> Probably a good idea.
>>
>> tim
>> --
>> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
>> Useful random insult:- Can't find log base two of 65536 without a
>> calculator.
>>
>
> Cheers,
> Juan Vuletich
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20141013/9ef3439d/attachment.htm


More information about the Squeak-dev mailing list