[Pkg] The Trunk: Morphic-bf.626.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Oct 9 21:43:05 UTC 2012


Bert Freudenberg uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-bf.626.mcz

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

Name: Morphic-bf.626
Author: bf
Time: 9 October 2012, 2:41:25.246 pm
UUID: 358e353f-679b-4fa3-80d3-ac01ce47b766
Ancestors: Morphic-ul.625

Fix rotated drawing of translucent morphs.

=============== Diff against Morphic-ul.625 ===============

Item was changed:
  ----- Method: FormCanvas>>transformBy:clippingTo:during:smoothing: (in category 'drawing-support') -----
  transformBy: aDisplayTransform clippingTo: aClipRect during: aBlock	 smoothing: cellSize
  
  	"Note: This method has been originally copied from TransformationMorph."
  	| innerRect patchRect sourceQuad warp start subCanvas |
  	(aDisplayTransform isPureTranslation) ifTrue:[
  		^aBlock value: (self copyOffset: aDisplayTransform offset negated truncated
  							clipRect: aClipRect)
  	].
  	"Prepare an appropriate warp from patch to innerRect"
  	innerRect := aClipRect.
  	patchRect := (aDisplayTransform globalBoundsToLocal: innerRect) truncated.
  	sourceQuad := (aDisplayTransform sourceQuadFor: innerRect)
  					collect: [:p | p - patchRect topLeft].
  	warp := self warpFrom: sourceQuad toRect: innerRect.
  
  	"Render the submorphs visible in the clipping rectangle, as patchForm"
  	start := (self depth = 1 and: [self isShadowDrawing not])
  		"If this is true B&W, then we need a first pass for erasure."
  		ifTrue: [1] ifFalse: [2].
  	start to: 2 do:
  		[:i | "If i=1 we first make a shadow and erase it for opaque whites in B&W"
  		subCanvas := self class extent: patchRect extent depth: self depth.
  		i=1	ifTrue: [subCanvas shadowColor: Color black.
  					warp combinationRule: Form erase]
  			ifFalse: [self isShadowDrawing ifTrue:
  					[subCanvas shadowColor: self shadowColor].
+ 					warp combinationRule: (self depth = 32 ifTrue: [Form blendAlphaScaled] ifFalse: [Form blend])].
- 					warp combinationRule: Form paint].
  		subCanvas
  			translateBy: patchRect topLeft negated
  			during: aBlock.
  		warp sourceForm: subCanvas form; cellSize: cellSize; warpBits.
  		warp sourceForm: nil.  subCanvas := nil "release space for next loop"]
  !



More information about the Packages mailing list