ICU 65.1 65.1

playout.h
Go to the documentation of this file.
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 *
5 * (C) Copyright IBM Corp. 1998-2011 - All Rights Reserved
6 *
7 */
8
9 #ifndef __PLAYOUT_H
10 #define __PLAYOUT_H
11
12 /*
13 * ParagraphLayout doesn't make much sense without
14 * BreakIterator...
15 */
16 #include "unicode/ubidi.h"
17 #if ! UCONFIG_NO_BREAK_ITERATION
18 #ifndef U_HIDE_INTERNAL_API
19
20 #include "layout/LETypes.h"
21 #include "plruns.h"
22
37 typedef void pl_paragraph;
38
44 typedef void pl_line;
45
51 typedef void pl_visualRun;
52
98 U_INTERNAL pl_paragraph * U_EXPORT2
99 pl_create(const LEUnicode chars[],
100 le_int32 count,
101 const pl_fontRuns *fontRuns,
102 const pl_valueRuns *levelRuns,
103 const pl_valueRuns *scriptRuns,
104 const pl_localeRuns *localeRuns,
105 UBiDiLevel paragraphLevel,
106 le_bool vertical,
107 LEErrorCode *status);
108
118 U_INTERNAL void U_EXPORT2
119 pl_close(pl_paragraph *paragraph);
120
134 U_INTERNAL le_bool U_EXPORT2
135 pl_isComplex(const LEUnicode chars[],
136 le_int32 count);
137
149 U_INTERNAL UBiDiLevel U_EXPORT2
150 pl_getParagraphLevel(pl_paragraph *paragraph);
151
163 U_INTERNAL UBiDiDirection U_EXPORT2
164 pl_getTextDirection(pl_paragraph *paragraph);
165
181 U_INTERNAL le_int32 U_EXPORT2
182 pl_getAscent(const pl_paragraph *paragraph);
183
194 U_INTERNAL le_int32 U_EXPORT2
195 pl_getDescent(const pl_paragraph *paragraph);
196
207 U_INTERNAL le_int32 U_EXPORT2
208 pl_getLeading(const pl_paragraph *paragraph);
209
217 U_INTERNAL void U_EXPORT2
218 pl_reflow(pl_paragraph *paragraph);
219
238 U_INTERNAL pl_line * U_EXPORT2
239 pl_nextLine(pl_paragraph *paragraph, float width);
240
250 U_INTERNAL void U_EXPORT2
251 pl_closeLine(pl_line *line);
252
262 U_INTERNAL le_int32 U_EXPORT2
263 pl_countLineRuns(const pl_line *line);
264
275 U_INTERNAL le_int32 U_EXPORT2
276 pl_getLineAscent(const pl_line *line);
277
288 U_INTERNAL le_int32 U_EXPORT2
289 pl_getLineDescent(const pl_line *line);
290
301 U_INTERNAL le_int32 U_EXPORT2
302 pl_getLineLeading(const pl_line *line);
303
315 U_INTERNAL le_int32 U_EXPORT2
316 pl_getLineWidth(const pl_line *line);
317
334 U_INTERNAL const pl_visualRun * U_EXPORT2
335 pl_getLineVisualRun(const pl_line *line, le_int32 runIndex);
336
351 U_INTERNAL const le_font * U_EXPORT2
352 pl_getVisualRunFont(const pl_visualRun *run);
353
364 U_INTERNAL UBiDiDirection U_EXPORT2
365 pl_getVisualRunDirection(const pl_visualRun *run);
366
376 U_INTERNAL le_int32 U_EXPORT2
377 pl_getVisualRunGlyphCount(const pl_visualRun *run);
378
391 U_INTERNAL const LEGlyphID * U_EXPORT2
392 pl_getVisualRunGlyphs(const pl_visualRun *run);
393
409 U_INTERNAL const float * U_EXPORT2
410 pl_getVisualRunPositions(const pl_visualRun *run);
411
424 U_INTERNAL const le_int32 * U_EXPORT2
425 pl_getVisualRunGlyphToCharMap(const pl_visualRun *run);
426
437 U_INTERNAL le_int32 U_EXPORT2
438 pl_getVisualRunAscent(const pl_visualRun *run);
439
450 U_INTERNAL le_int32 U_EXPORT2
451 pl_getVisualRunDescent(const pl_visualRun *run);
452
463 U_INTERNAL le_int32 U_EXPORT2
464 pl_getVisualRunLeading(const pl_visualRun *run);
465
466 #endif /* U_HIDE_INTERNAL_API */
467 #endif
468 #endif
pl_getVisualRunLeading
le_int32 pl_getVisualRunLeading(const pl_visualRun *run)
A convenience method which returns the leading value for the font associated with this run...
pl_localeRuns
void pl_localeRuns
Opaque datatype representing an array of locale runs.
Definition: plruns.h:35
pl_close
void pl_close(pl_paragraph *paragraph)
Close the given paragraph layout object.
pl_getVisualRunDescent
le_int32 pl_getVisualRunDescent(const pl_visualRun *run)
A convenience method which returns the descent value for the font associated with this run...
pl_valueRuns
void pl_valueRuns
Opaque datatype representing an array of value runs.
Definition: plruns.h:30
pl_getVisualRunFont
const le_font * pl_getVisualRunFont(const pl_visualRun *run)
Get the le_font object which represents the font of the visual run.
ubidi.h
C API: Bidi algorithm.
pl_getLineWidth
le_int32 pl_getLineWidth(const pl_line *line)
Get the width of the line.
pl_paragraph
void pl_paragraph
The opaque type for a paragraph layout.
Definition: playout.h:37
pl_getVisualRunGlyphs
const LEGlyphID * pl_getVisualRunGlyphs(const pl_visualRun *run)
Get the glyphs in the visual run.
pl_create
pl_paragraph * pl_create(const LEUnicode chars[], le_int32 count, const pl_fontRuns *fontRuns, const pl_valueRuns *levelRuns, const pl_valueRuns *scriptRuns, const pl_localeRuns *localeRuns, UBiDiLevel paragraphLevel, le_bool vertical, LEErrorCode *status)
Construct a ParagraphLayout object for a styled paragraph.
pl_getLineAscent
le_int32 pl_getLineAscent(const pl_line *line)
Get the ascent of the line.
pl_getAscent
le_int32 pl_getAscent(const pl_paragraph *paragraph)
Get the max ascent value for all the fonts in the paragraph.
pl_getLeading
le_int32 pl_getLeading(const pl_paragraph *paragraph)
Return the max leading value for all the fonts in the paragraph.
U_INTERNAL
#define U_INTERNAL
This is used to declare a function as an internal ICU C API.
Definition: umachine.h:119
UBiDiLevel
uint8_t UBiDiLevel
UBiDiLevel is the type of the level values in this Bidi implementation.
Definition: ubidi.h:336
pl_nextLine
pl_line * pl_nextLine(pl_paragraph *paragraph, float width)
Return a pl_line object which represents next line in the paragraph.
pl_countLineRuns
le_int32 pl_countLineRuns(const pl_line *line)
Count the number of visual runs in the line.
UBiDiDirection
UBiDiDirection
UBiDiDirection values indicate the text direction.
Definition: ubidi.h:425
pl_getLineVisualRun
const pl_visualRun * pl_getLineVisualRun(const pl_line *line, le_int32 runIndex)
Get a ParagraphLayout::VisualRun object for a given visual run in the line.
pl_getVisualRunAscent
le_int32 pl_getVisualRunAscent(const pl_visualRun *run)
A convenience method which returns the ascent value for the font associated with this run...
pl_visualRun
void pl_visualRun
The opaque type for a visual run in a line.
Definition: playout.h:51
pl_reflow
void pl_reflow(pl_paragraph *paragraph)
Reset line breaking to start from the beginning of the paragraph.
pl_getVisualRunGlyphCount
le_int32 pl_getVisualRunGlyphCount(const pl_visualRun *run)
Get the number of glyphs in the visual run.
pl_getVisualRunGlyphToCharMap
const le_int32 * pl_getVisualRunGlyphToCharMap(const pl_visualRun *run)
Get the glyph-to-character map for this visual run.
pl_getParagraphLevel
UBiDiLevel pl_getParagraphLevel(pl_paragraph *paragraph)
Return the resolved paragraph level.
pl_getLineDescent
le_int32 pl_getLineDescent(const pl_line *line)
Get the descent of the line.
pl_getTextDirection
UBiDiDirection pl_getTextDirection(pl_paragraph *paragraph)
Return the directionality of the text in the paragraph.
pl_getDescent
le_int32 pl_getDescent(const pl_paragraph *paragraph)
Return the max descent value for all the fonts in the paragraph.
pl_line
void pl_line
The opaque type for a line in a paragraph layout.
Definition: playout.h:44
pl_isComplex
le_bool pl_isComplex(const LEUnicode chars[], le_int32 count)
Examine the given text and determine if it contains characters in any script which requires complex p...
pl_getVisualRunPositions
const float * pl_getVisualRunPositions(const pl_visualRun *run)
Get the (x, y) positions of the glyphs in the visual run.
pl_fontRuns
void pl_fontRuns
Opaque datatype representing an array of font runs.
Definition: plruns.h:25
pl_getVisualRunDirection
UBiDiDirection pl_getVisualRunDirection(const pl_visualRun *run)
Get the direction of the visual run.
pl_closeLine
void pl_closeLine(pl_line *line)
Close the given line object.
pl_getLineLeading
le_int32 pl_getLineLeading(const pl_line *line)
Get the leading of the line.
plruns.h
C API for run arrays.