[squeak-dev] The Trunk: Morphic-nice.531.mcz

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Sun May 8 16:57:42 UTC 2011


2011/5/8 Bert Freudenberg <bert at freudenbergs.de>:
>
> On 08.05.2011, at 11:35, commits at source.squeak.org wrote:
>
>> Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
>> http://source.squeak.org/trunk/Morphic-nice.531.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Morphic-nice.531
>> Author: nice
>> Time: 29 April 2011, 9:44:35.371 am
>> UUID: 1e81083b-8ec1-4a0b-b1ba-5c201990e70e
>> Ancestors: Morphic-ul.530
>>
>> Quick hack (#fixAlpha) to fix this bug:
>>
>> ((TextStyle defaultFont characterFormAt: $T) magnifyBy: 16) asMorph imageForm asMorph openInWorld
>>
>> This workaround just adds noise and don't solve the root cause.
>>
>> Anyway, invoking #translucentImage: with a non translucent argument just because an #isOpaque flag was not set in an ImageMorph is worth a refactoring IMHO
>>
>> =============== Diff against Morphic-ul.530 ===============
>>
>> Item was added:
>> + ----- Method: FormCanvas>>translucentImage:at:sourceRect: (in category 'drawing-images') -----
>> + translucentImage: aForm at: aPoint sourceRect: sourceRect
>> +     "Workaround because copying 16bits->32bits image does not fill the alpha channel"
>> +     super translucentImage: aForm at: aPoint sourceRect: sourceRect.
>> +     aForm isTranslucent ifFalse: [form fixAlpha]!
>
> This is a horrible place to put this "workaround". Drawing will usually go the Display, which usually is a HUGE bitmap. fixAlpha will touch all the pixels in that bitmap, even if you are drawing a tiny image.
>
> - Bert -
>
>

Then I have another workaround possible: invoke drawImage: instead of
translucentImage:
Would it be ok ?

Nicolas



More information about the Squeak-dev mailing list