ICU 50.1.2  50.1.2
playout.h
Go to the documentation of this file.
1 /*
2  *
3  * (C) Copyright IBM Corp. 1998-2011 - All Rights Reserved
4  *
5  */
6 
7 #ifndef __PLAYOUT_H
8 #define __PLAYOUT_H
9 
10 /*
11  * ParagraphLayout doesn't make much sense without
12  * BreakIterator...
13  */
14 #include "unicode/ubidi.h"
15 #if ! UCONFIG_NO_BREAK_ITERATION
16 #ifndef U_HIDE_INTERNAL_API
17 
18 #include "layout/LETypes.h"
19 #include "plruns.h"
20 
35 typedef void pl_paragraph;
36 
42 typedef void pl_line;
43 
49 typedef void pl_visualRun;
50 
96 U_INTERNAL pl_paragraph * U_EXPORT2
97 pl_create(const LEUnicode chars[],
98  le_int32 count,
99  const pl_fontRuns *fontRuns,
100  const pl_valueRuns *levelRuns,
101  const pl_valueRuns *scriptRuns,
102  const pl_localeRuns *localeRuns,
103  UBiDiLevel paragraphLevel,
104  le_bool vertical,
105  LEErrorCode *status);
106 
116 U_INTERNAL void U_EXPORT2
117 pl_close(pl_paragraph *paragraph);
118 
132 U_INTERNAL le_bool U_EXPORT2
133 pl_isComplex(const LEUnicode chars[],
134  le_int32 count);
135 
147 U_INTERNAL UBiDiLevel U_EXPORT2
149 
161 U_INTERNAL UBiDiDirection U_EXPORT2
163 
179 U_INTERNAL le_int32 U_EXPORT2
180 pl_getAscent(const pl_paragraph *paragraph);
181 
192 U_INTERNAL le_int32 U_EXPORT2
193 pl_getDescent(const pl_paragraph *paragraph);
194 
205 U_INTERNAL le_int32 U_EXPORT2
206 pl_getLeading(const pl_paragraph *paragraph);
207 
215 U_INTERNAL void U_EXPORT2
216 pl_reflow(pl_paragraph *paragraph);
217 
236 U_INTERNAL pl_line * U_EXPORT2
237 pl_nextLine(pl_paragraph *paragraph, float width);
238 
248 U_INTERNAL void U_EXPORT2
249 pl_closeLine(pl_line *line);
250 
260 U_INTERNAL le_int32 U_EXPORT2
261 pl_countLineRuns(const pl_line *line);
262 
273 U_INTERNAL le_int32 U_EXPORT2
274 pl_getLineAscent(const pl_line *line);
275 
286 U_INTERNAL le_int32 U_EXPORT2
287 pl_getLineDescent(const pl_line *line);
288 
299 U_INTERNAL le_int32 U_EXPORT2
300 pl_getLineLeading(const pl_line *line);
301 
313 U_INTERNAL le_int32 U_EXPORT2
314 pl_getLineWidth(const pl_line *line);
315 
332 U_INTERNAL const pl_visualRun * U_EXPORT2
333 pl_getLineVisualRun(const pl_line *line, le_int32 runIndex);
334 
349 U_INTERNAL const le_font * U_EXPORT2
351 
362 U_INTERNAL UBiDiDirection U_EXPORT2
364 
374 U_INTERNAL le_int32 U_EXPORT2
376 
389 U_INTERNAL const LEGlyphID * U_EXPORT2
391 
407 U_INTERNAL const float * U_EXPORT2
409 
422 U_INTERNAL const le_int32 * U_EXPORT2
424 
435 U_INTERNAL le_int32 U_EXPORT2
437 
448 U_INTERNAL le_int32 U_EXPORT2
450 
461 U_INTERNAL le_int32 U_EXPORT2
463 
464 #endif /* U_HIDE_INTERNAL_API */
465 #endif
466 #endif
le_int32 pl_getVisualRunLeading(const pl_visualRun *run)
A convenience method which returns the leading value for the font associated with this run...
void pl_localeRuns
Opaque datatype representing an array of locale runs.
Definition: plruns.h:30
void pl_close(pl_paragraph *paragraph)
Close the given paragraph layout object.
le_int32 pl_getVisualRunDescent(const pl_visualRun *run)
A convenience method which returns the descent value for the font associated with this run...
void pl_valueRuns
Opaque datatype representing an array of value runs.
Definition: plruns.h:26
const le_font * pl_getVisualRunFont(const pl_visualRun *run)
Get the le_font object which represents the font of the visual run.
C API: Bidi algorithm.
le_int32 pl_getLineWidth(const pl_line *line)
Get the width of the line.
void pl_paragraph
The opaque type for a paragraph layout.
Definition: playout.h:35
const LEGlyphID * pl_getVisualRunGlyphs(const pl_visualRun *run)
Get the glyphs in the visual run.
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.
le_int32 pl_getLineAscent(const pl_line *line)
Get the ascent of the line.
le_int32 pl_getAscent(const pl_paragraph *paragraph)
Get the max ascent value for all the fonts in the paragraph.
le_int32 pl_getLeading(const pl_paragraph *paragraph)
Return the max leading value for all the fonts in the paragraph.
#define U_INTERNAL
This is used to declare a function as an internal ICU C API.
Definition: umachine.h:117
uint8_t UBiDiLevel
UBiDiLevel is the type of the level values in this Bidi implementation.
Definition: ubidi.h:330
pl_line * pl_nextLine(pl_paragraph *paragraph, float width)
Return a pl_line object which represents next line in the paragraph.
C API: Basic definitions for the ICU LayoutEngine.
le_int32 pl_countLineRuns(const pl_line *line)
Count the number of visual runs in the line.
int32_t le_int32
A type used for signed, 32-bit integers.
Definition: LETypes.h:34
UBool le_bool
A type used for boolean values.
Definition: LETypes.h:77
UBiDiDirection
UBiDiDirection values indicate the text direction.
Definition: ubidi.h:417
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.
le_int32 pl_getVisualRunAscent(const pl_visualRun *run)
A convenience method which returns the ascent value for the font associated with this run...
void pl_visualRun
The opaque type for a visual run in a line.
Definition: playout.h:49
void pl_reflow(pl_paragraph *paragraph)
Reset line breaking to start from the beginning of the paragraph.
LEErrorCode
Error codes returned by the LayoutEngine.
Definition: LETypes.h:678
le_int32 pl_getVisualRunGlyphCount(const pl_visualRun *run)
Get the number of glyphs in the visual run.
const le_int32 * pl_getVisualRunGlyphToCharMap(const pl_visualRun *run)
Get the glyph-to-character map for this visual run.
UBiDiLevel pl_getParagraphLevel(pl_paragraph *paragraph)
Return the resolved paragraph level.
le_int32 pl_getLineDescent(const pl_line *line)
Get the descent of the line.
UBiDiDirection pl_getTextDirection(pl_paragraph *paragraph)
Return the directionality of the text in the paragraph.
le_int32 pl_getDescent(const pl_paragraph *paragraph)
Return the max descent value for all the fonts in the paragraph.
void pl_line
The opaque type for a line in a paragraph layout.
Definition: playout.h:42
UChar LEUnicode
Used to represent 16-bit Unicode code points.
Definition: LETypes.h:238
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...
le_uint32 LEGlyphID
Used for glyph indices.
Definition: LETypes.h:112
const float * pl_getVisualRunPositions(const pl_visualRun *run)
Get the (x, y) positions of the glyphs in the visual run.
void pl_fontRuns
Opaque datatype representing an array of font runs.
Definition: plruns.h:22
UBiDiDirection pl_getVisualRunDirection(const pl_visualRun *run)
Get the direction of the visual run.
void pl_closeLine(pl_line *line)
Close the given line object.
le_int32 pl_getLineLeading(const pl_line *line)
Get the leading of the line.
C API for run arrays.