harmony 鸿蒙drawing_text_typography.h

2023-06-24 浏览 (624)

drawing_text_typography.h

Overview

Declares functions related to typography in the drawing module.

Since: 8

Related Modules:

Drawing

Summary

Enums

NameDescription
OH_Drawing_TextDirection { TEXT_DIRECTION_RTL, TEXT_DIRECTION_LTR }Enumerates text directions.
OH_Drawing_TextAlign {
TEXT_ALIGN_LEFT, TEXT_ALIGN_RIGHT, TEXT_ALIGN_CENTER, TEXT_ALIGN_JUSTIFY,
TEXT_ALIGN_START, TEXT_ALIGN_END
}
Enumerates text alignment modes.
OH_Drawing_FontWeight {
FONT_WEIGHT_100, FONT_WEIGHT_200, FONT_WEIGHT_300, FONT_WEIGHT_400,
FONT_WEIGHT_500, FONT_WEIGHT_600, FONT_WEIGHT_700, FONT_WEIGHT_800,
FONT_WEIGHT_900
}
Enumerates font weights.
OH_Drawing_TextBaseline { TEXT_BASELINE_ALPHABETIC, TEXT_BASELINE_IDEOGRAPHIC }Enumerates text baselines.
OH_Drawing_TextDecoration { TEXT_DECORATION_NONE = 0x0, TEXT_DECORATION_UNDERLINE = 0x1, TEXT_DECORATION_OVERLINE = 0x2, TEXT_DECORATION_LINE_THROUGH = 0x4 }Enumerates text decorations.
OH_Drawing_FontStyle { FONT_STYLE_NORMAL, FONT_STYLE_ITALIC }Enumerates font styles.

Functions

NameDescription
OH_Drawing_CreateTypographyStyle (void)Creates an OH_Drawing_TypographyStyle object.
OH_Drawing_DestroyTypographyStyle (OH_Drawing_TypographyStyle *)Releases the memory occupied by an OH_Drawing_TypographyStyle object.
OH_Drawing_SetTypographyTextDirection (OH_Drawing_TypographyStyle *, int)Sets the text direction.
OH_Drawing_SetTypographyTextAlign (OH_Drawing_TypographyStyle *, int)Sets the text alignment mode.
OH_Drawing_SetTypographyTextMaxLines (OH_Drawing_TypographyStyle *, int)Sets the maximum number of lines in a text file.
OH_Drawing_CreateTextStyle (void)Creates an OH_Drawing_TextStyle object.
OH_Drawing_DestroyTextStyle (OH_Drawing_TextStyle *)Releases the memory occupied by an OH_Drawing_TextStyle object.
OH_Drawing_SetTextStyleColor (OH_Drawing_TextStyle *, uint32_t)Sets the text color.
OH_Drawing_SetTextStyleFontSize (OH_Drawing_TextStyle *, double)Sets the font size.
OH_Drawing_SetTextStyleFontWeight (OH_Drawing_TextStyle *, int)Sets the font weight.
OH_Drawing_SetTextStyleBaseLine (OH_Drawing_TextStyle *, int)Sets the text baseline.
OH_Drawing_SetTextStyleDecoration (OH_Drawing_TextStyle *, int)Sets the text decoration.
OH_Drawing_SetTextStyleDecorationColor (OH_Drawing_TextStyle *, uint32_t)Sets the color for the text decoration.
OH_Drawing_SetTextStyleFontHeight (OH_Drawing_TextStyle *, double)Sets the font height.
OH_Drawing_SetTextStyleFontFamilies (OH_Drawing_TextStyle *, int, const char *fontFamilies[])Sets the font families.
OH_Drawing_SetTextStyleFontStyle (OH_Drawing_TextStyle *, int)Sets the font style.
OH_Drawing_SetTextStyleLocale (OH_Drawing_TextStyle *, const char *)Sets the locale.
OH_Drawing_CreateTypographyHandler (OH_Drawing_TypographyStyle *, OH_Drawing_FontCollection *)Creates a pointer to an OH_Drawing_TypographyCreate object.
OH_Drawing_DestroyTypographyHandler (OH_Drawing_TypographyCreate *)Releases the memory occupied by an OH_Drawing_TypographyCreate object.
OH_Drawing_TypographyHandlerPushTextStyle (OH_Drawing_TypographyCreate *, OH_Drawing_TextStyle *)Sets the text style.
OH_Drawing_TypographyHandlerAddText (OH_Drawing_TypographyCreate *, const char *)Sets the text content.
OH_Drawing_TypographyHandlerPopTextStyle (OH_Drawing_TypographyCreate *)Removes the topmost style in the stack, leaving the remaining styles in effect.
OH_Drawing_CreateTypography (OH_Drawing_TypographyCreate *)Creates an OH_Drawing_Typography object.
OH_Drawing_DestroyTypography (OH_Drawing_Typography *)Releases the memory occupied by an OH_Drawing_Typography object.
OH_Drawing_TypographyLayout (OH_Drawing_Typography *, double)Lays out the typography.
OH_Drawing_TypographyPaint (OH_Drawing_Typography *, OH_Drawing_Canvas *, double, double)Paints text on the canvas.
OH_Drawing_TypographyGetMaxWidth (OH_Drawing_Typography *)Obtains the maximum width.
OH_Drawing_TypographyGetHeight (OH_Drawing_Typography *)Obtains the height.
OH_Drawing_TypographyGetLongestLine (OH_Drawing_Typography *)Obtains the longest line.
OH_Drawing_TypographyGetMinIntrinsicWidth (OH_Drawing_Typography *)Obtains the minimum intrinsic width.
OH_Drawing_TypographyGetMaxIntrinsicWidth (OH_Drawing_Typography *)Obtains the maximum intrinsic width.
OH_Drawing_TypographyGetAlphabeticBaseline (OH_Drawing_Typography *)Obtains the alphabetic baseline.
OH_Drawing_TypographyGetIdeographicBaseline (OH_Drawing_Typography *)Obtains the ideographic baseline.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Native APIs

harmony 鸿蒙AVCapability

harmony 鸿蒙AVDemuxer

harmony 鸿蒙AVMuxer

harmony 鸿蒙AVScreenCapture

harmony 鸿蒙AVSource

harmony 鸿蒙AudioDecoder

harmony 鸿蒙AudioEncoder

harmony 鸿蒙CodecBase

harmony 鸿蒙Core

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/d8ecbcb8c37d48709f5b73dd3ae436ec