[Pkg] The Trunk: Morphic-tpr.685.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Sep 24 01:37:58 UTC 2013
tim Rowledge uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-tpr.685.mcz
==================== Summary ====================
Name: Morphic-tpr.685
Author: tpr
Time: 23 September 2013, 6:36:31.495 pm
UUID: eff53ed1-eaf5-430f-9df8-eb689ec01ed5
Ancestors: Morphic-nice.684
Remove unused
TextMorph>>drawOnTest:
MultiNewParagraph>>displayOnTest:using:at:
FormCanvas>>paragraph3:bounds:color:
GrafPort>>displayScannerForMulti:foreground:background:ignoreColorChanges:
and replace a couple of usages of MultiNewParagraph by plain NewParagraph as part of tidying up scanners et al.
=============== Diff against Morphic-nice.684 ===============
Item was removed:
- ----- Method: FormCanvas>>paragraph3:bounds:color: (in category 'drawing') -----
- paragraph3: para bounds: bounds color: c
-
- | scanner |
- self setPaintColor: c.
- scanner := (port clippedBy: (bounds translateBy: origin)) displayScannerForMulti: para
- foreground: (self shadowColor ifNil:[c]) background: Color transparent
- ignoreColorChanges: self shadowColor notNil.
- para displayOnTest: (self copyClipRect: bounds) using: scanner at: origin+ bounds topLeft.
- !
Item was changed:
----- Method: GrafPort>>displayScannerFor:foreground:background:ignoreColorChanges: (in category 'accessing') -----
displayScannerFor: para foreground: foreColor background: backColor ignoreColorChanges: shadowMode
+ ((para isMemberOf: NewParagraph) or: [para text string isByteString]) ifTrue: [
- ((para isMemberOf: MultiNewParagraph) or: [para text string isByteString]) ifTrue: [
^ (MultiDisplayScanner new text: para text textStyle: para textStyle
foreground: foreColor background: backColor fillBlt: self
ignoreColorChanges: shadowMode)
setPort: self clone
].
^ (DisplayScanner new text: para text textStyle: para textStyle
foreground: foreColor background: backColor fillBlt: self
ignoreColorChanges: shadowMode)
setPort: self clone
!
Item was removed:
- ----- Method: GrafPort>>displayScannerForMulti:foreground:background:ignoreColorChanges: (in category 'accessing') -----
- displayScannerForMulti: para foreground: foreColor background: backColor ignoreColorChanges: shadowMode
-
- ((para isMemberOf: MultiNewParagraph) or: [para text string isByteString]) ifTrue: [
- ^ (MultiDisplayScanner new text: para presentationText textStyle: para textStyle
- foreground: foreColor background: backColor fillBlt: self
- ignoreColorChanges: shadowMode)
- setPort: self clone
- ].
- ^ (DisplayScanner new text: para text textStyle: para textStyle
- foreground: foreColor background: backColor fillBlt: self
- ignoreColorChanges: shadowMode)
- setPort: self clone
- !
Item was removed:
- ----- Method: MultiNewParagraph>>displayOnTest:using:at: (in category 'fonts-display') -----
- displayOnTest: aCanvas using: displayScanner at: somePosition
- "Send all visible lines to the displayScanner for display"
-
- | visibleRectangle offset leftInRun line |
- (presentationText isNil or: [presentationLines isNil]) ifTrue: [
- ^ self displayOn: aCanvas using: displayScanner at: somePosition.
- ].
- visibleRectangle := aCanvas clipRect.
- offset := somePosition - positionWhenComposed.
- leftInRun := 0.
- (self lineIndexForPoint: visibleRectangle topLeft)
- to: (self lineIndexForPoint: visibleRectangle bottomRight)
- do: [:i | line := presentationLines at: i.
- self displaySelectionInLine: line on: aCanvas.
- line first <= line last ifTrue:
- [leftInRun := displayScanner displayLine: line
- offset: offset leftInRun: leftInRun]].
- !
Item was changed:
----- Method: TextContainer>>paragraphClass (in category 'access') -----
paragraphClass
+ ^ NewParagraph!
- ^ MultiNewParagraph!
Item was removed:
- ----- Method: TextMorph>>drawOnTest: (in category 'drawing') -----
- drawOnTest: aCanvas
- "Draw the receiver on a canvas"
-
- | fauxBounds |
- self setDefaultContentsIfNil.
- super drawOn: aCanvas. "Border and background if any"
- false ifTrue: [self debugDrawLineRectsOn: aCanvas]. "show line rects for debugging"
- (self startingIndex > text size)
- ifTrue: [self drawNullTextOn: aCanvas].
- "Hack here: The canvas expects bounds to carry the location of the text, but we also need to communicate clipping."
- fauxBounds := self bounds topLeft corner: self innerBounds bottomRight.
- aCanvas paragraph3: self paragraph bounds: fauxBounds color: color!
Item was changed:
----- Method: TextMorph>>paragraphClass (in category 'private') -----
paragraphClass
+ container ifNil: [^ NewParagraph].
- container ifNil: [^ MultiNewParagraph].
^ container paragraphClass!
More information about the Packages
mailing list