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

tim Rowledge tim at rowledge.org
Sat Oct 11 03:37:24 UTC 2014


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