[BUG] BalloonCanvas>>translucentImage:at: gets a DNU because of nil fillColor.

Ned Konz ned at squeakland.org
Sat May 1 19:27:48 UTC 2004


I Just ran into this because of some buggy code of mine.
Display depth is 16, form is 16 bits deep, canvas is 16 bits deep.

BalloonCanvas>>frameRectangle: r width: w color: c
	"Draw a frame around the given rectangle"
	^self frameAndFillRectangle: r
			fillColor: nil
			borderWidth: w
			borderColor: c

but then in
FormCanvas>>frameAndFillRectangle:fillColor:borderWidth:borderColor: 
it asks fillColor (which is nil) if it's translucent...

	borderColor isTransparent ifFalse:[
		self setFillColor: borderColor.
		(r area > 10000 or: [fillColor isTranslucent]) ifTrue: [
			port frameRect: rect borderWidth: borderWidth.

Changing BalloonCanvas>>frameRectangle:width:color: to use 'Color
transparent' instead of nil kept it from blowing up, but I'm not sure
that's the best fix.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SqueakDebug.log
Type: application/octet-stream
Size: 3977 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040501/f1fc83c8/SqueakDebug.obj


More information about the Squeak-dev mailing list