Form manipulation from a Plugin
diegogomezdeck at consultar.com
diegogomezdeck at consultar.com
Tue Apr 8 07:13:28 UTC 2003
Andreas,
Thanks (again) for your anwsers.
The problem seems to be the bug/optimization in BitBlt you talked about.
I'm working with 32bits forms, and sometimes this forms cames from 16bits
ones. I assume the fix includes the VM re-generation-compilation, isn't
it? There are any posible workaround to try until the fix propagate all
over the VMs?
Thanks,
Diego
> Diego,
>
>> But I still don't find the way to get the alpha part of
>> pixel. With this code:
>>
>> alpha := (pixel bitAnd: 16rFF000000) >> 24.
>>
>> alpha is always 0. Is It the way to get the alpha part for
>> pixels in 32 bits Forms?
>
> The code is correct. If you don't see any alpha in those pixels there's
> a good chance that the form does not include alpha. Note that this may
> happen, for example, when you blt 16 to 32bpp forms (this is a ... hm
> ... sorta bug/optimization in BitBlt).
>
> Oh, just thinking about it - you may have a problem with the above due
> to signed/unsigned shifts in C. Try something like:
>
> alpha := (pixel >> 24) bitAnd: 255.
>
> (which will make sure you get a positive integer).
>
> Cheers,
> - Andreas
More information about the Squeak-dev
mailing list
|