[squeak-dev] The Trunk: Morphic-ct.2041.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Sep 13 10:21:17 UTC 2022
Christoph Thiede uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ct.2041.mcz
==================== Summary ====================
Name: Morphic-ct.2041
Author: ct
Time: 13 September 2022, 12:21:12.708695 pm
UUID: a8ebbbd7-0bfd-9241-8a0d-9bed28da4251
Ancestors: Morphic-ct.2039
Adds an optimization to TransformationMorph>>#extent: that also helps to avoid layout divergence/ever-shrinkage in TransformationMorphs with odd extents for now. Besides this patch, we should still consider a "preciseExtent" solution as described in the referenced issue.
=============== Diff against Morphic-ct.2039 ===============
Item was changed:
----- Method: TransformationMorph>>extent: (in category 'geometry') -----
extent: newExtent
+ "Optimization (see super). ct: Currently also used as a backstop to avoid layout divergence for odd extents caused by rounding errors for the bounds. In the future, we might want to try to remember the precise bounds in the receiver. See: http://lists.squeakfoundation.org/pipermail/squeak-dev/2022-August/221968.html"
+ self extent = newExtent ifTrue: [^ self].
+
self renderedMorph == self
ifTrue: [super extent: newExtent]
ifFalse: [
self adjustAfter: [
| scaleFactor |
scaleFactor := (self scale * newExtent r / self fullBounds extent r) max: 0.1.
self scale: (scaleFactor detentBy: 0.1 atMultiplesOf: 1.0 snap: false)]].!
More information about the Squeak-dev
mailing list
|