[squeak-dev] The Trunk: Graphics-nice.176.mcz
leves at elte.hu
Fri Feb 4 00:45:41 UTC 2011
Thanks for the fix. I forgot that I didn't push the fixed version of
LocaleTest to the Trunk. But it's there now, so we should be ready for the
On Fri, 4 Feb 2011, Nicolas Cellier wrote:
> I omitted to mention a minor change
> and:  and  -> and: [ and: ]
> (fed up of reverting my changes)
> 2011/2/4 <commits at source.squeak.org>:
>> Nicolas Cellier uploaded a new version of Graphics to project The Trunk:
>> ==================== Summary ====================
>> Name: Graphics-nice.176
>> Author: nice
>> Time: 4 February 2011, 12:52:27.728 am
>> UUID: ddd38c78-5d87-4fc0-b547-f9a991cf4167
>> Ancestors: Graphics-ul.175
>> Add an inst var charIndexCompatibilitySlot in order to let the japanese locale test pass.
>> Some old .sar are using ReferenceStream binary format for saving some objets.
>> Unfortunately, ReferenceStream - unlike SmartRefStream - can't cope with modification of Object structure.
>> This is a backward compatibility workaround with these .sar. In the future, StrikeFont should use SmartRefStream and these .sar should be converted.
>> =============== Diff against Graphics-ul.175 ===============
>> Item was changed:
>> AbstractFont subclass: #StrikeFont
>> + instanceVariableNames: 'characterToGlyphMap xTable glyphs name type minAscii maxAscii maxWidth strikeLength ascent descent xOffset raster subscript superscript emphasis derivativeFonts pointSize fallbackFont charIndexCompatibilitySlot'
>> - instanceVariableNames: 'characterToGlyphMap xTable glyphs name type minAscii maxAscii maxWidth strikeLength ascent descent xOffset raster subscript superscript emphasis derivativeFonts pointSize fallbackFont'
>> classVariableNames: 'DefaultStringScanner'
>> poolDictionaries: 'TextConstants'
>> category: 'Graphics-Fonts'!
>> !StrikeFont commentStamp: '<historical>' prior: 0!
>> I represent a compact encoding of a set of Forms corresponding to characters in the ASCII character set. All the forms are placed side by side in a large form whose height is the font height, and whose width is the sum of all the character widths. The xTable variable gives the left-x coordinates of the subforms corresponding to the glyphs. Characters are mapped to glyphs by using the characterToGyphMap.
>> Subclasses can have non-trivial mapping rules as well as different representations for glyphs sizes (e.g., not using an xTable). If so, these classes should return nil when queried for xTable and/or the characterToGlyphMap. This will cause the CharacterScanner primitive to fail and query the font for the width of a character (so that a more programatical approach can be implemented).
>> For display, fonts need to implement two messages:
>> #installOn: aDisplayContext foregroundColor: foregroundColor backgroundColor: backgroundColor
>> This method installs the receiver (a font) on the given DisplayContext (which may be an instance of BitBlt or Canvas (or any of it's subclasses). The font should take the appropriate action to initialize the display context so that further display operations can be optimized.
>> #displayString: aString on: aDisplayContext from: startIndex to: stopIndex at: aPoint kern: kernDelta
>> This method is called for each subsequent run of characters in aString which is to be displayed with the (previously installed) settings.
>> Item was changed:
>> ----- Method: WarpBlt>>cellSize: (in category 'setup') -----
>> cellSize: s
>> "Set the number of samples used for averaging"
>> cellSize := s.
>> cellSize = 1 ifTrue: [^ self].
>> "Install the colorMap to used for mapping the averaged RGBA 32bit pixels to the
>> destination depth. Note that we need to install the 32->32 color map explicitly because
>> the VM will substitute a colorMap derived from sourceForm->destForm mapping which
>> is just plain wrong for <32 source and 32bit dest depth"
>> + (destForm depth = 32 and: [sourceForm notNil and: [sourceForm depth < 32]])
>> - (destForm depth = 32 and: [sourceForm notNil] and: [sourceForm depth < 32])
>> ifTrue:[colorMap := ColorMap shifts: #(0 0 0 0) masks:#(16rFF0000 16rFF00 16rFF 16rFF000000) colors: nil]
>> ifFalse:[colorMap := Color colorMapIfNeededFrom: 32 to: destForm depth].
More information about the Squeak-dev