The Trunk: Morphic-nice.688.mcz

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

The Trunk: Morphic-nice.688.mcz

commits-2
Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-nice.688.mcz

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

Name: Morphic-nice.688
Author: nice
Time: 24 September 2013, 10:54:16.251 pm
UUID: 7b57dab8-7c00-4e16-b325-d311d5f39748
Ancestors: Morphic-nice.687

Also remove presentation* usage from MultiCompositionScanner

=============== Diff against Morphic-nice.687 ===============

Item was changed:
  ----- Method: MultiCompositionScanner>>composeFrom:inRectangle:firstLine:leftSide:rightSide: (in category '*Morphic-Text Support-scanning') -----
  composeFrom: startIndex inRectangle: lineRectangle
  firstLine: firstLine leftSide: leftSide rightSide: rightSide
  "Answer an instance of TextLineInterval that represents the next line in the paragraph."
  | runLength stopCondition |
  "Set up margins"
  leftMargin := lineRectangle left.
  leftSide ifTrue: [leftMargin := leftMargin +
  (firstLine ifTrue: [textStyle firstIndent]
  ifFalse: [textStyle restIndent])].
  destX := spaceX := leftMargin.
  firstDestX := destX.
  rightMargin := lineRectangle right.
  rightSide ifTrue: [rightMargin := rightMargin - textStyle rightIndent].
  lastIndex := startIndex. "scanning sets last index"
  destY := lineRectangle top.
  lineHeight := baseline := 0.  "Will be increased by setFont"
  self setStopConditions. "also sets font"
  runLength := text runLengthFor: startIndex.
  runStopIndex := (lastIndex := startIndex) + (runLength - 1).
  line := (TextLine start: lastIndex stop: 0 internalSpaces: 0 paddingWidth: 0)
  rectangle: lineRectangle.
- presentationLine := (TextLine start: lastIndex stop: 0 internalSpaces: 0 paddingWidth: 0)
- rectangle: lineRectangle.
- numOfComposition := 0.
  spaceCount := 0.
  self handleIndentation.
  leftMargin := destX.
  line leftMargin: leftMargin.
- presentationLine leftMargin: leftMargin.
 
- presentation := TextStream on: (Text fromString: (WideString new: text size)).
-
  [stopCondition := self scanCharactersFrom: lastIndex to: runStopIndex
  in: text string rightX: rightMargin stopConditions: stopConditions
  kern: kern.
  "See setStopConditions for stopping conditions for composing."
+ self perform: stopCondition] whileFalse.
+
+ ^ line
+ lineHeight: lineHeight + textStyle leading
+ baseline: baseline + textStyle leading!
- (self perform: stopCondition)
- ifTrue: [presentationLine lineHeight: lineHeight + textStyle leading
- baseline: baseline + textStyle leading.
- ^ line lineHeight: lineHeight + textStyle leading
- baseline: baseline + textStyle leading]] repeat!