playout.h
Go to the documentation of this file.
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
*
* (C) Copyright IBM Corp. 1998-2011 - All Rights Reserved
*
*/
#ifndef __PLAYOUT_H
#define __PLAYOUT_H
/*
* ParagraphLayout doesn't make much sense without
* BreakIterator...
*/
#include "unicode/ubidi.h"
#if ! UCONFIG_NO_BREAK_ITERATION
#ifndef U_HIDE_INTERNAL_API
#include "layout/LETypes.h"
#include "plruns.h"
typedef void pl_paragraph;
typedef void pl_line;
typedef void pl_visualRun;
U_CAPI pl_paragraph * U_EXPORT2
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);
U_CAPI void U_EXPORT2
pl_close(pl_paragraph *paragraph);
U_CAPI le_bool U_EXPORT2
pl_isComplex(const LEUnicode chars[],
le_int32 count);
U_CAPI UBiDiLevel U_EXPORT2
pl_getParagraphLevel(pl_paragraph *paragraph);
U_CAPI UBiDiDirection U_EXPORT2
pl_getTextDirection(pl_paragraph *paragraph);
U_CAPI le_int32 U_EXPORT2
pl_getAscent(const pl_paragraph *paragraph);
U_CAPI le_int32 U_EXPORT2
pl_getDescent(const pl_paragraph *paragraph);
U_CAPI le_int32 U_EXPORT2
pl_getLeading(const pl_paragraph *paragraph);
U_CAPI void U_EXPORT2
pl_reflow(pl_paragraph *paragraph);
U_CAPI pl_line * U_EXPORT2
pl_nextLine(pl_paragraph *paragraph, float width);
U_CAPI void U_EXPORT2
pl_closeLine(pl_line *line);
U_CAPI le_int32 U_EXPORT2
pl_countLineRuns(const pl_line *line);
U_CAPI le_int32 U_EXPORT2
pl_getLineAscent(const pl_line *line);
U_CAPI le_int32 U_EXPORT2
pl_getLineDescent(const pl_line *line);
U_CAPI le_int32 U_EXPORT2
pl_getLineLeading(const pl_line *line);
U_CAPI le_int32 U_EXPORT2
pl_getLineWidth(const pl_line *line);
U_CAPI const pl_visualRun * U_EXPORT2
pl_getLineVisualRun(const pl_line *line, le_int32 runIndex);
U_CAPI const le_font * U_EXPORT2
pl_getVisualRunFont(const pl_visualRun *run);
U_CAPI UBiDiDirection U_EXPORT2
pl_getVisualRunDirection(const pl_visualRun *run);
U_CAPI le_int32 U_EXPORT2
pl_getVisualRunGlyphCount(const pl_visualRun *run);
U_CAPI const LEGlyphID * U_EXPORT2
pl_getVisualRunGlyphs(const pl_visualRun *run);
U_CAPI const float * U_EXPORT2
pl_getVisualRunPositions(const pl_visualRun *run);
U_CAPI const le_int32 * U_EXPORT2
pl_getVisualRunGlyphToCharMap(const pl_visualRun *run);
U_CAPI le_int32 U_EXPORT2
pl_getVisualRunAscent(const pl_visualRun *run);
U_CAPI le_int32 U_EXPORT2
pl_getVisualRunDescent(const pl_visualRun *run);
U_CAPI le_int32 U_EXPORT2
pl_getVisualRunLeading(const pl_visualRun *run);
#endif /* U_HIDE_INTERNAL_API */
#endif
#endif
pl_getVisualRunGlyphToCharMap
U_CAPI const le_int32 * pl_getVisualRunGlyphToCharMap(const pl_visualRun *run)
Get the glyph-to-character map for this visual run.
pl_getVisualRunPositions
U_CAPI const float * pl_getVisualRunPositions(const pl_visualRun *run)
Get the (x, y) positions of the glyphs in the visual run.
pl_paragraph
void pl_paragraph
The opaque type for a paragraph layout.
Definition: playout.h:37
pl_create
U_CAPI 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
U_CAPI le_int32 pl_getLineAscent(const pl_line *line)
Get the ascent of the line.
pl_getVisualRunFont
U_CAPI const le_font * pl_getVisualRunFont(const pl_visualRun *run)
Get the le_font object which represents the font of the visual run.
pl_nextLine
U_CAPI pl_line * pl_nextLine(pl_paragraph *paragraph, float width)
Return a pl_line object which represents next line in the paragraph.
pl_getLineVisualRun
U_CAPI 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_countLineRuns
U_CAPI le_int32 pl_countLineRuns(const pl_line *line)
Count the number of visual runs in the line.
pl_getVisualRunDirection
U_CAPI UBiDiDirection pl_getVisualRunDirection(const pl_visualRun *run)
Get the direction of the visual run.
pl_closeLine
U_CAPI void pl_closeLine(pl_line *line)
Close the given line object.
pl_visualRun
void pl_visualRun
The opaque type for a visual run in a line.
Definition: playout.h:51
pl_getVisualRunLeading
U_CAPI le_int32 pl_getVisualRunLeading(const pl_visualRun *run)
A convenience method which returns the leading value for the font associated with this run.
pl_getLineDescent
U_CAPI le_int32 pl_getLineDescent(const pl_line *line)
Get the descent of the line.
pl_close
U_CAPI void pl_close(pl_paragraph *paragraph)
Close the given paragraph layout object.
pl_getLeading
U_CAPI le_int32 pl_getLeading(const pl_paragraph *paragraph)
Return the max leading 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_getLineLeading
U_CAPI le_int32 pl_getLineLeading(const pl_line *line)
Get the leading of the line.
pl_getAscent
U_CAPI le_int32 pl_getAscent(const pl_paragraph *paragraph)
Return the max ascent value for all the fonts in the paragraph.
pl_getVisualRunAscent
U_CAPI le_int32 pl_getVisualRunAscent(const pl_visualRun *run)
A convenience method which returns the ascent value for the font associated with this run.
pl_isComplex
U_CAPI 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_getLineWidth
U_CAPI le_int32 pl_getLineWidth(const pl_line *line)
Get the width of the line.
pl_getVisualRunGlyphCount
U_CAPI le_int32 pl_getVisualRunGlyphCount(const pl_visualRun *run)
Get the number of glyphs in the visual run.
pl_getDescent
U_CAPI le_int32 pl_getDescent(const pl_paragraph *paragraph)
Return the max descent value for all the fonts in the paragraph.
pl_getParagraphLevel
U_CAPI UBiDiLevel pl_getParagraphLevel(pl_paragraph *paragraph)
Return the resolved paragraph level.
pl_getTextDirection
U_CAPI UBiDiDirection pl_getTextDirection(pl_paragraph *paragraph)
Return the directionality of the text in the paragraph.
pl_getVisualRunGlyphs
U_CAPI const LEGlyphID * pl_getVisualRunGlyphs(const pl_visualRun *run)
Get the glyphs in the visual run.
pl_getVisualRunDescent
U_CAPI le_int32 pl_getVisualRunDescent(const pl_visualRun *run)
A convenience method which returns the descent value for the font associated with this run.
pl_reflow
U_CAPI void pl_reflow(pl_paragraph *paragraph)
Reset line breaking to start from the beginning of the paragraph.
plruns.h
C API for run arrays.
pl_localeRuns
void pl_localeRuns
Opaque datatype representing an array of locale runs.
Definition: plruns.h:35
pl_valueRuns
void pl_valueRuns
Opaque datatype representing an array of value runs.
Definition: plruns.h:30
pl_fontRuns
void pl_fontRuns
Opaque datatype representing an array of font runs.
Definition: plruns.h:25
ubidi.h
C API: Bidi algorithm.
UBiDiDirection
UBiDiDirection
UBiDiDirection values indicate the text direction.
Definition: ubidi.h:429
UBiDiLevel
uint8_t UBiDiLevel
UBiDiLevel is the type of the level values in this Bidi implementation.
Definition: ubidi.h:340
U_CAPI
#define U_CAPI
This is used to declare a function as a public ICU C API.
Definition: umachine.h:110