Nicolas Cellier uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-nice.151.mcz ==================== Summary ==================== Name: ST80-nice.151 Author: nice Time: 29 September 2013, 4:35:30.085 pm UUID: bdd314c3-0f95-4519-82f0-dfc85b76d4a7 Ancestors: ST80-nice.150 Start using the CharacterScanner hierarchy instead of the Multi one. =============== Diff against ST80-nice.150 =============== Item was changed: ----- Method: Paragraph>>composeAll (in category 'composition') ----- composeAll "Compose a collection of characters into a collection of lines." | startIndex stopIndex lineIndex maximumRightX compositionScanner | lines := Array new: 32. lastLine := 0. maximumRightX := 0. text size = 0 ifTrue: [compositionRectangle := compositionRectangle withHeight: 0. ^maximumRightX]. startIndex := lineIndex := 1. stopIndex := text size. + compositionScanner := CompositionScanner new forParagraph: self. - compositionScanner := MultiCompositionScanner new forParagraph: self. [startIndex > stopIndex] whileFalse: [self lineAt: lineIndex put: (compositionScanner composeLine: lineIndex fromCharacterIndex: startIndex inParagraph: self). maximumRightX := compositionScanner rightX max: maximumRightX. startIndex := (lines at: lineIndex) last + 1. lineIndex := lineIndex + 1]. self updateCompositionHeight. self trimLinesTo: lineIndex - 1. ^ maximumRightX! Item was changed: ----- Method: Paragraph>>displayLines:affectedRectangle: (in category 'private') ----- displayLines: linesInterval affectedRectangle: affectedRectangle "This is the first level workhorse in the display portion of the TextForm routines. It checks to see which lines in the interval are actually visible, has the CharacterScanner display only those, clears out the areas in which display will occur, and clears any space remaining in the visibleRectangle following the space occupied by lastLine." + | topY firstLineIndex lastLineIndex lastLineIndexBottom | - | lineGrid topY firstLineIndex lastLineIndex lastLineIndexBottom | "Save some time by only displaying visible lines" firstLineIndex := self lineIndexOfTop: affectedRectangle top. firstLineIndex < linesInterval first ifTrue: [firstLineIndex := linesInterval first]. lastLineIndex := self lineIndexOfTop: affectedRectangle bottom - 1. lastLineIndex > linesInterval last ifTrue: [linesInterval last > lastLine ifTrue: [lastLineIndex := lastLine] ifFalse: [lastLineIndex := linesInterval last]]. lastLineIndexBottom := (self bottomAtLineIndex: lastLineIndex). ((Rectangle origin: affectedRectangle left @ (topY := self topAtLineIndex: firstLineIndex) corner: affectedRectangle right @ lastLineIndexBottom) intersects: affectedRectangle) ifTrue: [ " . . . (skip to clear-below if no lines displayed)" + DisplayScanner new - MultiDisplayScanner new displayLines: (firstLineIndex to: lastLineIndex) in: self clippedBy: affectedRectangle]. lastLineIndex = lastLine ifTrue: [destinationForm "Clear out white space below last line" fill: (affectedRectangle left @ (lastLineIndexBottom max: affectedRectangle top) corner: affectedRectangle bottomRight) rule: rule fillColor: self backgroundColor]! |
Free forum by Nabble | Edit this page |