sl@0: /* sl@0: * sl@0: * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved sl@0: * sl@0: */ sl@0: sl@0: #ifndef __GLYPHITERATOR_H sl@0: #define __GLYPHITERATOR_H sl@0: sl@0: /** sl@0: * \file sl@0: * \internal sl@0: */ sl@0: sl@0: #include "LETypes.h" sl@0: #include "OpenTypeTables.h" sl@0: #include "GlyphDefinitionTables.h" sl@0: sl@0: U_NAMESPACE_BEGIN sl@0: sl@0: class LEGlyphStorage; sl@0: class GlyphPositionAdjustments; sl@0: sl@0: class GlyphIterator : public UMemory { sl@0: public: sl@0: GlyphIterator(LEGlyphStorage &theGlyphStorage, GlyphPositionAdjustments *theGlyphPositionAdjustments, le_bool rightToLeft, le_uint16 theLookupFlags, LETag theFeatureTag, sl@0: const GlyphDefinitionTableHeader *theGlyphDefinitionTableHeader); sl@0: sl@0: GlyphIterator(GlyphIterator &that); sl@0: sl@0: GlyphIterator(GlyphIterator &that, LETag newFeatureTag); sl@0: sl@0: GlyphIterator(GlyphIterator &that, le_uint16 newLookupFlags); sl@0: sl@0: virtual ~GlyphIterator(); sl@0: sl@0: void reset(le_uint16 newLookupFlags, LETag newFeatureTag); sl@0: sl@0: le_bool next(le_uint32 delta = 1); sl@0: le_bool prev(le_uint32 delta = 1); sl@0: le_bool findFeatureTag(); sl@0: sl@0: le_bool isRightToLeft() const; sl@0: le_bool ignoresMarks() const; sl@0: sl@0: le_bool baselineIsLogicalEnd() const; sl@0: sl@0: LEGlyphID getCurrGlyphID() const; sl@0: le_int32 getCurrStreamPosition() const; sl@0: sl@0: le_int32 getMarkComponent(le_int32 markPosition) const; sl@0: le_bool findMark2Glyph(); sl@0: sl@0: void getCursiveEntryPoint(LEPoint &entryPoint) const; sl@0: void getCursiveExitPoint(LEPoint &exitPoint) const; sl@0: sl@0: void setCurrGlyphID(TTGlyphID glyphID); sl@0: void setCurrStreamPosition(le_int32 position); sl@0: void setCurrGlyphBaseOffset(le_int32 baseOffset); sl@0: void adjustCurrGlyphPositionAdjustment(float xPlacementAdjust, float yPlacementAdjust, sl@0: float xAdvanceAdjust, float yAdvanceAdjust); sl@0: sl@0: void setCurrGlyphPositionAdjustment(float xPlacementAdjust, float yPlacementAdjust, sl@0: float xAdvanceAdjust, float yAdvanceAdjust); sl@0: sl@0: void setCursiveEntryPoint(LEPoint &entryPoint); sl@0: void setCursiveExitPoint(LEPoint &exitPoint); sl@0: void setCursiveGlyph(); sl@0: sl@0: LEGlyphID *insertGlyphs(le_int32 count, LEErrorCode& success); sl@0: le_int32 applyInsertions(); sl@0: sl@0: private: sl@0: le_bool filterGlyph(le_uint32 index) const; sl@0: le_bool hasFeatureTag() const; sl@0: le_bool nextInternal(le_uint32 delta = 1); sl@0: le_bool prevInternal(le_uint32 delta = 1); sl@0: sl@0: le_int32 direction; sl@0: le_int32 position; sl@0: le_int32 nextLimit; sl@0: le_int32 prevLimit; sl@0: sl@0: LEGlyphStorage &glyphStorage; sl@0: GlyphPositionAdjustments *glyphPositionAdjustments; sl@0: le_int32 srcIndex; sl@0: le_int32 destIndex; sl@0: le_uint16 lookupFlags; sl@0: LETag featureTag; sl@0: const GlyphClassDefinitionTable *glyphClassDefinitionTable; sl@0: const MarkAttachClassDefinitionTable *markAttachClassDefinitionTable; sl@0: sl@0: GlyphIterator &operator=(const GlyphIterator &other); // forbid copying of this class sl@0: }; sl@0: sl@0: U_NAMESPACE_END sl@0: #endif