ICU 55.1 55.1

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

- File List
- Globals

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LayoutEngine.h
Go to the documentation of this file.
1 /*
2 * (C) Copyright IBM Corp. and others 1998-2014 - All Rights Reserved
3 */
4
5 #ifndef __LAYOUTENGINE_H
6 #define __LAYOUTENGINE_H
7
8 #include "LETypes.h"
9
15 U_NAMESPACE_BEGIN
16
17 class LEFontInstance;
18 class LEGlyphFilter;
19 class LEGlyphStorage;
20
71 class U_LAYOUT_API LayoutEngine : public UObject {
72 public:
73 #ifndef U_HIDE_INTERNAL_API
74
75 static const le_int32 kTypoFlagKern;
77 static const le_int32 kTypoFlagLiga;
78 #endif /* U_HIDE_INTERNAL_API */
79
80 protected:
86 LEGlyphStorage *fGlyphStorage;
87
95 const LEFontInstance *fFontInstance;
96
104 le_int32 fScriptCode;
105
113 le_int32 fLanguageCode;
114
120 le_int32 fTypoFlags;
121
128 le_bool fFilterZeroWidth;
129
130 #ifndef U_HIDE_INTERNAL_API
131
147 LayoutEngine(const LEFontInstance *fontInstance,
148 le_int32 scriptCode,
149 le_int32 languageCode,
150 le_int32 typoFlags,
151 LEErrorCode &success);
152 #endif /* U_HIDE_INTERNAL_API */
153
154 // Do not enclose the protected default constructor with #ifndef U_HIDE_INTERNAL_API
155 // or else the compiler will create a public default constructor.
163 LayoutEngine();
164
187 virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
188 LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success);
189
216 virtual le_int32 computeGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft, LEGlyphStorage &glyphStorage, LEErrorCode &success);
217
231 virtual void positionGlyphs(LEGlyphStorage &glyphStorage, float x, float y, LEErrorCode &success);
232
253 virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success);
254
268 virtual const void *getFontTable(LETag tableTag, size_t &length) const;
269
273 virtual const void *getFontTable(LETag tableTag) const { size_t ignored; return getFontTable(tableTag, ignored); }
274
300 virtual void mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, le_bool mirror, LEGlyphStorage &glyphStorage, LEErrorCode &success);
301
302 #ifndef U_HIDE_INTERNAL_API
303
315 static void adjustMarkGlyphs(LEGlyphStorage &glyphStorage, LEGlyphFilter *markFilter, LEErrorCode &success);
316
317
336 static void adjustMarkGlyphs(const LEUnicode chars[], le_int32 charCount, le_bool reverse, LEGlyphStorage &glyphStorage, LEGlyphFilter *markFilter, LEErrorCode &success);
337 #endif /* U_HIDE_INTERNAL_API */
338
339 public:
348 virtual ~LayoutEngine();
349
375 virtual le_int32 layoutChars(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft, float x, float y, LEErrorCode &success);
376
386 le_int32 getGlyphCount() const;
387
398 void getGlyphs(LEGlyphID glyphs[], LEErrorCode &success) const;
399
412 virtual void getGlyphs(le_uint32 glyphs[], le_uint32 extraBits, LEErrorCode &success) const;
413
424 void getCharIndices(le_int32 charIndices[], LEErrorCode &success) const;
425
437 void getCharIndices(le_int32 charIndices[], le_int32 indexBase, LEErrorCode &success) const;
438
450 void getGlyphPositions(float positions[], LEErrorCode &success) const;
451
466 void getGlyphPosition(le_int32 glyphIndex, float &x, float &y, LEErrorCode &success) const;
467
475 virtual void reset();
476
493 static LayoutEngine *layoutEngineFactory(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, LEErrorCode &success);
494
499 static LayoutEngine *layoutEngineFactory(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typo_flags, LEErrorCode &success);
500
506 virtual UClassID getDynamicClassID() const;
507
513 static UClassID getStaticClassID();
514
515 };
516
517 U_NAMESPACE_END
518 #endif