Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1703.mcz==================== Summary ====================
Name: Morphic-mt.1703
Author: mt
Time: 15 October 2020, 2:37:53.810368 pm
UUID: eb57dc13-e48d-4748-902e-8407ec0634a9
Ancestors: Morphic-mt.1702, Morphic-stlu.1682
Merges fix for canvas transformation from Morphic-stlu.1682.
=============== Diff against Morphic-mt.1702 ===============
Item was changed:
----- Method: FormCanvas>>transformBy:clippingTo:during:smoothing: (in category 'drawing-support') -----
+ transformBy: aDisplayTransform clippingTo: aClipRect during: aBlock smoothing: cellSize
- 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: [
+ ^ self
+ translateBy: (aDisplayTransform localPointToGlobal: 0@0) truncated
+ clippingTo: aClipRect
+ during: aBlock].
- (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.
warp cellSize: cellSize.
"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])].
subCanvas
translateBy: patchRect topLeft negated
during: aBlock.
warp sourceForm: subCanvas form; warpBits.
warp sourceForm: nil. subCanvas := nil "release space for next loop"]
!