[squeak-dev] The Trunk: Morphic-bf.627.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Oct 9 22:02:41 UTC 2012

Bert Freudenberg uploaded a new version of Morphic to project The Trunk:

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

Name: Morphic-bf.627
Author: bf
Time: 9 October 2012, 3:00:33.903 pm
UUID: 2d7d0432-9723-4629-a850-3371eb3aca8b
Ancestors: Morphic-bf.626

For drawing rotated forms less than 32 bits deep, use Form paint rule.

=============== Diff against Morphic-bf.626 ===============

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 paint])].
- 					warp combinationRule: (self depth = 32 ifTrue: [Form blendAlphaScaled] ifFalse: [Form blend])].
  			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 Squeak-dev mailing list