]>
Commit | Line | Data |
---|---|---|
b75a7d8f | 1 | /* |
b75a7d8f | 2 | * |
46f4442e | 3 | * (C) Copyright IBM Corp. 1998-2007 - All Rights Reserved |
b75a7d8f A |
4 | * |
5 | */ | |
6 | ||
7 | #ifndef __GLYPHITERATOR_H | |
8 | #define __GLYPHITERATOR_H | |
9 | ||
10 | /** | |
11 | * \file | |
12 | * \internal | |
13 | */ | |
14 | ||
15 | #include "LETypes.h" | |
16 | #include "OpenTypeTables.h" | |
17 | #include "GlyphDefinitionTables.h" | |
b75a7d8f A |
18 | |
19 | U_NAMESPACE_BEGIN | |
20 | ||
374ca955 | 21 | class LEGlyphStorage; |
73c04bcf | 22 | class GlyphPositionAdjustments; |
374ca955 | 23 | |
b75a7d8f A |
24 | class GlyphIterator : public UMemory { |
25 | public: | |
73c04bcf A |
26 | GlyphIterator(LEGlyphStorage &theGlyphStorage, GlyphPositionAdjustments *theGlyphPositionAdjustments, le_bool rightToLeft, le_uint16 theLookupFlags, |
27 | FeatureMask theFeatureMask, const GlyphDefinitionTableHeader *theGlyphDefinitionTableHeader); | |
b75a7d8f A |
28 | |
29 | GlyphIterator(GlyphIterator &that); | |
30 | ||
73c04bcf | 31 | GlyphIterator(GlyphIterator &that, FeatureMask newFeatureMask); |
b75a7d8f A |
32 | |
33 | GlyphIterator(GlyphIterator &that, le_uint16 newLookupFlags); | |
34 | ||
374ca955 A |
35 | virtual ~GlyphIterator(); |
36 | ||
37 | void reset(le_uint16 newLookupFlags, LETag newFeatureTag); | |
b75a7d8f A |
38 | |
39 | le_bool next(le_uint32 delta = 1); | |
40 | le_bool prev(le_uint32 delta = 1); | |
41 | le_bool findFeatureTag(); | |
42 | ||
43 | le_bool isRightToLeft() const; | |
44 | le_bool ignoresMarks() const; | |
45 | ||
46 | le_bool baselineIsLogicalEnd() const; | |
b75a7d8f A |
47 | |
48 | LEGlyphID getCurrGlyphID() const; | |
49 | le_int32 getCurrStreamPosition() const; | |
b75a7d8f A |
50 | |
51 | le_int32 getMarkComponent(le_int32 markPosition) const; | |
52 | le_bool findMark2Glyph(); | |
53 | ||
73c04bcf A |
54 | void getCursiveEntryPoint(LEPoint &entryPoint) const; |
55 | void getCursiveExitPoint(LEPoint &exitPoint) const; | |
b75a7d8f A |
56 | |
57 | void setCurrGlyphID(TTGlyphID glyphID); | |
58 | void setCurrStreamPosition(le_int32 position); | |
b75a7d8f | 59 | void setCurrGlyphBaseOffset(le_int32 baseOffset); |
374ca955 A |
60 | void adjustCurrGlyphPositionAdjustment(float xPlacementAdjust, float yPlacementAdjust, |
61 | float xAdvanceAdjust, float yAdvanceAdjust); | |
62 | ||
63 | void setCurrGlyphPositionAdjustment(float xPlacementAdjust, float yPlacementAdjust, | |
64 | float xAdvanceAdjust, float yAdvanceAdjust); | |
b75a7d8f | 65 | |
46f4442e A |
66 | void clearCursiveEntryPoint(); |
67 | void clearCursiveExitPoint(); | |
73c04bcf A |
68 | void setCursiveEntryPoint(LEPoint &entryPoint); |
69 | void setCursiveExitPoint(LEPoint &exitPoint); | |
70 | void setCursiveGlyph(); | |
b75a7d8f | 71 | |
374ca955 A |
72 | LEGlyphID *insertGlyphs(le_int32 count); |
73 | le_int32 applyInsertions(); | |
74 | ||
b75a7d8f | 75 | private: |
b75a7d8f | 76 | le_bool filterGlyph(le_uint32 index) const; |
46f4442e | 77 | le_bool hasFeatureTag(le_bool matchGroup) const; |
b75a7d8f A |
78 | le_bool nextInternal(le_uint32 delta = 1); |
79 | le_bool prevInternal(le_uint32 delta = 1); | |
80 | ||
81 | le_int32 direction; | |
82 | le_int32 position; | |
83 | le_int32 nextLimit; | |
84 | le_int32 prevLimit; | |
73c04bcf | 85 | |
374ca955 | 86 | LEGlyphStorage &glyphStorage; |
73c04bcf A |
87 | GlyphPositionAdjustments *glyphPositionAdjustments; |
88 | ||
89 | le_int32 srcIndex; | |
90 | le_int32 destIndex; | |
91 | le_uint16 lookupFlags; | |
92 | FeatureMask featureMask; | |
46f4442e | 93 | le_int32 glyphGroup; |
73c04bcf | 94 | |
b75a7d8f A |
95 | const GlyphClassDefinitionTable *glyphClassDefinitionTable; |
96 | const MarkAttachClassDefinitionTable *markAttachClassDefinitionTable; | |
97 | ||
98 | GlyphIterator &operator=(const GlyphIterator &other); // forbid copying of this class | |
99 | }; | |
100 | ||
101 | U_NAMESPACE_END | |
102 | #endif |