- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

# LEGlyphStorage.h

Go to the documentation of this file.

    00001 /*
    00002  **********************************************************************
    00003  *   Copyright (C) 1998-2010, International Business Machines
    00004  *   Corporation and others.  All Rights Reserved.
    00005  **********************************************************************
    00006  */
    00007
    00008 #ifndef __LEGLYPHSTORAGE_H
    00009 #define __LEGLYPHSTORAGE_H
    00010
    00011 #include "LETypes.h"
    00012 #include "LEInsertionList.h"
    00013
    00019 U_NAMESPACE_BEGIN
    00020
    00034 class U_LAYOUT_API LEGlyphStorage : public UObject, protected LEInsertionCallback
    00035 {
    00036 private:
    00042     le_int32   fGlyphCount;
    00043
    00049     LEGlyphID *fGlyphs;
    00050
    00056     le_int32  *fCharIndices;
    00057
    00063     float     *fPositions;
    00064
    00070     le_uint32 *fAuxData;
    00071
    00072
    00078     LEInsertionList *fInsertionList;
    00079
    00085     le_int32 fSrcIndex;
    00086
    00092     le_int32 fDestIndex;
    00093
    00094 protected:
    00110     virtual le_bool applyInsertion(le_int32 atPosition, le_int32 count, LEGlyphID newGlyphs[]);
    00111
    00112 public:
    00113
    00121     LEGlyphStorage();
    00122
    00128     ~LEGlyphStorage();
    00129
    00137     inline le_int32 getGlyphCount() const;
    00138
    00149     void getGlyphs(LEGlyphID glyphs[], LEErrorCode &success) const;
    00150
    00163     void getGlyphs(le_uint32 glyphs[], le_uint32 extraBits, LEErrorCode &success) const;
    00164
    00175     void getCharIndices(le_int32 charIndices[], LEErrorCode &success) const;
    00176
    00188     void getCharIndices(le_int32 charIndices[], le_int32 indexBase, LEErrorCode &success) const;
    00189
    00201     void getGlyphPositions(float positions[], LEErrorCode &success) const;
    00202
    00217     void getGlyphPosition(le_int32 glyphIndex, float &x, float &y, LEErrorCode &success) const;
    00218
    00231     void allocateGlyphArray(le_int32 initialGlyphCount, le_bool rightToLeft, LEErrorCode &success);
    00232
    00243     le_int32 allocatePositions(LEErrorCode &success);
    00244
    00254     le_int32 allocateAuxData(LEErrorCode &success);
    00255
    00264     void getAuxData(le_uint32 auxData[], LEErrorCode &success) const;
    00265
    00276     LEGlyphID getGlyphID(le_int32 glyphIndex, LEErrorCode &success) const;
    00277
    00288     le_int32  getCharIndex(le_int32 glyphIndex, LEErrorCode &success) const;
    00289
    00290
    00301     le_uint32 getAuxData(le_int32 glyphIndex, LEErrorCode &success) const;
    00302
    00313     inline LEGlyphID &operator[](le_int32 glyphIndex) const;
    00314
    00332     LEGlyphID *insertGlyphs(le_int32 atIndex, le_int32 insertCount, LEErrorCode& success);
    00333
    00352     LEGlyphID *insertGlyphs(le_int32 atIndex, le_int32 insertCount);
    00353
    00367     void moveGlyph(le_int32 fromPosition, le_int32 toPosition, le_uint32 marker);
    00368
    00381     le_int32 applyInsertions();
    00382
    00392     void setGlyphID(le_int32 glyphIndex, LEGlyphID glyphID, LEErrorCode &success);
    00393
    00403     void setCharIndex(le_int32 glyphIndex, le_int32 charIndex, LEErrorCode &success);
    00404
    00415     void setPosition(le_int32 glyphIndex, float x, float y, LEErrorCode &success);
    00416
    00427     void adjustPosition(le_int32 glyphIndex, float xAdjust, float yAdjust, LEErrorCode &success);
    00428
    00438     void setAuxData(le_int32 glyphIndex, le_uint32 auxData, LEErrorCode &success);
    00439
    00450     void adoptGlyphArray(LEGlyphStorage &from);
    00451
    00462     void adoptCharIndicesArray(LEGlyphStorage &from);
    00463
    00474     void adoptPositionArray(LEGlyphStorage &from);
    00475
    00486     void adoptAuxDataArray(LEGlyphStorage &from);
    00487
    00497     void adoptGlyphCount(LEGlyphStorage &from);
    00498
    00506     void adoptGlyphCount(le_int32 newGlyphCount);
    00507
    00516     void reset();
    00517
    00523     virtual UClassID getDynamicClassID() const;
    00524
    00530     static UClassID getStaticClassID();
    00531 };
    00532
    00533 inline le_int32 LEGlyphStorage::getGlyphCount() const
    00534 {
    00535     return fGlyphCount;
    00536 }
    00537
    00538 inline LEGlyphID &LEGlyphStorage::operator[](le_int32 glyphIndex) const
    00539 {
    00540     return fGlyphs[glyphIndex];
    00541 }
    00542
    00543
    00544 U_NAMESPACE_END
    00545 #endif
    00546

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines