tim Rowledge uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-tpr.241.mcz
==================== Summary ====================
Name: Graphics-tpr.241 Author: tpr Time: 30 September 2013, 4:09:51.588 pm UUID: 61719896-2cc1-4c63-b5b7-fa0f97c9a01d Ancestors: Graphics-nice.240
Change from TextComposer characterForColumnBreak to Character characterForColumnBreak
=============== Diff against Graphics-nice.240 ===============
Item was changed: ----- Method: CharacterScanner class>>initialize (in category 'class initialization') ----- initialize " CharacterScanner initialize " | a | a := TextStopConditions new. a at: 1 + 1 put: #embeddedObject. a at: Space asciiValue + 1 put: #space. a at: Tab asciiValue + 1 put: #tab. a at: CR asciiValue + 1 put: #cr. a at: Character lf asciiValue + 1 put: #cr. DefaultStopConditions := a copy.
ColumnBreakStopConditions := a copy. + ColumnBreakStopConditions at: Character characterForColumnBreak asciiValue + 1 put: #columnBreak. - ColumnBreakStopConditions at: TextComposer characterForColumnBreak asciiValue + 1 put: #columnBreak.
PaddedSpaceCondition := a copy. PaddedSpaceCondition at: Space asciiValue + 1 put: #paddedSpace.
MeasuringStopConditions := TextStopConditions new!
Item was changed: ----- Method: TextComposer class>>characterForColumnBreak (in category 'as yet unclassified') ----- characterForColumnBreak
+ ^Character characterForColumnBreak! - ^Character value: 12!
Item was changed: ----- Method: TextComposer>>composeEachRectangleIn: (in category 'as yet unclassified') ----- composeEachRectangleIn: rectangles
| myLine lastChar |
1 to: rectangles size do: [:i | currCharIndex <= theText size ifFalse: [^false]. myLine := scanner composeFrom: currCharIndex inRectangle: (rectangles at: i) firstLine: isFirstLine leftSide: i=1 rightSide: i=rectangles size. lines addLast: myLine. actualHeight := actualHeight max: myLine lineHeight. "includes font changes" currCharIndex := myLine last + 1. lastChar := theText at: myLine last. (CharacterSet crlf includes: lastChar) ifTrue: [^#cr]. wantsColumnBreaks ifTrue: [ + lastChar = Character characterForColumnBreak ifTrue: [^#columnBreak]. - lastChar = TextComposer characterForColumnBreak ifTrue: [^#columnBreak]. ]. ]. ^false!
Item was changed: ----- Method: TextComposer>>slideOneLineDown (in category 'as yet unclassified') ----- slideOneLineDown
| priorLine |
"Having detected the end of rippling recoposition, we are only sliding old lines" prevIndex < prevLines size ifFalse: [ "There are no more prevLines to slide." ^nowSliding := possibleSlide := false ].
"Adjust and re-use previously composed line" prevIndex := prevIndex + 1. priorLine := (prevLines at: prevIndex) slideIndexBy: deltaCharIndex andMoveTopTo: currentY. lines addLast: priorLine. currentY := priorLine bottom. currCharIndex := priorLine last + 1. wantsColumnBreaks ifTrue: [ priorLine first to: priorLine last do: [ :i | + (theText at: i) = Character characterForColumnBreak ifTrue: [ - (theText at: i) = TextComposer characterForColumnBreak ifTrue: [ nowSliding := possibleSlide := false. ^nil ]. ]. ]. !
packages@lists.squeakfoundation.org