[squeak-dev] fonts, characterscanners and dead primitive 103
tim Rowledge
tim at rowledge.org
Tue Sep 24 00:18:20 UTC 2013
I've now finished looking at users of the assorted scanner classes and senders of related messages and boy, what a mix.
Odd bits that I could really do with answers to -
RemoteCanvas>paragraph:bounds:color: - should it be using MultiCanvasCharacterScanner ?
The only other reference to CanvasCharacterScanner is from Canvas>paragraph2:bound:color: which is unsent, so I propose to remove it.
Paragraph>composeAll refers to MultiTextComposer - why? seems like a mixup with NewParagraph to me.
Similarly, Paragraph>displayLines:affectedRectangle: refers to MultiDisplayScanner when I'd anticipate DisplayScanner
GrafPort>displayScannerForMulti:foreground:background: ignoreColorChanges: ( only sent by
FormCanvas>paragraph3:bounds:colour: (refers to DisplayScanner) is only sent by TextMorph>drawOnTest: which is unsent, so I propose to remove the whole lot.
The choice between CharacterBlockScanner & MultiCBS in NewParagraph>characterBlock… is based on #isWideString. The choice between DisplayScanner and MultiDS in GrafPort>displayScannerFor…. is based on para isMemberOf: MultiNewParagraph) or: [para text string isByteString] and I can't currently see why the difference.
In NewParagraph>composeAll, the choice between a plain compose and multi-compose message is based not on whether the string is byte or wide, but whether it *could* be be byte even if actually wide. That seems like it might dangerously skip over an encoding issue?
Answers on these could be quite useful in trying to work out the intention of some of the code, which is important because <b>lack of comments</b>
One of the suggestions when I started on this stuff was that the multi-stuff was associated with NewParagraph and was for Morphic text handling whereas the old scanners and Paragraph was kept for MVC. It really isn't looking much like that at the moment.
tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Compatible: Gracefully accepts erroneous data from any source.
More information about the Squeak-dev
mailing list
|