[squeak-dev] The Trunk: Morphic-nice.535.mcz

commits at source.squeak.org commits at source.squeak.org
Sun May 8 19:14:30 UTC 2011


Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-nice.535.mcz

==================== Summary ====================

Name: Morphic-nice.535
Author: nice
Time: 8 May 2011, 9:13:08.861 pm
UUID: eafc71e1-58d5-49fe-af7a-61fae4a4d716
Ancestors: Morphic-nice.534

Bert is right: revert my workaround for displaying 16 bits Form on 32 bits depth, since it fills the alpha channel of the whole destination form which is both wrong and suboptimal (think of large DisplayScreen).

Replace it with a less invasive workaround.

One day, we might fix BitBlt primitives, so maybe i should have put a #flag: but every other place doesn't...

=============== Diff against Morphic-nice.534 ===============

Item was changed:
  ----- Method: Canvas>>translucentImage:at:sourceRect: (in category 'drawing-images') -----
  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 shadowColor ifNotNil:[
  		^self stencil: aForm at: aPoint sourceRect: sourceRect color: self shadowColor].
+ 	(self depth < 32 or: [aForm depth < 16])
+ 		ifTrue: [^self paintImage: aForm at: aPoint sourceRect: sourceRect].
+ 	aForm depth = 16
+ 		ifTrue:
+ 			["workaround because BitBlt fail to fill the alpha channel"
+ 			^self paintImage: (aForm asFormOfDepth: 32) at: aPoint sourceRect: sourceRect].
- 	(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!

Item was removed:
- ----- Method: FormCanvas>>translucentImage:at:sourceRect: (in category 'drawing-images') -----
- translucentImage: aForm at: aPoint sourceRect: sourceRect
- 	"Workaround because copying 16bits->32bits image does not fill the alpha channel"
- 	super translucentImage: aForm at: aPoint sourceRect: sourceRect.
- 	aForm isTranslucent ifFalse: [form fixAlpha]!




More information about the Squeak-dev mailing list