Marcel Taeumel uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-mt.360.mcz ==================== Summary ==================== Name: Graphics-mt.360 Author: mt Time: 11 August 2016, 10:19:06.876217 am UUID: b5ad28c3-00b3-7240-bf21-b21a8daa73ee Ancestors: Graphics-mt.359 Fixes a bug with FormSetFont, which got colorized inadvertently. Support several options via an extended interface. While there might be the case where we want to colorize the glyphs, do not do it by default. People used to use it to add images into Text because our TextAnchor attribute it not useful for that. =============== Diff against Graphics-mt.359 =============== Item was changed: StrikeFont subclass: #FormSetFont + instanceVariableNames: 'tintable combinationRule' - instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Graphics-Fonts'! !FormSetFont commentStamp: '<historical>' prior: 0! FormSetFonts are designed to capture individual images as character forms for imbedding in normal text. While most often used to insert an isolated glyph in some text, the code is actually desinged to support an entire user-defined font. The TextAttribute subclass TextFontReference is specifically designed for such in-line insertion of exceptional fonts in normal text.! Item was added: + ----- Method: FormSetFont>>combinationRule (in category 'accessing') ----- + combinationRule + + ^ combinationRule! Item was added: + ----- Method: FormSetFont>>combinationRule: (in category 'accessing') ----- + combinationRule: anObject + + combinationRule := anObject! Item was added: + ----- Method: FormSetFont>>displayString:on:from:to:at:kern: (in category 'as yet unclassified') ----- + displayString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta + "Draw the given string from startIndex to stopIndex " + + combinationRule ifNotNil: [:r | aBitBlt combinationRule: r]. + tintable == false ifTrue: [aBitBlt colorMap: nil]. + + ^ super displayString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta! Item was added: + ----- Method: FormSetFont>>initialize (in category 'as yet unclassified') ----- + initialize + + super initialize. + self preserveColors.! Item was added: + ----- Method: FormSetFont>>makeTintable (in category 'as yet unclassified') ----- + makeTintable + "Default." + + self tintable: true. + self combinationRule: Form over.! Item was added: + ----- Method: FormSetFont>>preserveColors (in category 'as yet unclassified') ----- + preserveColors + + self tintable: false. + self combinationRule: Form paint.! Item was added: + ----- Method: FormSetFont>>preserveColorsWithAlpha (in category 'as yet unclassified') ----- + preserveColorsWithAlpha + "Useful for rendering Emojis." + + self tintable: false. + self combinationRule: Form blend.! Item was added: + ----- Method: FormSetFont>>tintable (in category 'accessing') ----- + tintable + + ^ tintable! Item was added: + ----- Method: FormSetFont>>tintable: (in category 'accessing') ----- + tintable: anObject + + tintable := anObject! |
Free forum by Nabble | Edit this page |