1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/textandloc/fontservices/textshaperplugin/IcuSource/layout/GlyphIterator.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,97 @@
1.4 +/*
1.5 + *
1.6 + * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
1.7 + *
1.8 + */
1.9 +
1.10 +#ifndef __GLYPHITERATOR_H
1.11 +#define __GLYPHITERATOR_H
1.12 +
1.13 +/**
1.14 + * \file
1.15 + * \internal
1.16 + */
1.17 +
1.18 +#include "LETypes.h"
1.19 +#include "OpenTypeTables.h"
1.20 +#include "GlyphDefinitionTables.h"
1.21 +
1.22 +U_NAMESPACE_BEGIN
1.23 +
1.24 +class LEGlyphStorage;
1.25 +class GlyphPositionAdjustments;
1.26 +
1.27 +class GlyphIterator : public UMemory {
1.28 +public:
1.29 + GlyphIterator(LEGlyphStorage &theGlyphStorage, GlyphPositionAdjustments *theGlyphPositionAdjustments, le_bool rightToLeft, le_uint16 theLookupFlags, LETag theFeatureTag,
1.30 + const GlyphDefinitionTableHeader *theGlyphDefinitionTableHeader);
1.31 +
1.32 + GlyphIterator(GlyphIterator &that);
1.33 +
1.34 + GlyphIterator(GlyphIterator &that, LETag newFeatureTag);
1.35 +
1.36 + GlyphIterator(GlyphIterator &that, le_uint16 newLookupFlags);
1.37 +
1.38 + virtual ~GlyphIterator();
1.39 +
1.40 + void reset(le_uint16 newLookupFlags, LETag newFeatureTag);
1.41 +
1.42 + le_bool next(le_uint32 delta = 1);
1.43 + le_bool prev(le_uint32 delta = 1);
1.44 + le_bool findFeatureTag();
1.45 +
1.46 + le_bool isRightToLeft() const;
1.47 + le_bool ignoresMarks() const;
1.48 +
1.49 + le_bool baselineIsLogicalEnd() const;
1.50 +
1.51 + LEGlyphID getCurrGlyphID() const;
1.52 + le_int32 getCurrStreamPosition() const;
1.53 +
1.54 + le_int32 getMarkComponent(le_int32 markPosition) const;
1.55 + le_bool findMark2Glyph();
1.56 +
1.57 + void getCursiveEntryPoint(LEPoint &entryPoint) const;
1.58 + void getCursiveExitPoint(LEPoint &exitPoint) const;
1.59 +
1.60 + void setCurrGlyphID(TTGlyphID glyphID);
1.61 + void setCurrStreamPosition(le_int32 position);
1.62 + void setCurrGlyphBaseOffset(le_int32 baseOffset);
1.63 + void adjustCurrGlyphPositionAdjustment(float xPlacementAdjust, float yPlacementAdjust,
1.64 + float xAdvanceAdjust, float yAdvanceAdjust);
1.65 +
1.66 + void setCurrGlyphPositionAdjustment(float xPlacementAdjust, float yPlacementAdjust,
1.67 + float xAdvanceAdjust, float yAdvanceAdjust);
1.68 +
1.69 + void setCursiveEntryPoint(LEPoint &entryPoint);
1.70 + void setCursiveExitPoint(LEPoint &exitPoint);
1.71 + void setCursiveGlyph();
1.72 +
1.73 + LEGlyphID *insertGlyphs(le_int32 count, LEErrorCode& success);
1.74 + le_int32 applyInsertions();
1.75 +
1.76 +private:
1.77 + le_bool filterGlyph(le_uint32 index) const;
1.78 + le_bool hasFeatureTag() const;
1.79 + le_bool nextInternal(le_uint32 delta = 1);
1.80 + le_bool prevInternal(le_uint32 delta = 1);
1.81 +
1.82 + le_int32 direction;
1.83 + le_int32 position;
1.84 + le_int32 nextLimit;
1.85 + le_int32 prevLimit;
1.86 +
1.87 + LEGlyphStorage &glyphStorage;
1.88 + GlyphPositionAdjustments *glyphPositionAdjustments;
1.89 + le_int32 srcIndex;
1.90 + le_int32 destIndex;
1.91 + le_uint16 lookupFlags;
1.92 + LETag featureTag;
1.93 + const GlyphClassDefinitionTable *glyphClassDefinitionTable;
1.94 + const MarkAttachClassDefinitionTable *markAttachClassDefinitionTable;
1.95 +
1.96 + GlyphIterator &operator=(const GlyphIterator &other); // forbid copying of this class
1.97 +};
1.98 +
1.99 +U_NAMESPACE_END
1.100 +#endif