The Trunk: Graphics-pre.421.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Graphics-pre.421.mcz

commits-2
Patrick Rein uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-pre.421.mcz

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

Name: Graphics-pre.421
Author: pre
Time: 8 October 2019, 7:27:53.847422 pm
UUID: cb121a0d-60ea-3040-8790-f523931b51d0
Ancestors: Graphics-pre.420

After a discussion with mt this commit changes the message used to set the morph position during the placement of a Morph in the DisplayScanner to #setPositionFromLayout: as it is silent. Adds a comment explaining the problems with this call in general. (There is currently no other way to do this due to way DisplayScanner is used by Morphic)

=============== Diff against Graphics-pre.420 ===============

Item was changed:
  ----- Method: DisplayScanner>>placeEmbeddedObject:inlineGiven: (in category 'private') -----
  placeEmbeddedObject: anchoredMorphOrForm inlineGiven: textAnchorProperties
 
  | alignedPositionY position |
  alignedPositionY := self verticallyAlignEmbeddedObject: anchoredMorphOrForm given: textAnchorProperties.
  position := (destX + textAnchorProperties padding left) @ alignedPositionY.
  anchoredMorphOrForm isMorph
  ifTrue: [
  "We have to remove the offset passed to us from morphic as this embedded morph
  will only be rendered later on. We now only set the position. --pre"
+ self flag: #fishy. "Setting the position of the morph during drawing can be problematic --pre"
+ anchoredMorphOrForm setPositionFromLayout: position - morphicOffset]
- anchoredMorphOrForm layoutPosition: position - morphicOffset]
  ifFalse: ["we assume this to be a form"
+ self displayEmbeddedForm: anchoredMorphOrForm at: position].!
- self displayEmbeddedForm: anchoredMorphOrForm at: position].
- !