[Pharo-project] Why TTComposite is a subclass of TTGlyph
TTGlyph subclass: #TTCompositeGlyph instanceVariableNames: 'glyphs' classVariableNames: '' poolDictionaries: '' category: 'TrueType-Fonts' This class represents a composite TrueType glyph, e.g.one which contains many simple TTGlyphs. Does a TTCompositeGlyph needs all the state from its superclass? Alain I'm going over the super initialize cs now. TTGlyph>>initialize bounds := 0@0 corner: 0@0. contours := #(). advanceWidth := 0. leftSideBearing := 0. rightSideBearing := 0. but in the subclass TTCompositeGlyph>>contours ^contours ifNil:[contours := self computeContours] so if we change the initialize of the subclass then the countours will be never computed.... Stef
This is why for this kind of changes 4 eyes are better than two :) Stef On Jun 8, 2009, at 10:28 PM, Alain Plantec wrote:
but in the subclass
TTCompositeGlyph>>contours ^contours ifNil:[contours := self computeContours]
so if we change the initialize of the subclass then the countours will be never computed....
damn! >:o ok, seen well
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
participants (2)
-
Alain Plantec -
Stéphane Ducasse