LEGlyphStorage.h

Go to the documentation of this file.
00001 /*
00002  **********************************************************************
00003  *   Copyright (C) 1998-2005, 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     void     **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 
00119     LEGlyphStorage();
00120 
00124     ~LEGlyphStorage();
00125 
00133     inline le_int32 getGlyphCount() const;
00134 
00145     void getGlyphs(LEGlyphID glyphs[], LEErrorCode &success) const;
00146 
00159     void getGlyphs(le_uint32 glyphs[], le_uint32 extraBits, LEErrorCode &success) const;
00160 
00171     void getCharIndices(le_int32 charIndices[], LEErrorCode &success) const;
00172 
00184     void getCharIndices(le_int32 charIndices[], le_int32 indexBase, LEErrorCode &success) const;
00185 
00197     void getGlyphPositions(float positions[], LEErrorCode &success) const;
00198 
00213     void getGlyphPosition(le_int32 glyphIndex, float &x, float &y, LEErrorCode &success) const;
00214 
00227     void allocateGlyphArray(le_int32 initialGlyphCount, le_bool rightToLeft, LEErrorCode &success);
00228 
00239     le_int32 allocatePositions(LEErrorCode &success);
00240 
00250     le_int32 allocateAuxData(LEErrorCode &success);
00251 
00260     void getAuxData(void *auxData[], LEErrorCode &success) const;
00261 
00272     LEGlyphID getGlyphID(le_int32 glyphIndex, LEErrorCode &success) const;
00273 
00284     le_int32  getCharIndex(le_int32 glyphIndex, LEErrorCode &success) const;
00285 
00286 
00297     void *getAuxData(le_int32 glyphIndex, LEErrorCode &success) const;
00298 
00309     inline LEGlyphID &operator[](le_int32 glyphIndex) const;
00310 
00327     LEGlyphID *insertGlyphs(le_int32 atIndex, le_int32 insertCount);
00328 
00341     le_int32 applyInsertions();
00342 
00352     void setGlyphID(le_int32 glyphIndex, LEGlyphID glyphID, LEErrorCode &success);
00353 
00363     void setCharIndex(le_int32 glyphIndex, le_int32 charIndex, LEErrorCode &success);
00364 
00375     void setPosition(le_int32 glyphIndex, float x, float y, LEErrorCode &success);
00376 
00387     void adjustPosition(le_int32 glyphIndex, float xAdjust, float yAdjust, LEErrorCode &success);
00388 
00398     void setAuxData(le_int32 glyphIndex, void *auxData, LEErrorCode &success);
00399 
00410     void adoptGlyphArray(LEGlyphStorage &from);
00411 
00422     void adoptCharIndicesArray(LEGlyphStorage &from);
00423 
00434     void adoptPositionArray(LEGlyphStorage &from);
00435 
00446     void adoptAuxDataArray(LEGlyphStorage &from);
00447 
00457     void adoptGlyphCount(LEGlyphStorage &from);
00458 
00466     void adoptGlyphCount(le_int32 newGlyphCount);
00467 
00476     void reset();
00477 
00483     virtual UClassID getDynamicClassID() const;
00484 
00490     static UClassID getStaticClassID();
00491 };
00492 
00493 inline le_int32 LEGlyphStorage::getGlyphCount() const
00494 {
00495     return fGlyphCount;
00496 }
00497 
00498 inline LEGlyphID &LEGlyphStorage::operator[](le_int32 glyphIndex) const
00499 {
00500     return fGlyphs[glyphIndex];
00501 }
00502 
00503 
00504 U_NAMESPACE_END
00505 #endif
00506 

Generated on Wed Oct 4 09:38:51 2006 for ICU 3.4.1 by  doxygen 1.4.4