[squeak-dev] The Trunk: Collections-tpr.539.mcz

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Tue Oct 8 22:42:44 UTC 2013


+1 that makes sense, and update would be simpler.


2013/10/9 Levente Uzonyi <leves at elte.hu>

> Why aren't these methods in the Graphics package?
>
>
> Levente
>
>
> On Tue, 8 Oct 2013, commits at source.squeak.org wrote:
>
>  tim Rowledge uploaded a new version of Collections to project The Trunk:
>> http://source.squeak.org/**trunk/Collections-tpr.539.mcz<http://source.squeak.org/trunk/Collections-tpr.539.mcz>
>>
>> ==================== Summary ====================
>>
>> Name: Collections-tpr.539
>> Author: tpr
>> Time: 8 October 2013, 2:48:12.552 pm
>> UUID: e33fd51f-59a0-41ab-bbee-**08a8a969f31a
>> Ancestors: Collections-cmm.538
>>
>> Strings need to understand how to delegate character scanning to the next
>> stage of the process
>>
>> =============== Diff against Collections-cmm.538 ===============
>>
>> Item was added:
>> + ----- Method: ByteString>>**scanCharactersFrom:to:with:**rightX:font:
>> (in category 'character scanning') -----
>> + scanCharactersFrom: startIndex to: stopIndex with: aCharacterScanner
>> rightX: rightX  font: aFont
>> +       "NB: strongly consider getting almost all these parameters from
>> the scanner"
>> +       "Since I'm a byte char string, I know that we have to scan
>> single-byte characters and don't have to handle encodings etc"
>> +       startIndex > stopIndex
>> +               ifTrue: [^aCharacterScanner handleEndOfRunAt: stopIndex].
>> +       ^aFont scanByteCharactersFrom: startIndex to: stopIndex in: self
>> with: aCharacterScanner rightX: rightX!
>>
>> Item was added:
>> + ----- Method: WideString>>**scanCharactersFrom:to:with:**rightX:font:
>> (in category 'character scanning') -----
>> + scanCharactersFrom: startIndex to: stopIndex with: aCharacterScanner
>> rightX: rightX  font: aFont
>> +       "NB: strongly consider getting almost all these parameters from
>> the scanner"
>> +       "Since I'm a wide char string, I know that we have to scan
>> multi-byte characters and handle encodings etc"
>> +       | charSet |
>> +       startIndex > stopIndex
>> +               ifTrue: [^aCharacterScanner handleEndOfRunAt: stopIndex].
>> +       charSet := self encodedCharSetAt: startIndex.
>> +       ^charSet scanMultibyteCharactersFrom: startIndex to: stopIndex
>> in: self with: aCharacterScanner rightX: rightX font: aFont      !
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20131009/e440adf8/attachment.htm


More information about the Squeak-dev mailing list