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

J. Vuletich (mail lists) juanlists at jvuletich.org
Sat Oct 11 12:00:43 UTC 2014


Hi Tim,

What do you get if you evaluate:

f _ Form extent: 8 at 8 depth: 16.
f32 _ f asFormOfDepth: 32.
{f colorAt: 1 at 1. f32 colorAt: 1 at 1 }

If you get transparent twice, then the problem is not in  
#formOfDepth:, but in your Scratch filters... If that is the case, an  
alternative to fixing them to support 16bpp would be to do all the  
stuff in 32bpp.

Can you prepare an image for us to try? It would help us give better answers.

Cheers,
Juan Vuletich

Quoting tim Rowledge <tim at rowledge.org>:

> I have Form of 16bpp, which results from rotating a ColorForm with  
> WarpBlt. This 16bpp form displays ‘properly’ when painted onto  
> another form such as the Display. So far so good.
>
> If I run it through my Scratch filters (which do fun things like  
> colour warping, whirling and pixellating) it all goes horribly  
> wrong; the once transparent areas are now solid black instead. This  
> makes me very sad :-(
>
> The culprit appears to be #asFormOfDepth: and in particular the  
> recently added (ok, 2008 vintage) fiddle to stuff 16rFF into the top  
> byte of each pixel. I kinda see the logic of this newfangled bit  
> poking but suspect that it needs to be done a touch more cleverly  
> and should avoid pixels where transparency is expected. Or maybe the  
> bitblt code for paint needs some futzing?
>
> Anybody feeling familiar with this stuff and able to explain it a bit more?
>
> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> Useful Latin Phrases:- Sentio aliquos togatos contra me conspirare =  
> I think some people in togas are plotting against me.





More information about the Squeak-dev mailing list