harmony 鸿蒙drawing_text_run.h
drawing_text_run.h
Overview
The drawing_text_run.h file declares the capabilities of runs, such as obtaining the typographic boundary and drawing.
File to include:
Library: libnative_drawing.so
Since: 16
Related module: Drawing
Summary
Functions
Name | Description |
---|---|
OH_Drawing_Array * OH_Drawing_GetRunStringIndices (OH_Drawing_Run *run, int64_t start, int64_t length) | Obtains an array of character indices of glyphs within a specified range of a run, where the indices are offsets relative to the entire paragraph. |
uint64_t OH_Drawing_GetRunStringIndicesByIndex (OH_Drawing_Array *stringIndices, size_t index) | Obtains character indices of glyphs in a run by index. |
void OH_Drawing_DestroyRunStringIndices (OH_Drawing_Array *stringIndices) | Releases the pointer to a character index array. |
void OH_Drawing_GetRunStringRange (OH_Drawing_Run *run, uint64_t *location, uint64_t *length) | Obtains the range of glyphs generated by a run. |
float OH_Drawing_GetRunTypographicBounds (OH_Drawing_Run *run, float *ascent, float *descent, float *leading) | Obtains the typographic boundary of a run. The typographic boundary is related to the font and font size used for typography, but not the characters within the text. |
void OH_Drawing_RunPaint (OH_Drawing_Canvas *canvas, OH_Drawing_Run *run, double x, double y) | Paints the text contained in a run on the canvas. |
OH_Drawing_Rect * OH_Drawing_GetRunImageBounds (OH_Drawing_Run *run) | Obtains the image boundary of a run. The image boundary is related to characters and is equivalent to the visual boundary. |
void OH_Drawing_DestroyRunImageBounds (OH_Drawing_Rect *rect) | Releases the pointer to an image boundary object of a run. |
OH_Drawing_Array * OH_Drawing_GetRunGlyphs (OH_Drawing_Run *run, int64_t start, int64_t length) | Obtains an array of glyphs within the specified range of a run. |
uint16_t OH_Drawing_GetRunGlyphsByIndex (OH_Drawing_Array *glyphs, size_t index) | Obtains individual glyphs in a run by index. |
void OH_Drawing_DestroyRunGlyphs (OH_Drawing_Array *glyphs) | Releases the pointer to a glyph array in a run. |
OH_Drawing_Array * OH_Drawing_GetRunPositions (OH_Drawing_Run *run, int64_t start, int64_t length) | Obtains the positions of glyphs within the specified range of a run. |
OH_Drawing_Point * OH_Drawing_GetRunPositionsByIndex (OH_Drawing_Array *positions, size_t index) | Obtains the positions of individual glyphs in a run by index. |
void OH_Drawing_DestroyRunPositions (OH_Drawing_Array *positions) | Releases the pointer to a glyph position array in a run. |
uint32_t OH_Drawing_GetRunGlyphCount (OH_Drawing_Run *run) | Obtains the number of glyphs in a run. |
你可能感兴趣的鸿蒙文章
harmony 鸿蒙DisplaySoloist_ExpectedRateRange
harmony 鸿蒙NativeColorSpaceManager
0
赞
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦