#include <loengine.h>
Public Methods | |
virtual | ~ICULayoutEngine () |
The destructor. More... | |
int32_t | layoutChars (const UChar chars[], UTextOffset startOffset, UTextOffset endOffset, UTextOffset maxOffset, UBool rightToLeft, float x, float y, UErrorCode &success) |
This method computes the glyph, character index and position arrays for the input characters. More... | |
int32_t | layoutString (const UnicodeString &str, UTextOffset startOffset, UTextOffset endOffset, UBool rightToLeft, float x, float y, UErrorCode &success) |
This method computes the glyph, character index and position arrays for the input characters. More... | |
int32_t | countGlyphs () const |
This method returns the number of glyphs in the glyph array. More... | |
void | getGlyphs (uint16_t glyphs[], UErrorCode &success) |
This method copies the glyph array into a caller supplied array. More... | |
void | getCharIndices (int32_t charIndices[], UErrorCode &success) |
This method copies the character index array into a caller supplied array. More... | |
void | getCharIndices (int32_t charIndices[], int32_t indexBase, UErrorCode &success) |
This method copies the character index array into a caller supplied array. More... | |
void | getGlyphPositions (float positions[], UErrorCode &success) |
This method copies the position array into a caller supplied array. More... | |
void | getGlyphPosition (int32_t glyphIndex, float &x, float &y, UErrorCode &success) |
This method returns the X and Y position of the glyph at the given index. More... | |
Static Public Methods | |
ICULayoutEngine * | createInstance (const LEFontInstance *fontInstance, UScriptCode script, Locale &locale, UErrorCode &success) |
This method returns an ICULayoutEngine capable of laying out text in the given font, script and langauge. More... |
(LayoutEngine was developed seperately from ICU and the same source is used in non-ICU environments, so it cannot be changed to match ICU coding conventions).
This class is designed for clients who wish to use LayoutEngine to layout complex text. If you need to subclass LayoutEngine, you'll need to use the LayoutEngine interfaces directly.
Basically, it creates an instance of LayoutEngine, stashes it in fLayoutEngine, and uses it to implement the layout functionality.
Use the createInstance method to create an ICULayoutEngine. Use delete to destroy it. The layoutChars method computes the glyphs and positions, and saves them in the ICULayoutEngine object. Use getGlyphs, getPositions and getCharIndices to retreive this data.
You'll also need an implementation of LEFontInstance for your platform.
|
The destructor. At least on Windows it needs to be virtual to ensure that it deletes the object from the same heap that createInstance will allocate it from. We don't know why this is...
|
|
This method returns the number of glyphs in the glyph array. Note that the number of glyphs will be greater than or equal to the number of characters used to create the LayoutEngine.
|
|
This method returns an ICULayoutEngine capable of laying out text in the given font, script and langauge.
|
|
This method copies the character index array into a caller supplied array. The caller must ensure that the array is large enough to hold a character index for each glyph.
|
|
This method copies the character index array into a caller supplied array. The caller must ensure that the array is large enough to hold a character index for each glyph.
|
|
This method returns the X and Y position of the glyph at the given index. Input parameters:
|
|
This method copies the position array into a caller supplied array. The caller must ensure that the array is large enough to hold an X and Y position for each glyph, plus an extra X and Y for the advance of the last glyph.
|
|
This method copies the glyph array into a caller supplied array. The caller must ensure that the array is large enough to hold all the glyphs.
|
|
This method computes the glyph, character index and position arrays for the input characters.
|
|
This method computes the glyph, character index and position arrays for the input characters.
|