3 * (C) Copyright IBM Corp. 1998-2007 - All Rights Reserved
9 #include "LayoutEngine.h"
13 * \brief C API for complex text layout.
18 U_CAPI le_engine
* U_EXPORT2
19 le_create(const le_font
*font
,
21 le_int32 languageCode
,
25 LEFontInstance
*fontInstance
= (LEFontInstance
*) font
;
27 return (le_engine
*) LayoutEngine::layoutEngineFactory(fontInstance
, scriptCode
, languageCode
, typo_flags
, *success
);
31 le_close(le_engine
*engine
)
33 LayoutEngine
*le
= (LayoutEngine
*) engine
;
38 U_CAPI le_int32 U_EXPORT2
39 le_layoutChars(le_engine
*engine
,
40 const LEUnicode chars
[],
49 LayoutEngine
*le
= (LayoutEngine
*) engine
;
52 *success
= LE_ILLEGAL_ARGUMENT_ERROR
;
56 return le
->layoutChars(chars
, offset
, count
, max
, rightToLeft
, x
, y
, *success
);
59 U_CAPI le_int32 U_EXPORT2
60 le_getGlyphCount(le_engine
*engine
,
63 LayoutEngine
*le
= (LayoutEngine
*) engine
;
66 *success
= LE_ILLEGAL_ARGUMENT_ERROR
;
70 return le
->getGlyphCount();
74 le_getGlyphs(le_engine
*engine
,
78 LayoutEngine
*le
= (LayoutEngine
*) engine
;
81 *success
= LE_ILLEGAL_ARGUMENT_ERROR
;
85 le
->getGlyphs(glyphs
, *success
);
89 le_getCharIndices(le_engine
*engine
,
90 le_int32 charIndices
[],
93 LayoutEngine
*le
= (LayoutEngine
*) engine
;
96 *success
= LE_ILLEGAL_ARGUMENT_ERROR
;
100 le
->getCharIndices(charIndices
, *success
);
103 U_CAPI
void U_EXPORT2
104 le_getCharIndicesWithBase(le_engine
*engine
,
105 le_int32 charIndices
[],
107 LEErrorCode
*success
)
109 LayoutEngine
*le
= (LayoutEngine
*) engine
;
112 *success
= LE_ILLEGAL_ARGUMENT_ERROR
;
116 le
->getCharIndices(charIndices
, indexBase
, *success
);
119 U_CAPI
void U_EXPORT2
120 le_getGlyphPositions(le_engine
*engine
,
122 LEErrorCode
*success
)
124 LayoutEngine
*le
= (LayoutEngine
*) engine
;
127 *success
= LE_ILLEGAL_ARGUMENT_ERROR
;
131 le
->getGlyphPositions(positions
, *success
);
134 U_CAPI
void U_EXPORT2
135 le_getGlyphPosition(le_engine
*engine
,
139 LEErrorCode
*success
)
141 LayoutEngine
*le
= (LayoutEngine
*) engine
;
144 *success
= LE_ILLEGAL_ARGUMENT_ERROR
;
148 le
->getGlyphPosition(glyphIndex
, *x
, *y
, *success
);
151 U_CAPI
void U_EXPORT2
152 le_reset(le_engine
*engine
,
153 LEErrorCode
*success
)
155 LayoutEngine
*le
= (LayoutEngine
*) engine
;
158 *success
= LE_ILLEGAL_ARGUMENT_ERROR
;