00001
00002
00003
00004
00005
00006
00007
00008 #ifndef __GLYPHITERATOR_H
00009 #define __GLYPHITERATOR_H
00010
00011 #include "LETypes.h"
00012 #include "OpenTypeTables.h"
00013 #include "GlyphDefinitionTables.h"
00014 #include "GlyphPositionAdjustments.h"
00015
00016 class GlyphIterator
00017 {
00018 public:
00019 GlyphIterator(LEGlyphID *theGlyphs, GlyphPositionAdjustment *theGlyphPositionAdjustments, le_int32 theGlyphCount,
00020 le_bool rightToLeft, le_uint16 theLookupFlags, LETag theFeatureTag, const LETag *theGlyphTags[],
00021 GlyphDefinitionTableHeader *theGlyphDefinitionTableHeader);
00022
00023 GlyphIterator(GlyphIterator &that);
00024
00025 GlyphIterator(GlyphIterator &that, le_uint16 newLookupFlags);
00026
00027 ~GlyphIterator();
00028
00029 le_bool next(le_uint32 delta = 1);
00030 le_bool prev(le_uint32 delta = 1);
00031 le_bool findFeatureTag();
00032
00033 le_bool isRightToLeft();
00034
00035 LEGlyphID getCurrGlyphID();
00036 le_int32 getCurrStreamPosition();
00037 void getCurrGlyphPositionAdjustment(GlyphPositionAdjustment& adjustment);
00038
00039 le_int32 getMarkComponent(le_int32 markPosition);
00040
00041 void setCurrGlyphID(LEGlyphID glyphID);
00042 void setCurrStreamPosition(le_int32 position);
00043 void setCurrGlyphPositionAdjustment(const GlyphPositionAdjustment *adjustment);
00044 void adjustCurrGlyphPositionAdjustment(float xPlacmentAdjust, float yPlacementAdjust,
00045 float xAdvanceAdjust, float yAdvanceAdjust);
00046
00047 private:
00048 GlyphIterator();
00049 le_bool filterGlyph(le_uint32 index);
00050 le_bool hasFeatureTag();
00051 le_bool nextInternal(le_uint32 delta = 1);
00052 le_bool prevInternal(le_uint32 delta = 1);
00053
00054 le_int32 direction;
00055 le_int32 position;
00056 le_int32 nextLimit;
00057 le_int32 prevLimit;
00058 LEGlyphID *glyphs;
00059 GlyphPositionAdjustment *glyphPositionAdjustments;
00060 le_uint16 lookupFlags;
00061 LETag featureTag;
00062 const LETag **glyphTags;
00063 GlyphClassDefinitionTable *glyphClassDefinitionTable;
00064 MarkAttachClassDefinitionTable *markAttachClassDefinitionTable;
00065 };
00066
00067 #endif