[BUG] forms with bad alpha values?

Ned Konz ned at bike-nomad.com
Sun Sep 7 18:01:20 UTC 2003


On Sunday 07 September 2003 10:51 am, Ned Konz wrote:
> On Sunday 07 September 2003 10:02 am, Ned Konz wrote:
> > On Sunday 07 September 2003 09:42 am, Ned Konz wrote:
> > > I've been trying to fix the problem with disappearing Objects
> > > Tool buttons. I've got it all fixed except for the Paint tool.
> > > What's happening is that its form (a standard form) is
> > > rendering as transparent in depth 32.
> >
> > Which you can also see using:
> >
> > PartsBin clearThumbnailCache.
> > Display newDepth: 32.
> > quads _ OrderedCollection new.
> > PaintInvokingMorph  addPartsDescriptorQuadsTo: quads if: [:x |
> > true]. tuple _ quads first.
> > aClass _ Smalltalk at: tuple first.
> > t _ PartsBin thumbnailForQuad: tuple.
> > t openInHand.
>
> Or, more concisely:
>
> Display newDepth: 32.
> (SketchMorph withForm: PaintInvokingMorph newStandAlone imageForm)
> openInHand.

It looks like the alpha channel is being set to 0:

Display newDepth: 32.
f _ PaintInvokingMorph newStandAlone imageForm.
(f pixelValueAt: 30 at 30) hex  
	'16r884000'
f rgbaBitMasks collect: [ :ea | ea hex ]
 	#('16rFF0000' '16rFF00' '16rFF' '16rFF000000')
f colorAt: 30 at 30  
	Color transparent
(f asFormOfDepth: 16) colorAt: 30 at 30
	 (Color r: 0.548 g: 0.258 b: 0.0)

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE



More information about the Squeak-dev mailing list