[squeak-dev] The Trunk: Graphics-nice.273.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Oct 21 21:37:13 UTC 2013


Nicolas Cellier uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-nice.273.mcz

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

Name: Graphics-nice.273
Author: nice
Time: 21 October 2013, 11:36:10.721 pm
UUID: a7c8e75f-b867-420c-ab01-2421ad9cc3ed
Ancestors: Graphics-nice.272

Now that we align embedded objetcs bottom on baseline, we must adjust the line height correspondingly on CompositionScanner....

=============== Diff against Graphics-nice.272 ===============

Item was changed:
  ----- Method: CompositionScanner>>placeEmbeddedObject: (in category 'private') -----
  placeEmbeddedObject: anchoredMorph
  	| w descent |
  	"Workaround: The following should really use #textAnchorType"
  	anchoredMorph relativeTextAnchorPosition ifNotNil:[^true].
  	w := anchoredMorph width.
  	(destX + w > rightMargin and: [(leftMargin + w) <= rightMargin or: [lastIndex > line first]])
  		ifTrue: ["Won't fit, but would on next line"
  				^ false].
  	destX := destX + w + kern.
  	descent := lineHeight - baseline.
+ 	baseline := baseline max: anchoredMorph height.
+ 	lineHeight := baseline + descent.
- 	lineHeight := lineHeight max: anchoredMorph height.
- 	baseline := lineHeight - descent.
  	^ true!



More information about the Squeak-dev mailing list