More on invisible icons bug in 32-bit depth
andreas.raab at gmx.de
Thu Feb 27 20:43:04 UTC 2003
I think you're seeing a problem which I've seen in Croquet all the time.
There are some rather obscure circumstances in which alpha extension from 16
to 32bpp is not correctly handled by BitBlt.
Here's a good one - go to 32bpp and evaluate:
translucentImage: PaintBoxMorph new imageForm
at: 0 at 0.
That should explain things. For this problem I've actually introduced a new
BitBlt rule a while ago - here's the example that'll solve the above
image := PaintBoxMorph new imageForm.
(BitBlt toForm: image)
combinationRule: 40; "fixAlpha:with:"
halftoneForm: (Bitmap with: 16rFF000000);
Display getCanvas translucentImage: image at: 0 at 0.
Note: I am aware that this will not help you (since Croquet's use of it is
very limited and can be controlled much easier) but it will help you
understanding the problem.
> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On
> Behalf Of Ned Konz
> Sent: Thursday, February 27, 2003 9:28 PM
> To: squeak-dev at lists.squeakfoundation.org
> Subject: More on invisible icons bug in 32-bit depth
> I've tracked it down into the drawing of the SketchMorph
> that's in the
> The stack at this point looks like this:
>  in SketchMorph(Morph)>>fullDrawOn:
>  in SketchMorph(Morph)>>imageForm:forRectangle:
> The problem is that after
> FormCanvas(Canvas)>>translucentImage:at:sourceRect: the form in the
> canvas has a transparent icon.
> If I go:
> aForm copy openAsMorph
> that is, take the form that's being drawn to the canvas and
> open it, I
> can see it fine.
> If I then do the same with the canvas' form at the end of the method,
> it's transparent.
> The code in Canvas>>translucentImage:at:sourceRect: is doing this:
> self image: aForm
> at: aPoint
> sourceRect: sourceRect
> rule: Form blend
> Why would this result in part of the image (the part that holds the
> thumbnail of the tool) being transparent?
> Is it maybe that we can't render smoothed forms as translucent in 32
> bits? The thumbnail has smoothing turned on:
> self form: (f magnify: f boundingBox by: (scaleX @
> scaleY) smoothing:
> Ned Konz
> GPG key ID: BEEA7EFE
More information about the Squeak-dev