[ENH]Translucent images in 8 and 16 bit screen resolution

karl karl.ramberg at chello.se
Sat Dec 16 20:46:34 UTC 2006


Images with alpha translucency will now keep the translucency in 8 and 
16 bit screen resolution. (Rotated forms will not, that has to do with 
WarpBlt internals I don't really understand yet.) It would be nice if 
people could play with this enhancement and report any issues.
Karl
-------------- next part --------------
'From OLPC2.0 of ''24 October 2006'' [latest update: #1141] on 15 December 2006 at 3:09:23 pm'!

!Canvas methodsFor: 'drawing-images' stamp: 'kfr 12/15/2006 14:54'!
translucentImage: aForm at: aPoint sourceRect: sourceRect
	"Draw a translucent image using the best available way of representing translucency.
	Note: This will be fixed in the future."
	self shadowColor ifNotNil:[
		^self stencil: aForm at: aPoint sourceRect: sourceRect color: self shadowColor].
	(self depth < 32 and:[aForm depth > 16])
		ifTrue:[^self image: aForm at: aPoint sourceRect: sourceRect rule: 34].
	(self depth < 32 or:[aForm isTranslucent not]) 
		ifTrue:[^self paintImage: aForm at: aPoint sourceRect: sourceRect].
	self image: aForm
		at: aPoint
		sourceRect: sourceRect
		rule: Form blend! !



More information about the Squeak-dev mailing list