8 #ifndef __LEGLYPHSTORAGE_H
9 #define __LEGLYPHSTORAGE_H
12 #include "LEInsertionList.h"
78 LEInsertionList *fInsertionList;
137 inline le_int32 getGlyphCount()
const;
540 return fGlyphs[glyphIndex];
C API: Basic definitions for the ICU LayoutEngine.
LEErrorCode
Error codes returned by the LayoutEngine.
int32_t le_int32
A type used for signed, 32-bit integers.
UBool le_bool
A type used for boolean values.
uint32_t le_uint32
A type used for unsigned, 32-bit integers.
le_uint32 LEGlyphID
Used for glyph indices.
This class encapsulates the per-glyph storage used by the ICU LayoutEngine.
void getGlyphs(LEGlyphID glyphs[], LEErrorCode &success) const
This method copies the glyph array into a caller supplied array.
~LEGlyphStorage()
The destructor.
void reset()
This method frees the glyph, character index, position and auxillary data arrays so that the LayoutEn...
void getGlyphPosition(le_int32 glyphIndex, float &x, float &y, LEErrorCode &success) const
This method returns the X and Y position of the glyph at the given index.
void getGlyphPositions(float positions[], LEErrorCode &success) const
This method copies the position array into a caller supplied array.
virtual UClassID getDynamicClassID() const
ICU "poor man's RTTI", returns a UClassID for the actual class.
void getCharIndices(le_int32 charIndices[], LEErrorCode &success) const
This method copies the character index array into a caller supplied array.
void adoptGlyphCount(LEGlyphStorage &from)
Change the glyph count of this object to be the same as the one in from.
LEGlyphID * insertGlyphs(le_int32 atIndex, le_int32 insertCount, LEErrorCode &success)
Call this method to replace a single glyph in the glyph array with multiple glyphs.
le_int32 applyInsertions()
This method causes all of the glyph insertions recorded by insertGlyphs to be applied to the glyph ar...
LEGlyphID * insertGlyphs(le_int32 atIndex, le_int32 insertCount)
Call this method to replace a single glyph in the glyph array with multiple glyphs.
LEGlyphID & operator[](le_int32 glyphIndex) const
This operator allows direct access to the glyph array using the index operator.
void adoptAuxDataArray(LEGlyphStorage &from)
Delete the auxillary data array and replace it with the one in from.
void adoptPositionArray(LEGlyphStorage &from)
Delete the position array and replace it with the one in from.
void adjustPosition(le_int32 glyphIndex, float xAdjust, float yAdjust, LEErrorCode &success)
Adjust the X, Y position for a particular glyph.
static UClassID getStaticClassID()
ICU "poor man's RTTI", returns a UClassID for this class.
void setAuxData(le_int32 glyphIndex, le_uint32 auxData, LEErrorCode &success)
Set the auxillary data for a particular glyph.
void adoptGlyphArray(LEGlyphStorage &from)
Delete the glyph array and replace it with the one in from.
void setCharIndex(le_int32 glyphIndex, le_int32 charIndex, LEErrorCode &success)
Set the char index for a particular glyph.
virtual le_bool applyInsertion(le_int32 atPosition, le_int32 count, LEGlyphID newGlyphs[])
This implements LEInsertionCallback.
void adoptGlyphCount(le_int32 newGlyphCount)
Change the glyph count of this object to the given value.
le_int32 allocateAuxData(LEErrorCode &success)
This method allocates the storage for the auxillary glyph data.
le_int32 getGlyphCount() const
This method returns the number of glyphs in the glyph array.
le_int32 allocatePositions(LEErrorCode &success)
This method allocates the storage for the glyph positions.
LEGlyphID getGlyphID(le_int32 glyphIndex, LEErrorCode &success) const
Get the glyph ID for a particular glyph.
LEGlyphStorage()
Allocates an empty LEGlyphStorage object.
void getCharIndices(le_int32 charIndices[], le_int32 indexBase, LEErrorCode &success) const
This method copies the character index array into a caller supplied array.
void allocateGlyphArray(le_int32 initialGlyphCount, le_bool rightToLeft, LEErrorCode &success)
This method allocates the glyph array, the char indices array and the insertion list.
le_uint32 getAuxData(le_int32 glyphIndex, LEErrorCode &success) const
Get the auxillary data for a particular glyph.
void setGlyphID(le_int32 glyphIndex, LEGlyphID glyphID, LEErrorCode &success)
Set the glyph ID for a particular glyph.
void getAuxData(le_uint32 auxData[], LEErrorCode &success) const
Copy the entire auxillary data array.
void setPosition(le_int32 glyphIndex, float x, float y, LEErrorCode &success)
Set the X, Y position for a particular glyph.
void getGlyphs(le_uint32 glyphs[], le_uint32 extraBits, LEErrorCode &success) const
This method copies the glyph array into a caller supplied array, ORing in extra bits.
void moveGlyph(le_int32 fromPosition, le_int32 toPosition, le_uint32 marker)
This method is used to reposition glyphs during Indic v2 processing.
void adoptCharIndicesArray(LEGlyphStorage &from)
Delete the char indices array and replace it with the one in from.
le_int32 getCharIndex(le_int32 glyphIndex, LEErrorCode &success) const
Get the char index for a particular glyph.
UObject is the common ICU "boilerplate" class.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
#define U_LAYOUT_API
Set to export library symbols from inside the layout engine library, and to import them from outside.
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.