Chris Muller uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-cmm.440.mcz==================== Summary ====================
Name: Morphic-cmm.440
Author: cmm
Time: 12 June 2010, 11:32:14.026 am
UUID: dab5a1c8-5dee-4dd9-977f-ea610a6a9a77
Ancestors: Morphic-nice.439
Fix for composing Text's with TextAnchors as first character.
=============== Diff against Morphic-nice.439 ===============
Item was changed:
----- Method: TextComposer>>composeLinesFrom:to:delta:into:priorLines:atY:textStyle:text:container:wantsColumnBreaks: (in category 'as yet unclassified') -----
composeLinesFrom: argStart to: argStop delta: argDelta into: argLinesCollection priorLines: argPriorLines atY: argStartY textStyle: argTextStyle text: argText container: argContainer wantsColumnBreaks: argWantsColumnBreaks
wantsColumnBreaks := argWantsColumnBreaks.
lines := argLinesCollection.
theTextStyle := argTextStyle.
theText := argText.
theContainer := argContainer.
deltaCharIndex := argDelta.
currCharIndex := startCharIndex := argStart.
stopCharIndex := argStop.
prevLines := argPriorLines.
currentY := argStartY.
maxRightX := theContainer left.
possibleSlide := stopCharIndex < theText size and: [theContainer isMemberOf: Rectangle].
nowSliding := false.
prevIndex := 1.
scanner := CompositionScanner new text: theText textStyle: theTextStyle.
scanner wantsColumnBreaks: wantsColumnBreaks.
+ defaultLineHeight := scanner canComputDefaultLineHeight
+ ifTrue: [ scanner computeDefaultLineHeight ]
+ ifFalse: [ theTextStyle lineGrid. ].
- defaultLineHeight := scanner computeDefaultLineHeight.
isFirstLine := true.
self composeAllLines.
isFirstLine ifTrue: ["No space in container or empty text"
self
addNullLineWithIndex: startCharIndex
andRectangle: (theContainer topLeft extent: 0@defaultLineHeight)
] ifFalse: [
self fixupLastLineIfCR
].
^{lines asArray. maxRightX}
!