The Trunk: Graphics-tpr.230.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-tpr.230.mcz

commits-2
tim Rowledge uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-tpr.230.mcz

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

Name: Graphics-tpr.230
Author: tpr
Time: 25 September 2013, 2:51:05.665 pm
UUID: f0d541f1-e21f-49dc-b3b0-711ee49012e3
Ancestors: Graphics-tpr.229

alter TextComposer>>composeLinesFrom:to:delta:into:priorLines:atY:textStyle:text:container:wantsColumnBreaks: to decide which composition scanner it wants

=============== Diff against Graphics-tpr.229 ===============

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.
+ "choose an appropriate scanner - should go away soon, when they can be unified"
+ scanner := (theText string isOctetString
+ ifTrue:[CompositionScanner new]
+ ifFalse:[MultiCompositionScanner new]).
+ scanner text: theText textStyle: theTextStyle.
- scanner := CompositionScanner new text: theText textStyle: theTextStyle.
  scanner wantsColumnBreaks: wantsColumnBreaks.
  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}
 
  !