Skip to main content

Crate ohos_native_drawing_sys

Crate ohos_native_drawing_sys 

Source

Structs§

OH_Drawing_Bitmap
OH_Drawing_BitmapFormat
@brief This struct describes the pixel format of a bitmap, including the color type and alpha type.
OH_Drawing_Brush
OH_Drawing_Canvas
OH_Drawing_ColorFilter
OH_Drawing_ColorSpace
OH_Drawing_Filter
OH_Drawing_Font
OH_Drawing_FontAdjustInfo
@brief This struct describes the information about a font weight mapping.
OH_Drawing_FontAliasInfo
@brief This struct describes the information about a font alias.
OH_Drawing_FontCollection
OH_Drawing_FontConfigInfo
@brief This struct describes the information about a system font configuration.
OH_Drawing_FontDescriptor
@brief This struct describes the detailed information about a system font.
OH_Drawing_FontFallbackGroup
@brief This struct describes the information about a font fallback group.
OH_Drawing_FontFallbackInfo
@brief This struct describes the information about a font fallback.
OH_Drawing_FontFeature
@brief This struct describes a font feature.
OH_Drawing_FontGenericInfo
@brief This struct describes the information about generic fonts supported by the system.
OH_Drawing_FontMgr
OH_Drawing_FontParser
OH_Drawing_FontStyleSet
OH_Drawing_FontStyleStruct
@brief This struct describes a font style.
OH_Drawing_Font_Metrics
@brief This struct describes the measurement information about a font.
OH_Drawing_GpuContext
OH_Drawing_GpuContextOptions
@brief This struct describes the options about the GPU context.
OH_Drawing_Image
OH_Drawing_ImageFilter
OH_Drawing_Image_Info
@brief This struct describes the image information.
OH_Drawing_LineMetrics
@brief This struct describes the measurement information about a line of text.
OH_Drawing_MaskFilter
OH_Drawing_Matrix
OH_Drawing_MemoryStream
OH_Drawing_Path
OH_Drawing_PathEffect
OH_Drawing_Pen
OH_Drawing_PixelMap
OH_Drawing_PlaceholderSpan
@brief This struct describes the placeholder that acts as a span.
OH_Drawing_Point
OH_Drawing_Point2D
@brief OH_Drawing_Point2D defines a two-dimensional coordinate point.
OH_Drawing_Corner_Radii defines rounded corner radii, consisting of an x-axis radius and a y-axis radius.
OH_Drawing_Point3D
@brief This struct describes a three-dimensional coordinate point.
OH_Drawing_PositionAndAffinity
OH_Drawing_Range
OH_Drawing_Rect
OH_Drawing_RectStyle_Info
@brief This struct describes the style of a rectangle.
OH_Drawing_Region
OH_Drawing_RoundRect
OH_Drawing_RunBuffer
@brief This struct describes a run, which provides storage for glyphs and positions.
OH_Drawing_SamplingOptions
OH_Drawing_ShaderEffect
OH_Drawing_ShadowLayer
OH_Drawing_StrutStyle
@brief This struct describes a strut style. The strut style determines the line spacing, baseline alignment mode, and other properties related to the line height when drawing text.
OH_Drawing_Surface
OH_Drawing_TextBlob
OH_Drawing_TextBlobBuilder
OH_Drawing_TextBox
OH_Drawing_TextShadow
OH_Drawing_TextStyle
OH_Drawing_Typeface
OH_Drawing_Typography
OH_Drawing_TypographyCreate
OH_Drawing_TypographyStyle

Constants§

OH_Drawing_AlphaFormat_ALPHA_FORMAT_OPAQUE
The bitmap does not have the alpha component.
OH_Drawing_AlphaFormat_ALPHA_FORMAT_PREMUL
The color component of each pixel is premultiplied by the alpha component.
OH_Drawing_AlphaFormat_ALPHA_FORMAT_UNKNOWN
Unknown format.
OH_Drawing_AlphaFormat_ALPHA_FORMAT_UNPREMUL
The color component of each pixel is not premultiplied by the alpha component.
OH_Drawing_BlendMode_BLEND_MODE_CLEAR
Clear mode. r = 0.
OH_Drawing_BlendMode_BLEND_MODE_COLOR
Color mode.
OH_Drawing_BlendMode_BLEND_MODE_COLOR_BURN
Color burn mode.
OH_Drawing_BlendMode_BLEND_MODE_COLOR_DODGE
Color dodge mode.
OH_Drawing_BlendMode_BLEND_MODE_DARKEN
Darken mode. rc = s + d - max(s * da, d * sa), ra = s + (1 - sa) * d.
OH_Drawing_BlendMode_BLEND_MODE_DIFFERENCE
Difference mode. rc = s + d - 2 * (min(s * da, d * sa)), ra = s + (1 - sa) * d.
OH_Drawing_BlendMode_BLEND_MODE_DST
r = d (The four channels of result are equal to the four channels of destination, that is, the result is equal to the destination.)
OH_Drawing_BlendMode_BLEND_MODE_DST_ATOP
r = d * sa + s * (1 - da).
OH_Drawing_BlendMode_BLEND_MODE_DST_IN
r = d * sa.
OH_Drawing_BlendMode_BLEND_MODE_DST_OUT
r = d * (1 - sa).
OH_Drawing_BlendMode_BLEND_MODE_DST_OVER
r = d + (1 - da) * s.
OH_Drawing_BlendMode_BLEND_MODE_EXCLUSION
Exclusion mode. rc = s + d - two(s * d), ra = s + (1 - sa) * d.
OH_Drawing_BlendMode_BLEND_MODE_HARD_LIGHT
Hard light mode.
OH_Drawing_BlendMode_BLEND_MODE_HUE
Hue mode.
OH_Drawing_BlendMode_BLEND_MODE_LIGHTEN
Lighten mode. rc = rc = s + d - min(s * da, d * sa), ra = s + (1 - sa) * d.
OH_Drawing_BlendMode_BLEND_MODE_LUMINOSITY
Luminosity mode.
OH_Drawing_BlendMode_BLEND_MODE_MODULATE
r = s * d.
OH_Drawing_BlendMode_BLEND_MODE_MULTIPLY
Multiply mode. r = s * (1 - da) + d * (1 - sa) + s * d.
OH_Drawing_BlendMode_BLEND_MODE_OVERLAY
Overlay mode.
OH_Drawing_BlendMode_BLEND_MODE_PLUS
r = min(s + d, 1).
OH_Drawing_BlendMode_BLEND_MODE_SATURATION
Saturation mode.
OH_Drawing_BlendMode_BLEND_MODE_SCREEN
Screen mode. r = s + d - s * d.
OH_Drawing_BlendMode_BLEND_MODE_SOFT_LIGHT
Soft light mode.
OH_Drawing_BlendMode_BLEND_MODE_SRC
r = s (The four channels of result are equal to the four channels of source, that is, the result is equal to the source.)
OH_Drawing_BlendMode_BLEND_MODE_SRC_ATOP
r = s * da + d * (1 - sa).
OH_Drawing_BlendMode_BLEND_MODE_SRC_IN
r = s * da.
OH_Drawing_BlendMode_BLEND_MODE_SRC_OUT
r = s * (1 - da).
OH_Drawing_BlendMode_BLEND_MODE_SRC_OVER
r = s + (1 - sa) * d.
OH_Drawing_BlendMode_BLEND_MODE_XOR
r = s * (1 - da) + d * (1 - sa).
OH_Drawing_BlurType_INNER
Blurs inside the border, and draws nothing outside.
OH_Drawing_BlurType_NORMAL
Blurs both inside and outside the original border.
OH_Drawing_BlurType_OUTER
Draws nothing inside the border, and blurs outside.
OH_Drawing_BlurType_SOLID
Draws solid inside the border, and blurs outside.
OH_Drawing_BreakStrategy_BREAK_STRATEGY_BALANCED
Line breaks are performed at the word boundary.
OH_Drawing_BreakStrategy_BREAK_STRATEGY_GREEDY
Each line is filled as much as possible during line break.
OH_Drawing_BreakStrategy_BREAK_STRATEGY_HIGH_QUALITY
Text continuity is preferentially considered during line break.
OH_Drawing_CanvasClipOp_DIFFERENCE
Clips a specified area. That is, the difference set is obtained.
OH_Drawing_CanvasClipOp_INTERSECT
Retains a specified area. That is, the intersection is obtained.
OH_Drawing_CanvasShadowFlags_SHADOW_FLAGS_ALL
All the preceding shadow flags are used.
OH_Drawing_CanvasShadowFlags_SHADOW_FLAGS_GEOMETRIC_ONLY
No analysis on the shadows is required.
OH_Drawing_CanvasShadowFlags_SHADOW_FLAGS_NONE
There is no shadow flag.
OH_Drawing_CanvasShadowFlags_SHADOW_FLAGS_TRANSPARENT_OCCLUDER
The occluding object is transparent.
OH_Drawing_ColorFormat_COLOR_FORMAT_ALPHA_8
Each pixel is represented by 8 bits, which together indicate alpha.
OH_Drawing_ColorFormat_COLOR_FORMAT_ARGB_4444
Each pixel is represented by 16 bits. From the most significant bit to the least significant bit, every 4 bits indicate alpha, red, green, and blue, respectively.
OH_Drawing_ColorFormat_COLOR_FORMAT_BGRA_8888
Each pixel is represented by 32 bits. From the most significant bit to the least significant bit, every 8 bits indicate blue, green, red, and alpha, respectively.
OH_Drawing_ColorFormat_COLOR_FORMAT_RGBA_8888
Each pixel is represented by 32 bits. From the most significant bit to the least significant bit, every 8 bits indicate alpha, red, green, and blue, respectively.
OH_Drawing_ColorFormat_COLOR_FORMAT_RGB_565
Each pixel is represented by 16 bits. From the most significant bit to the least significant bit, the first 5 bits indicate red, the subsequent 6 bits indicate green, and the last 5 bits indicate blue.
OH_Drawing_ColorFormat_COLOR_FORMAT_UNKNOWN
Unknown format.
OH_Drawing_CornerPos_CORNER_POS_BOTTOM_LEFT
Bottom left corner of the rounded rectangle.
OH_Drawing_CornerPos_CORNER_POS_BOTTOM_RIGHT
Bottom right corner of the rounded rectangle.
OH_Drawing_CornerPos_CORNER_POS_TOP_LEFT
Top left corner of the rounded rectangle.
OH_Drawing_CornerPos_CORNER_POS_TOP_RIGHT
Top right corner of the rounded rectangle.
OH_Drawing_EllipsisModal_ELLIPSIS_MODAL_HEAD
Header ellipsis mode, that is, the ellipsis appears at the beginning of a line. This enumerated value is valid only when the maximum number of text lines is set to 1 by calling {@link OH_Drawing_SetTypographyTextMaxLines}.
OH_Drawing_EllipsisModal_ELLIPSIS_MODAL_MIDDLE
Middle ellipsis mode, that is, the ellipsis appears in the middle of a line. This enumerated value is valid only when the maximum number of text lines is set to 1 by calling {@link OH_Drawing_SetTypographyTextMaxLines}.
OH_Drawing_EllipsisModal_ELLIPSIS_MODAL_TAIL
End ellipsis mode, that is, the ellipsis appears at the end of a line. This enumerated value is valid when the maximum number of text lines is set to any value by calling {@link OH_Drawing_SetTypographyTextMaxLines}.
OH_Drawing_ErrorCode_OH_DRAWING_ERROR_INVALID_PARAMETER
Invalid input parameter. For example, NULL is passed in.
OH_Drawing_ErrorCode_OH_DRAWING_ERROR_NO_PERMISSION
Permission denied.
OH_Drawing_ErrorCode_OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE
The input parameter is not in the valid range.
OH_Drawing_ErrorCode_OH_DRAWING_SUCCESS
Operation successful.
OH_Drawing_FilterMode_FILTER_MODE_LINEAR
Linear filter mode.
OH_Drawing_FilterMode_FILTER_MODE_NEAREST
Nearest filter mode.
OH_Drawing_FontConfigInfoErrorCode_ERROR_FONT_CONFIG_INFO_ALLOC_MEMORY
Memory allocation fails.
OH_Drawing_FontConfigInfoErrorCode_ERROR_FONT_CONFIG_INFO_COPY_STRING_DATA
Failed to copy the string data.
OH_Drawing_FontConfigInfoErrorCode_ERROR_FONT_CONFIG_INFO_PARSE_FILE
Failed to parse the system configuration file.
OH_Drawing_FontConfigInfoErrorCode_ERROR_FONT_CONFIG_INFO_UNKNOWN
Unknown error.
OH_Drawing_FontConfigInfoErrorCode_SUCCESS_FONT_CONFIG_INFO
Operation successful.
OH_Drawing_FontEdging_FONT_EDGING_ALIAS
No anti-aliasing processing is used.
OH_Drawing_FontEdging_FONT_EDGING_ANTI_ALIAS
Uses anti-aliasing to smooth the jagged edges.
OH_Drawing_FontEdging_FONT_EDGING_SUBPIXEL_ANTI_ALIAS
Uses sub-pixel anti-aliasing to provide a smoother effect for jagged edges.
OH_Drawing_FontHinting_FONT_HINTING_FULL
Full font hinting is used to improve contrast.
OH_Drawing_FontHinting_FONT_HINTING_NONE
No font hinting is used.
OH_Drawing_FontHinting_FONT_HINTING_NORMAL
Normal font hinting is used to improve contrast.
OH_Drawing_FontHinting_FONT_HINTING_SLIGHT
Slight font hinting is used to improve contrast.
OH_Drawing_FontStyle_FONT_STYLE_ITALIC
Italic.
OH_Drawing_FontStyle_FONT_STYLE_NORMAL
Normal style.
OH_Drawing_FontStyle_FONT_STYLE_OBLIQUE
Oblique.
OH_Drawing_FontWeight_FONT_WEIGHT_100
Thin.
OH_Drawing_FontWeight_FONT_WEIGHT_200
Extra-light.
OH_Drawing_FontWeight_FONT_WEIGHT_300
Light.
OH_Drawing_FontWeight_FONT_WEIGHT_400
Normal/Regular.
OH_Drawing_FontWeight_FONT_WEIGHT_500
Medium.
OH_Drawing_FontWeight_FONT_WEIGHT_600
Semi-bold.
OH_Drawing_FontWeight_FONT_WEIGHT_700
Bold.
OH_Drawing_FontWeight_FONT_WEIGHT_800
Extra-bold.
OH_Drawing_FontWeight_FONT_WEIGHT_900
Black.
OH_Drawing_FontWidth_FONT_WIDTH_CONDENSED
Condensed font.
OH_Drawing_FontWidth_FONT_WIDTH_EXPANDED
Expanded font.
OH_Drawing_FontWidth_FONT_WIDTH_EXTRA_CONDENSED
Extra condensed font.
OH_Drawing_FontWidth_FONT_WIDTH_EXTRA_EXPANDED
Extra expanded font.
OH_Drawing_FontWidth_FONT_WIDTH_NORMAL
Normal font.
OH_Drawing_FontWidth_FONT_WIDTH_SEMI_CONDENSED
Semi-condensed font.
OH_Drawing_FontWidth_FONT_WIDTH_SEMI_EXPANDED
Semi-expanded font.
OH_Drawing_FontWidth_FONT_WIDTH_ULTRA_CONDENSED
Ultra condensed font.
OH_Drawing_FontWidth_FONT_WIDTH_ULTRA_EXPANDED
Ultra expanded font.
OH_Drawing_MipmapMode_MIPMAP_MODE_LINEAR
Linear interpolation sampling between two adjacent mipmap levels.
OH_Drawing_MipmapMode_MIPMAP_MODE_NEAREST
Nearest sampling from two adjacent mipmap levels.
OH_Drawing_MipmapMode_MIPMAP_MODE_NONE
Mipmap level ignored.
OH_Drawing_PathAddMode_PATH_ADD_MODE_APPEND
Adds a path in append mode.
OH_Drawing_PathAddMode_PATH_ADD_MODE_EXTEND
Adds a line segment to close the path if the previous path is not closed.
OH_Drawing_PathDirection_PATH_DIRECTION_CCW
Adds a closed contour counterclockwise.
OH_Drawing_PathDirection_PATH_DIRECTION_CW
Adds a closed contour clockwise.
OH_Drawing_PathFillType_PATH_FILL_TYPE_EVEN_ODD
For any point in the drawing area, a ray is cast in an arbitrary direction. If the number of intersections between this ray and the path is odd, the point is deemed inside the path and needs to be colored; if the number is even, it remains uncolored.
OH_Drawing_PathFillType_PATH_FILL_TYPE_INVERSE_EVEN_ODD
Same as PATH_FILL_TYPE_EVEN_ODD, but draws outside of the path, rather than inside.
OH_Drawing_PathFillType_PATH_FILL_TYPE_INVERSE_WINDING
Same as PATH_FILL_TYPE_WINDING, but draws outside of the path, rather than inside.
OH_Drawing_PathFillType_PATH_FILL_TYPE_WINDING
For any point within the drawing area, a ray is cast in an arbitrary direction. The count starts at 0 for all intersections between this ray and the path.
Each clockwise intersection—where the path crosses the ray from left to right—results in the count being incremented by 1, while each counterclockwise intersection—where the path crosses the ray from right to left—causes the count to be decremented by 1. A point is deemed inside the path and needs to be colored if the final count is non-zero; if the count is 0, the point remains uncolored.
OH_Drawing_PathMeasureMatrixFlags_GET_POSITION_AND_TANGENT_MATRIX
Matrix corresponding to the position and tangent information.
OH_Drawing_PathMeasureMatrixFlags_GET_POSITION_MATRIX
Matrix corresponding to the position information.
OH_Drawing_PathMeasureMatrixFlags_GET_TANGENT_MATRIX
Matrix corresponding to the tangent information.
OH_Drawing_PathOpMode_PATH_OP_MODE_DIFFERENCE
Difference operation.
OH_Drawing_PathOpMode_PATH_OP_MODE_INTERSECT
Intersection operation.
OH_Drawing_PathOpMode_PATH_OP_MODE_REVERSE_DIFFERENCE
Reverse difference operation.
OH_Drawing_PathOpMode_PATH_OP_MODE_UNION
Union operation.
OH_Drawing_PathOpMode_PATH_OP_MODE_XOR
XOR operation.
OH_Drawing_PenLineCapStyle_LINE_FLAT_CAP
There is no cap style. Both ends of the line segment are cut off square.
OH_Drawing_PenLineCapStyle_LINE_ROUND_CAP
Round cap style. Both ends have a semicircle centered, the diameter of which is the same as the width of the line segment.
OH_Drawing_PenLineCapStyle_LINE_SQUARE_CAP
Square cap style. Both ends have a square, the height of which is half of the width of the line segment, with the same width.
OH_Drawing_PenLineJoinStyle_LINE_BEVEL_JOIN
Beveled corner.
OH_Drawing_PenLineJoinStyle_LINE_MITER_JOIN
Mitered corner. If the angle of a polyline is small, its miter length may be inappropriate. In this case, you need to use the miter limit to limit the miter length.
OH_Drawing_PenLineJoinStyle_LINE_ROUND_JOIN
Round corner.
OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_ABOVE_BASELINE
Aligned above the baseline.
OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_BELOW_BASELINE
Aligned below the baseline.
OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_BOTTOM_OF_ROW_BOX
Aligned to the bottom of the row box.
OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_CENTER_OF_ROW_BOX
Aligned to the center of the row box.
OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_OFFSET_AT_BASELINE
Aligned to the baseline.
OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_TOP_OF_ROW_BOX
Aligned to the top of the row box.
OH_Drawing_PointMode_POINT_MODE_LINES
Draws every two points as a line segment.
OH_Drawing_PointMode_POINT_MODE_POINTS
Draws each point separately.
OH_Drawing_PointMode_POINT_MODE_POLYGON
Draws an array of points as an open polygon.
OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_INCLUDELINESPACEBOTTOM
Include line spacing bottom style. The text box height includes the bottom portion of the line spacing.
OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_INCLUDELINESPACEMIDDLE
Include line spacing middle style. The text box height includes the middle portion of the line spacing.
OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_INCLUDELINESPACETOP
Include line spacing top style. The text box height includes the top portion of the line spacing.
OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_MAX
Max style. The text box height takes the maximum height among all lines.
OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_STRUCT
Struct style. The Strut Style determines the text box height.
OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_TIGHT
Tight style. The text box height closely fits the text content boundary.
OH_Drawing_RectWidthStyle_RECT_WIDTH_STYLE_MAX
Max style. The text box height takes the maximum height among all lines.
OH_Drawing_RectWidthStyle_RECT_WIDTH_STYLE_TIGHT
Tight style. The text box height closely fits the text content boundary.
OH_Drawing_RegionOpMode_REGION_OP_MODE_DIFFERENCE
Difference operation.
OH_Drawing_RegionOpMode_REGION_OP_MODE_INTERSECT
Intersection operation.
OH_Drawing_RegionOpMode_REGION_OP_MODE_REPLACE
Replacement operation.
OH_Drawing_RegionOpMode_REGION_OP_MODE_REVERSE_DIFFERENCE
Reverse difference operation.
OH_Drawing_RegionOpMode_REGION_OP_MODE_UNION
Union operation.
OH_Drawing_RegionOpMode_REGION_OP_MODE_XOR
XOR operation.
OH_Drawing_ScaleToFit_SCALE_TO_FIT_CENTER
Scales the source rectangle and aligns it to the center of the destination rectangle.
OH_Drawing_ScaleToFit_SCALE_TO_FIT_END
Scales the source rectangle and aligns it to the right and bottom edges of the destination rectangle.
OH_Drawing_ScaleToFit_SCALE_TO_FIT_FILL
Scales the source rectangle both horizontally and vertically to exactly match the destination rectangle.
OH_Drawing_ScaleToFit_SCALE_TO_FIT_START
Scales the source rectangle and aligns it to the left and top edges of the destination rectangle.
OH_Drawing_SrcRectConstraint_FAST_SRC_RECT_CONSTRAINT
The source rectangle can be partly outside the image.
OH_Drawing_SrcRectConstraint_STRICT_SRC_RECT_CONSTRAINT
The source rectangle must be completely contained in the image.
OH_Drawing_TextAlign_TEXT_ALIGN_CENTER
Center-aligned.
OH_Drawing_TextAlign_TEXT_ALIGN_END
When OH_Drawing_TextDirection is set to TEXT_DIRECTION_LTR, TEXT_ALIGN_END and TEXT_ALIGN_RIGHT are the same.
Similarly, when OH_Drawing_TextDirection is set to TEXT_DIRECTION_RTL, *TEXT_ALIGN_END
OH_Drawing_TextAlign_TEXT_ALIGN_JUSTIFY
Justified, which means that each line (except the last line) is stretched so that every line has equal width, and the left and right margins are straight.
OH_Drawing_TextAlign_TEXT_ALIGN_LEFT
Left-aligned.
OH_Drawing_TextAlign_TEXT_ALIGN_RIGHT
Right-aligned.
OH_Drawing_TextAlign_TEXT_ALIGN_START
When OH_Drawing_TextDirection is set to TEXT_DIRECTION_LTR, TEXT_ALIGN_START and TEXT_ALIGN_LEFT are the same.
Similarly, when OH_Drawing_TextDirection is set to TEXT_DIRECTION_RTL, ** TEXT_ALIGN_START** and TEXT_ALIGN_RIGHT are the same.
OH_Drawing_TextBaseline_TEXT_BASELINE_ALPHABETIC
Alphabetic, where the letters in alphabets like English sit on.
OH_Drawing_TextBaseline_TEXT_BASELINE_IDEOGRAPHIC
Ideographic, where the baseline is at the bottom of the text area.
OH_Drawing_TextDecorationStyle_TEXT_DECORATION_STYLE_DASHED
Dashed style.
OH_Drawing_TextDecorationStyle_TEXT_DECORATION_STYLE_DOTTED
Dotted style.
OH_Drawing_TextDecorationStyle_TEXT_DECORATION_STYLE_DOUBLE
Double style.
OH_Drawing_TextDecorationStyle_TEXT_DECORATION_STYLE_SOLID
Solid style.
OH_Drawing_TextDecorationStyle_TEXT_DECORATION_STYLE_WAVY
Wavy style.
OH_Drawing_TextDecoration_TEXT_DECORATION_LINE_THROUGH
A strikethrough is used for decoration.
OH_Drawing_TextDecoration_TEXT_DECORATION_NONE
No decoration.
OH_Drawing_TextDecoration_TEXT_DECORATION_OVERLINE
An overline is used for decoration.
OH_Drawing_TextDecoration_TEXT_DECORATION_UNDERLINE
An underline is used for decoration.
OH_Drawing_TextDirection_TEXT_DIRECTION_LTR
Left to right (LTR).
OH_Drawing_TextDirection_TEXT_DIRECTION_RTL
Right to left (RTL).
OH_Drawing_TextEncoding_TEXT_ENCODING_GLYPH_ID
Two bytes used to indicate the glyph index.
OH_Drawing_TextEncoding_TEXT_ENCODING_UTF8
One byte used to indicate UTF-8 or ASCII characters.
OH_Drawing_TextEncoding_TEXT_ENCODING_UTF16
Two bytes used to indicate most Unicode characters.
OH_Drawing_TextEncoding_TEXT_ENCODING_UTF32
Four bytes used to indicate all Unicode characters.
OH_Drawing_TextHeightBehavior_TEXT_HEIGHT_ALL
Enables the height set by calling {@link OH_Drawing_SetTextStyleFontHeight} for the top of the first line and the bottom of the last line in a paragraph.
OH_Drawing_TextHeightBehavior_TEXT_HEIGHT_DISABLE_ALL
Disables the height set by calling {@link OH_Drawing_SetTextStyleFontHeight} for both the top of the first line and the bottom of the last line in a paragraph.
OH_Drawing_TextHeightBehavior_TEXT_HEIGHT_DISABLE_FIRST_ASCENT
Disables the height set by calling {@link OH_Drawing_SetTextStyleFontHeight} for the top of the first line in a paragraph.
OH_Drawing_TextHeightBehavior_TEXT_HEIGHT_DISABLE_LAST_ASCENT
Disables the height set by calling {@link OH_Drawing_SetTextStyleFontHeight} for the bottom of the last line in a paragraph.
OH_Drawing_TextStyleType_TEXT_STYLE_ALL_ATTRIBUTES
All text styles.
OH_Drawing_TextStyleType_TEXT_STYLE_BACKGROUND
Text background style.
OH_Drawing_TextStyleType_TEXT_STYLE_DECORATIONS
Text decoration style.
OH_Drawing_TextStyleType_TEXT_STYLE_FONT
Font style.
OH_Drawing_TextStyleType_TEXT_STYLE_FOREGROUND
Text foreground style.
OH_Drawing_TextStyleType_TEXT_STYLE_LETTER_SPACING
Text letter spacing style.
OH_Drawing_TextStyleType_TEXT_STYLE_NONE
No text style.
OH_Drawing_TextStyleType_TEXT_STYLE_SHADOW
Text shadow style.
OH_Drawing_TextStyleType_TEXT_STYLE_WORD_SPACING
Text word spacing style.
OH_Drawing_TileMode_CLAMP
Replicates the edge color if the shader effect draws outside of its original boundary.
OH_Drawing_TileMode_DECAL
Renders the shader effect’s image only within the original boundary, and returns transparent black elsewhere.
OH_Drawing_TileMode_MIRROR
Repeats the shader effect’s image in both horizontal and vertical directions, alternating mirror images.
OH_Drawing_TileMode_REPEAT
Repeats the shader effect’s image in both horizontal and vertical directions.
OH_Drawing_VertexMode_VERTEX_MODE_TRIANGLES
Draws a triangle list. Specifically, a list of isolated triangles are drawn using every three vertices. If the number of vertices is not a multiple of 3, the extra vertices will be ignored.
OH_Drawing_VertexMode_VERTEX_MODE_TRIANGLES_STRIP
Draws a triangle strip. Specifically, the first triangle is drawn between the first 3 vertices, and all subsequent triangles use the previous 2 vertices plus the next additional vertex.
OH_Drawing_VertexMode_VERTEX_MODE_TRIANGLE_FAN
Draws a triangle fan. A triangle fan is similar to a triangle strip, except that all the triangles share one vertex (the first vertex).
OH_Drawing_WordBreakType_WORD_BREAK_TYPE_BREAK_ALL
Breaks the words at any character to prevent overflow.
OH_Drawing_WordBreakType_WORD_BREAK_TYPE_BREAK_WORD
Breaks the words at arbitrary points to prevent overflow.
OH_Drawing_WordBreakType_WORD_BREAK_TYPE_NORMAL
Normal mode.

Functions§

OH_Drawing_BitmapBuild⚠
@brief Initializes the width and height of a bitmap and sets the pixel format for the bitmap. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either bitmap or bitmapFormat is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_BitmapCreate⚠
@brief Creates an OH_Drawing_Bitmap object.
OH_Drawing_BitmapCreateFromPixels⚠
@brief Creates an OH_Drawing_Bitmap object, with the address of the memory for storing the bitmap pixels set to the memory address that you applied for. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either imageInfo or pixels is NULL or rowBytes is 0, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_BitmapDestroy⚠
@brief Destroys an OH_Drawing_Bitmap object and reclaims the memory occupied by the object.
OH_Drawing_BitmapGetAlphaFormat⚠
@brief Obtains the alpha component of a bitmap. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If bitmap is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_BitmapGetColorFormat⚠
@brief Obtains the pixel format of a bitmap. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If bitmap is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_BitmapGetHeight⚠
@brief Obtains the height of a bitmap. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If bitmap is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_BitmapGetImageInfo⚠
@brief Obtains the image information of a bitmap. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either bitmap or imageInfo is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_BitmapGetPixels⚠
@brief Obtains the pixel address of a bitmap. You can use this address to obtain the pixel data of the bitmap. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If bitmap is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_BitmapGetWidth⚠
@brief Obtains the width of a bitmap. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If bitmap is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_BitmapReadPixels⚠
@brief Reads pixels of a rectangle in a bitmap to the specified buffer. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If any of bitmap, dstInfo, and dstPixels is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_BrushCopy⚠
@brief Copies an existing {@link OH_Drawing_Brush} object to create a new one. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If brush is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_BrushCreate⚠
@brief Creates an OH_Drawing_Brush object.
OH_Drawing_BrushDestroy⚠
@brief Destroys an OH_Drawing_Brush object and reclaims the memory occupied by the object.
OH_Drawing_BrushGetAlpha⚠
@brief Obtains the alpha value of a brush. This value is used by the alpha channel when the brush fills in a shape. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If brush is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_BrushGetColor⚠
@brief Obtains the color of a brush. The color is used by the brush to fill in a shape. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If brush is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_BrushGetFilter⚠
@brief Obtains the {@link OH_Drawing_Filter} object from the brush. The filter is a container that holds a mask filter and color filter. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either brush or filter is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_BrushIsAntiAlias⚠
@brief Checks whether anti-aliasing is enabled for a brush. Anti-aliasing makes the pixels around the shape edges semi-transparent. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If brush is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_BrushReset⚠
@brief Resets a brush to the initial state. All configured attributes are cleared. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If brush is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_BrushSetAlpha⚠
@brief Sets the alpha value for a brush. This value is used by the alpha channel when the brush fills in a shape. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If brush is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_BrushSetAntiAlias⚠
@brief Enables or disables anti-aliasing for a brush. Anti-aliasing makes the pixels around the shape edges semi- transparent. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If brush is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_BrushSetBlendMode⚠
@brief Sets a blender for a brush. The blender implements the specified blend mode. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If brush is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If blendMode is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_BrushSetColor⚠
@brief Sets the color for a brush. The color is used by the brush to fill in a shape. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If brush is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_BrushSetFilter⚠
@brief Sets the filter {@link OH_Drawing_Filter} for a brush. The filter is a container that holds a mask filter and color filter. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If brush is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_BrushSetShaderEffect⚠
@brief Sets the shader effect for a brush. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If brush is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_BrushSetShadowLayer⚠
@brief Sets the shadow layer for a brush. The shadow layer effect takes effect only when text is drawn. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If brush is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasAttachBrush⚠
@brief Attaches a brush to a canvas so that the canvas can use the style and color of the brush to fill in a shape. If the brush effect changes after this function is called, you must call the function again to use the new effect in the subsequent drawing. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either canvas or brush is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasAttachPen⚠
@brief Attaches a pen to a canvas so that the canvas can use the style and color of the pen to outline a shape. If the pen effect changes after this function is called, you must call the function again to use the new effect in the subsequent drawing. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either canvas or pen is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasBind⚠
@brief Binds a bitmap to a canvas so that the content drawn on the canvas is output to the bitmap. (This process is called CPU rendering.) A canvas bound to a bitmap is a non-recording canvas. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either canvas or bitmap is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasClear⚠
@brief Clears a canvas by using a given color. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If canvas is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasClipPath⚠
@brief Clips a path. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either canvas or path is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If clipOp is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_CanvasClipRect⚠
@brief Clips a rectangle. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either canvas or rect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If clipOp is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_CanvasClipRegion⚠
@brief Clips a rectangle.
OH_Drawing_CanvasClipRoundRect⚠
@brief Clips a rounded rectangle. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either canvas or roundRect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If clipOp is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_CanvasConcatMatrix⚠
@brief Preconcats the existing matrix of the canvas with the passed-in matrix. The drawing operation triggered before this API is called is not affected. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either canvas or matrix is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasCreate⚠
@brief Creates an OH_Drawing_Canvas object.
OH_Drawing_CanvasDestroy⚠
@brief Destroys an OH_Drawing_Canvas object and reclaims the memory occupied by the object.
OH_Drawing_CanvasDetachBrush⚠
@brief Detaches the brush from a canvas so that the canvas can no longer use the previously set brush to fill in a shape. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If canvas is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasDetachPen⚠
@brief Detaches the pen from a canvas so that the canvas can no longer use the style and color of the pen to outline a shape. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If canvas is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasDrawArc⚠
@brief Draws an arc. If the absolute value of the sweep angle exceeds 360 degrees, an ellipse is drawn. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either canvas or rect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasDrawBackground⚠
@brief Draws a background filled with a brush. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either canvas or brush is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasDrawBitmap⚠
@brief Draws a bitmap. A bitmap, also referred to as a dot matrix image, a pixel map image, or a grid image, includes single points called pixels (image elements). This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either canvas or bitmap is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasDrawBitmapRect⚠
@brief Draws a portion of a bitmap onto a specified area of the canvas. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If one of canvas, bitmap, or dst is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasDrawCircle⚠
@brief Draws a circle. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either canvas or point is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If radius is less than or equal to 0, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_CanvasDrawColor⚠
@brief Fills the entire canvas with the specified color and blend mode.
OH_Drawing_CanvasDrawImageRect⚠
@brief Draws an image onto a specified area of the canvas. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If one of canvas, image, or dst is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasDrawImageRectWithSrc⚠
@brief Draws a portion of an image onto a specified area of the canvas. The area selected by the source rectangle is scaled and translated to the destination rectangle. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If one of canvas, image, src, or dst is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasDrawLine⚠
@brief Draws a line segment. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If canvas is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasDrawOval⚠
@brief Draws an oval. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either canvas or rect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasDrawPath⚠
@brief Draws a path. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either canvas or path is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasDrawPixelMapRect⚠
@brief Draws a portion of a pixel map onto a specified area of the canvas. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If one of canvas, pixelMap, or dst is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasDrawPoint⚠
@brief Draws a point.
OH_Drawing_CanvasDrawPoints⚠
@brief Draws multiple points. You can draw a single point, a line segment, or an open polygon. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either canvas or point2D is NULL, or count is 0, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If mode is not within the enumerated range, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_CanvasDrawRect⚠
@brief Draws a rectangle. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either canvas or OH_Drawing_Rect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasDrawRegion⚠
@brief Draws a region. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either canvas or region is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasDrawRoundRect⚠
@brief Draws a rounded rectangle. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either canvas or roundRect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasDrawShadow⚠
@brief Draws a spot shadow and uses a given path to outline the ambient shadow. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either canvas or path is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If flag is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_CanvasDrawSingleCharacter⚠
@brief Draws a single character. If the typeface of the current font does not support the character to draw, the system typeface is used to draw the character.
OH_Drawing_CanvasDrawTextBlob⚠
@brief Draws a text blob. If the typeface used to construct OH_Drawing_TextBlob does not support a character, that character will not be drawn. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either canvas or textBlob is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasDrawVertices⚠
@brief Draws a triangular grid described by a vertex array. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either canvas or positions is NULL, vertexCount is less than 3, or indexCount is less than 3 but not 0, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If either vertexMmode or mode is not set to one of the enumerated values, ** OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.
OH_Drawing_CanvasGetHeight⚠
@brief Obtains the canvas height. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If canvas is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasGetImageInfo⚠
@brief Obtains the image information of a canvas.
OH_Drawing_CanvasGetLocalClipBounds⚠
@brief Obtains the bounds of the cropping region of the canvas. This function cannot be used for a canvas of the recording type. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either canvas or rect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasGetSaveCount⚠
@brief Obtains the number of canvas statuses (canvas matrices) saved in the stack. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If canvas is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasGetTotalMatrix⚠
@brief Obtains the 3x3 matrix of a canvas. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either canvas or matrix is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasGetWidth⚠
@brief Obtains the canvas width. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If canvas is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasIsClipEmpty⚠
@brief Checks whether the region that can be drawn is empty after clipping.
OH_Drawing_CanvasReadPixels⚠
@brief Copies pixel data from a canvas to a specified address. This function cannot be used for a canvas of the recording type. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If one of canvas, imageInfo, or dstPixels is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasReadPixelsToBitmap⚠
@brief Copies pixel data from a canvas to an image. This function cannot be used for a canvas of the recording type. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either canvas or bitmap is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasResetMatrix⚠
@brief Resets the matrix of this canvas to an identity matrix. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If canvas is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasRestore⚠
@brief Restores the canvas status (canvas matrix) saved on the top of the stack. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If canvas is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasRestoreToCount⚠
@brief Restores to a given number of canvas statuses (canvas matrices). This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If canvas is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasRotate⚠
@brief Rotates a canvas by a given angle. A positive value indicates a clockwise rotation, and a negative value indicates a counterclockwise rotation. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If canvas is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasSave⚠
@brief Saves the current canvas status (canvas matrix) to the top of the stack. This function works with {@link OH_Drawing_CanvasRestore}. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If canvas is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasSaveLayer⚠
@brief Saves the matrix and cropping region, and allocates a bitmap for subsequent drawing. If you call {@link OH_Drawing_CanvasRestore}, changes made to the matrix and clipping region are discarded, and the bitmap is drawn. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If canvas is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasScale⚠
@brief Scales a canvas. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If canvas is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasSetMatrix⚠
@brief Sets the matrix status for a canvas. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either canvas or matrix is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasSkew⚠
@brief Skews a canvas. This function premultiplies the current canvas matrix by a skew transformation matrix and applies the resulting matrix to the canvas. The skew transformation matrix is as follows: |1 sx 0| |sy 1 0| |0 0 1| This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If canvas is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CanvasTranslate⚠
@brief Translates a canvas by a given distance. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If canvas is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_ClearFontCaches⚠
@brief Clears the font cache. (The font cache has a memory limit and a clearing mechanism. It occupies limited memory. You are not advised to clear it unless otherwise required.)
OH_Drawing_ColorFilterCreateBlendMode⚠
@brief Creates an OH_Drawing_ColorFilter object with a given blend mode.
OH_Drawing_ColorFilterCreateCompose⚠
@brief Creates an OH_Drawing_ColorFilter object by combining another two color filters. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either outerColorFilter or innerColorFilter is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_ColorFilterCreateLinearToSrgbGamma⚠
@brief Creates an OH_Drawing_ColorFilter object that applies the sRGB gamma curve to the RGB channels.
OH_Drawing_ColorFilterCreateLuma⚠
@brief Creates a ColorFilter object that multiplies the luma into the alpha channel and sets the RGB channels to zero.
OH_Drawing_ColorFilterCreateMatrix⚠
@brief Creates an OH_Drawing_ColorFilter object with a given 5x4 color matrix. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If matrix is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_ColorFilterCreateSrgbGammaToLinear⚠
@brief Creates an OH_Drawing_ColorFilter object that applies the RGB channels to the sRGB gamma curve.
OH_Drawing_ColorFilterDestroy⚠
@brief Destroys an OH_Drawing_ColorFilter object and reclaims the memory occupied by the object.
OH_Drawing_ColorSetArgb⚠
@brief Converts four variables (alpha, red, green, and blue) into a 32-bit (ARGB) variable that describes a color.
OH_Drawing_ColorSpaceCreateSrgb⚠
@brief Creates an sRGB color space.
OH_Drawing_ColorSpaceCreateSrgbLinear⚠
@brief Creates an sRGB linear (Gamma 1.0) color space.
OH_Drawing_ColorSpaceDestroy⚠
@brief Destroys an OH_Drawing_ColorSpace object and reclaims the memory occupied by the object.
OH_Drawing_CreateDashPathEffect⚠
@brief Creates a dashed path effect. The dashed line effect is determined by a group of “on” and “off” intervals. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If intervals is NULL or count is less than or equal to 0, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_CreateFontCollection⚠
@brief Creates an {@link OH_Drawing_FontCollection} object.
OH_Drawing_CreateFontDescriptor⚠
@brief Constructs a font descriptor object for describing detailed information about a system font. When the {@link OH_Drawing_FontDescriptor} is no longer needed, use {@link OH_Drawing_DestroyFontDescriptor} to release the pointer to the object.
OH_Drawing_CreateFontParser⚠
@brief Constructs a font parser object for parsing system fonts. When the {@link OH_Drawing_FontParser} is no longer needed, use {@link OH_Drawing_DestroyFontParser} to release the pointer to the object.
OH_Drawing_CreateSharedFontCollection⚠
@brief Creates a shareable {@link OH_Drawing_FontCollection} object.
OH_Drawing_CreateTextShadow⚠
@brief Creates a pointer to a text shadow object. When the {@link OH_Drawing_TextShadow} is no longer needed, use {@link OH_Drawing_DestroyTextShadow} to release the pointer to the object.
OH_Drawing_CreateTextStyle⚠
@brief Creates a pointer to an OH_Drawing_TextStyle object. When the {@link OH_Drawing_TextStyle} is no longer needed, use {@link OH_Drawing_DestroyTextStyle} to release the pointer to the object.
OH_Drawing_CreateTypography⚠
@brief Creates an OH_Drawing_Typography object. Release this pointer by calling {@link OH_Drawing_DestroyTypography} when this object is no longer needed.
OH_Drawing_CreateTypographyHandler⚠
@brief Creates an OH_Drawing_TypographyCreate object. Release this pointer by calling {@link OH_Drawing_DestroyTypographyHandler} when this object is no longer needed. You are advised to use the {@link OH_Drawing_CreateSharedFontCollection} function to create an {@link OH_Drawing_FontCollection} object.
OH_Drawing_CreateTypographyStyle⚠
@brief Creates an OH_Drawing_TypographyStyle object. Release this pointer by calling {@link OH_Drawing_DestroyTypographyStyle} when this object is no longer needed.
OH_Drawing_DestroyFontCollection⚠
@brief Destroys an OH_Drawing_FontCollection object and reclaims the memory occupied by the object.
OH_Drawing_DestroyFontDescriptor⚠
@brief Destroys an OH_Drawing_FontDescriptor object and reclaims the memory occupied by the object.
OH_Drawing_DestroyFontParser⚠
@brief Destroys an OH_Drawing_FontParser object and reclaims the memory occupied by the object.
OH_Drawing_DestroyLineMetrics⚠
@brief Destroys an OH_Drawing_LineMetrics object and reclaims the memory occupied by the object.
OH_Drawing_DestroySystemFontConfigInfo⚠
@brief Reclaims the memory occupied by the system font configuration.
OH_Drawing_DestroySystemFontList⚠
@brief Reclaims the memory occupied by the system font list.
OH_Drawing_DestroyTextShadow⚠
@brief Releases the memory occupied by the text shadow object.
OH_Drawing_DestroyTextShadows⚠
@brief Releases the memory occupied by the vector composed of OH_Drawing_TextShadow objects.
OH_Drawing_DestroyTextStyle⚠
@brief Destroys an OH_Drawing_TextStyle object and reclaims the memory occupied by the object.
OH_Drawing_DestroyTypography⚠
@brief Destroys an OH_Drawing_Typography object and reclaims the memory occupied by the object.
OH_Drawing_DestroyTypographyHandler⚠
@brief Destroys an OH_Drawing_TypographyCreate object and reclaims the memory occupied by the object.
OH_Drawing_DestroyTypographyStyle⚠
@brief Destroys an OH_Drawing_TypographyStyle object and reclaims the memory occupied by the object.
OH_Drawing_DisableFontCollectionFallback⚠
@brief Disables the system fonts.
OH_Drawing_DisableFontCollectionSystemFont⚠
@brief Disables system fonts. After disabling, the font collection object can only use registered custom fonts for text rendering.
OH_Drawing_ErrorCodeGet⚠
@brief Obtains the error code of the module.
OH_Drawing_FilterCreate⚠
@brief Creates an OH_Drawing_Filter object.
OH_Drawing_FilterDestroy⚠
@brief Destroys an OH_Drawing_Filter object and reclaims the memory occupied by the object.
OH_Drawing_FilterGetColorFilter⚠
@brief Obtains an OH_Drawing_ColorFilter object from an OH_Drawing_Filter object. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either filter or colorFilter is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_FilterSetColorFilter⚠
@brief Sets an OH_Drawing_ColorFilter object for an OH_Drawing_Filter object. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If filter is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_FilterSetImageFilter⚠
@brief Sets an OH_Drawing_ImageFilter object for an OH_Drawing_Filter object. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If filter is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_FilterSetMaskFilter⚠
@brief Sets an OH_Drawing_MaskFilter object for an OH_Drawing_Filter object. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If filter is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_FontCountText⚠
@brief Obtains the number of glyphs represented by text. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either font or text is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_FontCreate⚠
@brief Creates an OH_Drawing_Font object.
OH_Drawing_FontDestroy⚠
@brief Destroys an OH_Drawing_Font object and reclaims the memory occupied by the object.
OH_Drawing_FontGetEdging⚠
@brief Obtains the font edging effect. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If font is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_FontGetHinting⚠
@brief Obtains the font hinting effect. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If font is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_FontGetMetrics⚠
@brief Obtains the measurement information about a font. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either font or fontMetrics is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_FontGetScaleX⚠
@brief Obtains the horizontal scale ratio of this font. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If font is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_FontGetTextSize⚠
@brief Obtains the text size of a font object. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If font is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_FontGetTextSkewX⚠
@brief Obtains the horizontal skew factor of a font. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If font is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_FontGetTypeface⚠
@brief Obtains the typeface of a font. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If font is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_FontGetWidths⚠
@brief Obtains the width of each glyph in a string of text. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If any of font, glyphs, and widths is NULL, or count is 0, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_FontIsBaselineSnap⚠
@brief Gets whether the font baselines and pixels alignment when the transformation matrix is axis aligned.
OH_Drawing_FontIsEmbeddedBitmaps⚠
@brief Checks whether bitmaps are used in a font. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If font is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_FontIsFakeBoldText⚠
@brief Checks whether fake bold is used for a font. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If font is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_FontIsForceAutoHinting⚠
@brief Checks whether auto hinting is forcibly used. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If font is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_FontIsLinearText⚠
@brief Checks whether linear scaling is used for a font object. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If font is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_FontIsSubpixel⚠
@brief Checks whether sub-pixel rendering is used for a font. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If font is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_FontMeasureSingleCharacter⚠
@brief Measures the width of a single character. If the typeface of the current font does not support the character to measure, the system typeface is used to measure the character width.
OH_Drawing_FontMeasureText⚠
@brief Obtains the text width and bounding box.
OH_Drawing_FontMgrCreate⚠
@brief Creates an OH_Drawing_FontMgr object, which can be used only to manage system fonts.
OH_Drawing_FontMgrCreateFontStyleSet⚠
@brief Creates a font style set object from a font manager object.
OH_Drawing_FontMgrDestroy⚠
@brief Destroys an OH_Drawing_FontMgr object and reclaims the memory occupied by the object.
OH_Drawing_FontMgrDestroyFamilyName⚠
@brief Reclaims the memory occupied by a font family name.
OH_Drawing_FontMgrDestroyFontStyleSet⚠
@brief Reclaims the memory occupied by a font style set.
OH_Drawing_FontMgrGetFamilyCount⚠
@brief Obtains the number of font families.
OH_Drawing_FontMgrGetFamilyName⚠
@brief Obtains the font family name based on an index. When the returned name is no longer needed, use {@link OH_Drawing_FontMgrDestroyFamilyName} to release the memory occupied by the name.
OH_Drawing_FontMgrMatchFamily⚠
@brief Obtains a font style set object based on a specified font family name. When the object is no longer needed, use {@link OH_Drawing_FontMgrDestroyFontStyleSet} to release it.
OH_Drawing_FontMgrMatchFamilyStyle⚠
@brief Obtains a typeface object based on the specified font style information and font family name. When the object is no longer needed, use {@link OH_Drawing_TypefaceDestroy} to release it.
OH_Drawing_FontMgrMatchFamilyStyleCharacter⚠
@brief Obtains a typeface for the specified character. A null pointer is returned only when no typeface corresponding to the input UTF-8 character is found in the font management object. When the object is no longer needed, use {@link OH_Drawing_TypefaceDestroy} to release it.
OH_Drawing_FontParserGetFontByName⚠
@brief Obtains the information about a system font based on the given system font name. This API is supported only on phones and PC/2-in-1 devices.
OH_Drawing_FontParserGetSystemFontList⚠
@brief Obtains the list of system font names. When the list is no longer needed, use {@link OH_Drawing_DestroySystemFontList} to release the memory. This API is supported only on phones and PC/2-in-1 devices.
OH_Drawing_FontSetBaselineSnap⚠
@brief Sets whether the font baselines and pixels alignment when the transformation matrix is axis aligned.
OH_Drawing_FontSetEdging⚠
@brief Sets a font edging effect. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If font is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If fontEdging is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_FontSetEmbeddedBitmaps⚠
@brief Sets whether to use bitmaps in a font. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If font is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_FontSetFakeBoldText⚠
@brief Sets fake bold for a font by increasing the stroke width. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If font is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_FontSetForceAutoHinting⚠
@brief Sets whether to forcibly use auto hinting, that is, whether to always hint glyphs. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If font is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_FontSetHinting⚠
@brief Sets a font hinting effect. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If font is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If fontHinting is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_FontSetLinearText⚠
@brief Sets linear scaling for a font. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If font is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_FontSetScaleX⚠
@brief Sets a horizontal scale factor for a font. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If font is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_FontSetSubpixel⚠
@brief Sets whether to use sub-pixel rendering for a font. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If font is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_FontSetTextSize⚠
@brief Sets the text size for a font object. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If font is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_FontSetTextSkewX⚠
@brief Sets a horizontal skew factor for a font. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If font is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_FontSetTypeface⚠
@brief Sets a typeface for a font. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If font is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_FontStyleSetCount⚠
@brief Obtains the number of fonts in the font style set.
OH_Drawing_FontStyleSetCreateTypeface⚠
@brief Gets a typeface for the specified index. When the object is no longer needed, use {@link OH_Drawing_TypefaceDestroy} to release it.
OH_Drawing_FontStyleSetFreeStyleName⚠
@brief Frees the memory occupied by a font style.
OH_Drawing_FontStyleSetGetStyle⚠
@brief Obtains the font style. Call {@link OH_Drawing_FontStyleSetFreeStyleName} to release styleName when it is no longer needed, freeing up the allocated memory.
OH_Drawing_FontStyleSetMatchStyle⚠
@brief Obtains the typeface closest to the font style (font weight, font width, and slant). When the object is no longer needed, use {@link OH_Drawing_TypefaceDestroy} to release it.
OH_Drawing_FontTextToGlyphs⚠
@brief Converts text into glyph indices. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If any of font, text, and glyphs is NULL, byteLength is 0, or maxGlyphCount is less than or equal to 0, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_GetAffinityFromPositionAndAffinity⚠
@brief Obtains the affinity attribute of an OH_Drawing_PositionAndAffinity object. The affinity determines whether the font is close to the front text or rear text.
OH_Drawing_GetBottomFromTextBox⚠
@brief Obtains the bottom position of a text box.
OH_Drawing_GetEndFromRange⚠
@brief Obtains the end position of an OH_Drawing_Range object.
OH_Drawing_GetLeftFromTextBox⚠
@brief Obtains the left position of a text box.
OH_Drawing_GetPositionFromPositionAndAffinity⚠
@brief Obtains the position attribute of an OH_Drawing_PositionAndAffinity object.
OH_Drawing_GetRightFromTextBox⚠
@brief Obtains the right position of a text box.
OH_Drawing_GetSizeOfTextBox⚠
@brief Obtains the number of text boxes.
OH_Drawing_GetStartFromRange⚠
@brief Obtains the start position of an OH_Drawing_Range object.
OH_Drawing_GetSystemFontConfigInfo⚠
@brief Obtains the system font configuration.
OH_Drawing_GetTextDirectionFromTextBox⚠
@brief Obtains the text direction of a text box.
OH_Drawing_GetTopFromTextBox⚠
@brief Obtains the top position of a text box.
OH_Drawing_GpuContextCreateFromGL⚠
@brief Creates an OH_Drawing_GpuContext object that uses OpenGL as the backend interface.
OH_Drawing_GpuContextDestroy⚠
@brief Destroys an OH_Drawing_GpuContext object and reclaims the memory occupied by the object.
OH_Drawing_ImageBuildFromBitmap⚠
@brief Builds an image from a bitmap by sharing or copying bitmap pixels. If the bitmap is marked as immutable, the pixel memory is shared, not copied. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either image or bitmap is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_ImageCreate⚠
@brief Creates an OH_Drawing_Image object that describes an array of two-dimensional pixels to draw.
OH_Drawing_ImageDestroy⚠
@brief Destroys an OH_Drawing_Image object and reclaims the memory occupied by the object.
OH_Drawing_ImageFilterCreateBlur⚠
@brief Creates an image filter with a given blur effect.
OH_Drawing_ImageFilterCreateFromColorFilter⚠
@brief Creates an OH_Drawing_ImageFilter object with a color filter effect. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If colorFilter is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_ImageFilterDestroy⚠
@brief Destroys an OH_Drawing_ImageFilter object and reclaims the memory occupied by the object.
OH_Drawing_ImageGetHeight⚠
@brief Obtains the image height, that is, the number of pixel lines. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If image is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_ImageGetImageInfo⚠
@brief Obtains the image information. After this function is called, the passed-in image information object is filled. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either image or imageInfo is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_ImageGetWidth⚠
@brief Obtains the image width, that is, the number of pixels in each line. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If image is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_LineMetricsGetSize⚠
@brief Obtains the number of lines.
OH_Drawing_MaskFilterCreateBlur⚠
@brief Creates an OH_Drawing_MaskFilter object with a blur type.
OH_Drawing_MaskFilterDestroy⚠
@brief Destroys an OH_Drawing_MaskFilter object and reclaims the memory occupied by the object.
OH_Drawing_MatrixConcat⚠
@brief Multiplies two matrices to produce a new matrix. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If any of total, a, and b is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_MatrixCreate⚠
@brief Creates an OH_Drawing_Matrix object.
OH_Drawing_MatrixCreateRotation⚠
@brief Creates an OH_Drawing_Matrix with the rotation attribute. The matrix is obtained by rotating an identity matrix by a given degree around the rotation point (x, y).
OH_Drawing_MatrixCreateScale⚠
@brief Creates an OH_Drawing_Matrix with the scale attribute. The matrix is obtained by scaling an identity matrix with the factor (sx, sy) at the rotation point (px, py).
OH_Drawing_MatrixCreateTranslation⚠
@brief Creates an OH_Drawing_Matrix with the translation attribute. The matrix is obtained by translating the identity matrix by the distance (dx, dy).
OH_Drawing_MatrixDestroy⚠
@brief Destroys an OH_Drawing_Matrix object and reclaims the memory occupied by the object.
OH_Drawing_MatrixGetAll⚠
@brief Obtains all element values of a matrix.
OH_Drawing_MatrixGetValue⚠
@brief Obtains a matrix value of a given index, which ranges from 0 to 8. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If matrix is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If index is less than 0 or greater than 8, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_MatrixInvert⚠
@brief Inverts a matrix and returns the result. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either matrix or inverse is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_MatrixIsEqual⚠
@brief Checks whether two OH_Drawing_Matrix objects are equal. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either matrix or other is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_MatrixIsIdentity⚠
@brief Checks whether an OH_Drawing_Matrix object is an identity matrix. An identity matrix is as follows: | 1 0 0 || 0 1 0 || 0 0 1 |. This API may return an error code. For details, see {@link OH_Drawing_ErrorCodeGet} . If matrix is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_MatrixMapPoints⚠
@brief Maps a source point array to a destination point array by means of matrix transformation. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If any of matrix, src, and dst is NULL or count is less than or equal to 0, ** OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.
OH_Drawing_MatrixMapRect⚠
@brief Maps a rectangle to the smallest rectangle that can enclose the vertices to which the four source vertices are mapped by means of matrix transformation. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If any of matrix, src, and dst is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_MatrixPostRotate⚠
@brief Post multiplies this matrix by a matrix that is derived from an identity matrix after it has been rotated by a given degree around the rotation point (px, py). This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If matrix is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_MatrixPostScale⚠
@brief Post multiplies a matrix by an identity matrix that scales with the factor (sx, sy) at the scale point (px, py). This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If matrix is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_MatrixPostTranslate⚠
@brief Post multiplies this matrix by a matrix that is derived from an identity matrix after it has been translated by a given distance (dx, dy). This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If matrix is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_MatrixPreRotate⚠
@brief Premultiplies this matrix by a matrix that is derived from an identity matrix after it has been rotated by a given degree around the rotation point (px, py). This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If matrix is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_MatrixPreScale⚠
@brief Premultiplies a matrix by an identity matrix that scales with the factor (sx, sy) at the scale point (px, py).
OH_Drawing_MatrixPreTranslate⚠
@brief Premultiplies this matrix by a matrix that is derived from an identity matrix after it has been translated by a given distance (dx, dy). This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If matrix is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_MatrixReset⚠
@brief Resets a matrix to an identity matrix. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If matrix is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_MatrixRotate⚠
@brief Sets this matrix as an identity matrix and rotates it by a given degree around the rotation point (px, py). This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If matrix is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_MatrixScale⚠
@brief Sets a matrix as an identity matrix and scales it with the factor (sx, sy) at the rotation point (px, py). This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If matrix is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_MatrixSetMatrix⚠
@brief Sets matrix parameters for an OH_Drawing_Matrix object. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If OH_Drawing_Matrix is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_MatrixSetPolyToPoly⚠
@brief Generates a transformation matrix by setting source points and destination points. Both the number of source points and that of destination points must be in the range [0, 4]. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If matrix is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If count is less than 0 or greater than 4, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_MatrixSetRectToRect⚠
@brief Scales a matrix to map a source rectangle to a destination rectangle. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If any of matrix, src, and dst is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_MatrixTranslate⚠
@brief Sets a matrix as an identity matrix and translates it by a given distance (dx, dy). This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If matrix is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_MemoryStreamCreate⚠
@brief Creates an OH_Drawing_MemoryStream object. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If data is NULL or length is 0, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_MemoryStreamDestroy⚠
@brief Destroys an OH_Drawing_MemoryStream object and reclaims the memory occupied by the object.
OH_Drawing_PathAddArc⚠
@brief Adds an arc to a path as the start of a new contour. The arc added is part of the inscribed ellipse of the rectangle, from the start angle through the sweep angle. If the sweep angle is less than or equal to -360°, or if the sweep angle is greater than or equal to 360°, and start angle modulo 90 is nearly zero, an oval instead of an ellipse is added. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either path or rect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PathAddCircle⚠
@brief Adds a circle to a path in the specified direction. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If path is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If radius is less than or equal to 0, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned. If pathDirection is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_PathAddOval⚠
@brief Adds an oval to a path in the specified direction. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either path or rect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If pathDirection is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_PathAddOvalWithInitialPoint⚠
@brief Adds an oval to a path. OH_Drawing_Rect specifies the outer tangent rectangle of the oval, and ** OH_Drawing_PathDirection** specifies whether the drawing is clockwise or counterclockwise. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either path or rect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If pathDirection is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_PathAddPath⚠
@brief Transforms the points in a src path by a matrix and adds the new one to the current path. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either path or src is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PathAddPathWithMatrixAndMode⚠
@brief Transforms the points in a src path by a matrix and adds the new one to the current path with the specified adding mode. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either path or src is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If pathAddMode is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_PathAddPathWithMode⚠
@brief Adds a src path to the current path with the specified adding mode. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either path or src is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If pathAddMode is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_PathAddPathWithOffsetAndMode⚠
@brief Translates a src path by an offset and adds the new one to the current path with the specified adding mode. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either path or src is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If pathAddMode is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_PathAddPolygon⚠
@brief Adds a polygon to a path. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either path or points is NULL or count is 0, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PathAddRect⚠
@brief Adds a rectangle to a path in the specified direction. The start point is the upper left corner of the rectangle. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If path is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If pathDirection is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_PathAddRectWithInitialCorner⚠
@brief Adds a rectangle contour to a path in the specified direction. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either path or rect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If pathDirection is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_PathAddRoundRect⚠
@brief Adds a rounded rectangle to a path in the specified direction. When the path direction is clockwise, the start point is at the intersection of the rounded rectangle’s left boundary and its lower left corner. When the path direction is counterclockwise, the start point is at the intersection point between the left boundary and the upper left corner. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either path or roundRect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If pathDirection is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_PathArcTo⚠
@brief Draws an arc to a path. This is done by using angle arc mode. In this mode, a rectangle is specified first, and then a start angle and scanning degree are specified. The inscribed ellipse of the rectangle will be used to intercept the arc. The arc is a portion of the ellipse defined by the start angle and the sweep angle. If the path is empty, a line segment from the last point of the path to the start point of the arc is also added. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If path is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PathBuildFromSvgString⚠
@brief Parses the path represented by an SVG string. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either path or str is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PathClose⚠
@brief Draws a line segment from the current point to the start point of this path. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If path is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PathConicTo⚠
@brief Draws a conic curve from the last point of a path to the target point. If the path is empty, the start point ( 0, 0) is used. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If path is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PathContains⚠
@brief Checks whether a coordinate point is included in this path. For details, see {@link OH_Drawing_PathFillType}. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If path is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PathCopy⚠
@brief Creates a copy of the {@link OH_Drawing_Path} object. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If path is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PathCreate⚠
@brief Creates an OH_Drawing_Path object.
OH_Drawing_PathCubicTo⚠
@brief Draws a cubic Bezier curve from the last point of this path to the target point. If the path is empty, the start point (0, 0) is used. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If path is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PathDestroy⚠
@brief Destroys an OH_Drawing_Path object and reclaims the memory occupied by the object.
OH_Drawing_PathEffectDestroy⚠
@brief Destroys an OH_Drawing_PathEffect object and reclaims the memory occupied by the object.
OH_Drawing_PathGetBounds⚠
@brief Obtains the minimum bounds that enclose a path. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either path or rect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PathGetLength⚠
@brief Obtains the length of a path. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If path is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PathGetMatrix⚠
@brief Obtains a transformation matrix at a distance from the start point of this path. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either path or matrix is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If flag is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_PathGetPositionTangent⚠
@brief Obtains the coordinates and tangent at a distance from the start point of this path. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If any of path, position, or tangent is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PathIsClosed⚠
@brief Checks whether a path is closed. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If path is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PathLineTo⚠
@brief Draws a line segment from the last point of this path to the target point. If the path is empty, the start point (0, 0) is used. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If path is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PathMoveTo⚠
@brief Sets the start point of this path. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If path is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PathOffset⚠
@brief Translates a path by an offset along the X axis and Y axis and adds the new one to the dst path. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If path is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PathOp⚠
@brief Combines two paths based on the specified operation mode. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either path or srcPath is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If op is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_PathQuadTo⚠
@brief Draws a quadratic Bezier curve from the last point of a path to the target point. If the path is empty, the start point (0, 0) is used. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If path is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PathRConicTo⚠
@brief Draws a conic curve from the last point of a path to a point relative to the last point. If the path is empty, the start point (0, 0) is used. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If path is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PathRCubicTo⚠
@brief Draws a cubic Bezier curve from the last point of a path to a point relative to the last point. If the path is empty, the start point (0, 0) is used. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If path is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PathRLineTo⚠
@brief Draws a line segment from the last point of this path to a point relative to the last point. If the path is empty, the start point (0, 0) is used. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If path is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PathRMoveTo⚠
@brief Sets the start position relative to the last point of a path. If the path is empty, the start point (0, 0) is used. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If path is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PathRQuadTo⚠
@brief Draws a quadratic Bezier curve from the last point of this path to a point relative to the last point. If the path is empty, the start point (0, 0) is used. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If path is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PathReset⚠
@brief Resets the path data. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If path is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PathSetFillType⚠
@brief Sets the fill type of a path. The fill type determines how “inside” of the path is drawn. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If path is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If pathFillType is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_PathTransform⚠
@brief Transforms the points in a path by matrix. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either path or matrix is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PathTransformWithPerspectiveClip⚠
@brief Transforms the points in a path by matrix, and uses the new one to replace the dst path. If dst is NULL, the src path is replaced. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either src or matrix is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PenCopy⚠
@brief Creates a copy of the {@link OH_Drawing_Pen} object. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If pen is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PenCreate⚠
@brief Creates an OH_Drawing_Pen object.
OH_Drawing_PenDestroy⚠
@brief Destroys an OH_Drawing_Pen object and reclaims the memory occupied by the object.
OH_Drawing_PenGetAlpha⚠
@brief Obtains the alpha value of a pen. This value is used by the alpha channel when the pen outlines a shape. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If pen is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PenGetCap⚠
@brief Obtains the line cap style of a pen. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If pen is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PenGetColor⚠
@brief Obtains the color of a pen. The color is used by the pen to outline a shape. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If pen is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PenGetFillPath⚠
@brief Obtains the source path outline drawn using this pen and represents it using a destination path. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If any of pen, src, and dst is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PenGetFilter⚠
@brief Obtains the {@link OH_Drawing_Filter} object from the pen. The filter is a container that holds a mask filter and color filter. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either pen or filter is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PenGetJoin⚠
@brief Obtains the line join style of a pen. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If pen is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PenGetMiterLimit⚠
@brief Obtains the stroke miter limit of a polyline drawn by a pen. When the corner type is bevel, a beveled corner is displayed if the miter limit is exceeded, and a mitered corner is displayed if the miter limit is not exceeded. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If pen is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PenGetWidth⚠
@brief Obtains the thickness of a pen. This thickness determines the width of the outline of a shape. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If pen is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PenIsAntiAlias⚠
@brief Checks whether anti-aliasing is enabled for a pen. Anti-aliasing makes the pixels around the shape edges semi- transparent. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If pen is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PenReset⚠
@brief Resets a pen to the initial state. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If pen is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PenSetAlpha⚠
@brief Sets the alpha value for a pen. This value is used by the alpha channel when the pen outlines a shape. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If pen is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PenSetAntiAlias⚠
@brief Enables or disables anti-aliasing for a pen. Anti-aliasing makes the pixels around the shape edges semi- transparent. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If pen is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PenSetBlendMode⚠
@brief Sets a blender for a pen. The blender implements the specified blend mode. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If pen is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If blendMode is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_PenSetCap⚠
@brief Sets the line cap style for a pen. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If pen is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If capStyle is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_PenSetColor⚠
@brief Sets the color for a pen. The color is used by the pen to outline a shape. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If pen is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PenSetFilter⚠
@brief Sets a filter for a pen. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If pen is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PenSetJoin⚠
@brief Sets the join style for this pen. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If pen is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If joinStyle is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_PenSetMiterLimit⚠
@brief Sets the stroke miter limit for a polyline drawn by a pen. When the corner type is bevel, a beveled corner is displayed if the miter limit is exceeded, and a mitered corner is displayed if the miter limit is not exceeded. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If pen is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PenSetPathEffect⚠
@brief Sets the path effect for this pen. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If pen is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PenSetShaderEffect⚠
@brief Sets the shader effect for this pen. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If pen is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PenSetShadowLayer⚠
@brief Sets the shadow layer for a pen. The shadow layer effect takes effect only when text is drawn. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If pen is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PenSetWidth⚠
@brief Sets the thickness for a pen. This thickness determines the width of the outline of a shape. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If pen is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_PixelMapDissolve⚠
@brief Removes the relationship between a pixel map defined by this module and a pixel map defined by the image framework. The relationship is established by calling {@link OH_Drawing_PixelMapGetFromNativePixelMap} or {@link OH_Drawing_PixelMapGetFromOhPixelMapNative} .
OH_Drawing_PixelMapGetFromNativePixelMap⚠
@brief Obtains the pixel map defined by this module from a pixel map defined by the image framework.
OH_Drawing_PixelMapGetFromOhPixelMapNative⚠
@brief Obtains the pixel map defined by this module from a pixel map defined by the image framework.
OH_Drawing_PointCreate⚠
@brief Creates an OH_Drawing_Point object.
OH_Drawing_PointDestroy⚠
@brief Destroys an OH_Drawing_Point object and reclaims the memory occupied by the object.
OH_Drawing_PointGetX⚠
@brief Obtains the X coordinate of a point.
OH_Drawing_PointGetY⚠
@brief Obtains the Y coordinate of a point.
OH_Drawing_PointSet⚠
@brief Sets the X and Y coordinates of a point.
OH_Drawing_RectCopy⚠
@brief Copies a source rectangle to create a new one. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either src or dst is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_RectCreate⚠
@brief Creates an OH_Drawing_Rect object, without sorting the coordinates passed in. This means that the coordinates of the upper left corner of the rectangle can be greater than those of the lower right corner.
OH_Drawing_RectDestroy⚠
@brief Destroys an OH_Drawing_Rect object and reclaims the memory occupied by the object.
OH_Drawing_RectGetBottom⚠
@brief Obtains the Y coordinate of the lower right corner of a rectangle. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If rect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_RectGetHeight⚠
@brief Obtains the height of a rectangle. The height is calculated by using the Y coordinate of the lower right corner of the rectangle minus the Y coordinate of the upper left corner. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If rect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. @return Returns the height of the rectangle, in pixels. @param rect Pointer to an OH_Drawing_Rect object. @since 12 @version 1.0
OH_Drawing_RectGetLeft⚠
@brief Obtains the X coordinate of the upper left corner of a rectangle. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If rect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_RectGetRight⚠
@brief Obtains the X coordinate of the lower right corner of a rectangle. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If rect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_RectGetTop⚠
@brief Obtains the Y coordinate of the upper left corner of a rectangle. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If rect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_RectGetWidth⚠
@brief Obtains the width of a rectangle. The width is calculated by using the X coordinate of the lower right corner of the rectangle minus the X coordinate of the upper left corner. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If rect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_RectIntersect⚠
@brief Checks whether two rectangles intersect and if yes, sets rect to the area of intersection. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either rect or other is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_RectJoin⚠
@brief Obtains the union of two rectangles. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either rect or other is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_RectSetBottom⚠
@brief Sets the vertical coordinate of the lower right corner of a rectangle. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If rect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_RectSetLeft⚠
@brief Sets the horizontal coordinate of the upper left corner of a rectangle. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If rect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_RectSetRight⚠
@brief Sets the horizontal coordinate of the lower right corner of a rectangle. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If rect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_RectSetTop⚠
@brief Sets the vertical coordinate of the upper left corner of a rectangle. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If rect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_RegionContains⚠
@brief Checks whether a region contains the specified point. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If region is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_RegionCreate⚠
@brief Creates an OH_Drawing_Region object for more accurate graphical control.
OH_Drawing_RegionDestroy⚠
@brief Destroys an OH_Drawing_Region object and reclaims the memory occupied by the object.
OH_Drawing_RegionOp⚠
@brief Combines two regions based on the specified operation mode. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either region or dst is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If op is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_RegionSetPath⚠
@brief Sets a region to the area described by the path. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If region, path, or clip is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_RegionSetRect⚠
@brief Sets the boundary for an OH_Drawing_Region object. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either region or rect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_RegisterFont⚠
@brief Registers a custom font with the font manager. The supported font file formats are .ttf and .otf.
OH_Drawing_RegisterFontBuffer⚠
@brief Registers a font buffer in the font manager, supporting data read from ttf and otf files.
OH_Drawing_RoundRectCreate⚠
@brief Creates an OH_Drawing_RoundRect object. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet} . If rect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_RoundRectDestroy⚠
@brief Destroys an OH_Drawing_RoundRect object and reclaims the memory occupied by the object.
OH_Drawing_RoundRectGetCorner⚠
@brief Obtains the radii of the specified rounded corner in a rounded rectangle. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If roundRect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_RoundRectOffset⚠
@brief Translates a rounded rectangle by an offset along the X axis and Y axis.
OH_Drawing_RoundRectSetCorner⚠
@brief Sets the radii of the specified rounded corner in this rounded rectangle. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If roundRect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_SamplingOptionsCreate⚠
@brief Creates an OH_Drawing_SamplingOptions object. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If mipmapMode is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_SamplingOptionsDestroy⚠
@brief Destroys an OH_Drawing_SamplingOptions object and reclaims the memory occupied by the object.
OH_Drawing_SetTextShadow⚠
@brief Sets the parameters of the text shadow object.
OH_Drawing_SetTextStyleBackgroundBrush⚠
@brief Sets the background brush for a text style.
OH_Drawing_SetTextStyleBackgroundPen⚠
@brief Sets the background pen for a text style.
OH_Drawing_SetTextStyleBaseLine⚠
@brief Sets the baseline for a text style.
OH_Drawing_SetTextStyleColor⚠
@brief Sets the color for a text style.
OH_Drawing_SetTextStyleDecoration⚠
@brief Sets the decoration for a text style. Only one decoration can be set. To add multiple decorations, use {@link OH_Drawing_AddTextStyleDecoration}.
OH_Drawing_SetTextStyleDecorationColor⚠
@brief Sets the decoration color for a text style. If this API is not called or color is set to 0, the decoration color follows the text color.
OH_Drawing_SetTextStyleDecorationStyle⚠
@brief Sets the decoration style for a text style.
OH_Drawing_SetTextStyleDecorationThicknessScale⚠
@brief Sets the thickness scale factor for the decoration style of a text style.
OH_Drawing_SetTextStyleEllipsis⚠
@brief Sets the ellipsis content for a text style.
OH_Drawing_SetTextStyleEllipsisModal⚠
@brief Sets the ellipsis style for a text style.
OH_Drawing_SetTextStyleFontFamilies⚠
@brief Sets the font families for a text style.
OH_Drawing_SetTextStyleFontHeight⚠
@brief Sets the line height based on the multiple of the font size.
OH_Drawing_SetTextStyleFontSize⚠
@brief Sets the font size for a text style.
OH_Drawing_SetTextStyleFontStyle⚠
@brief Sets the font style for a text style.
OH_Drawing_SetTextStyleFontStyleStruct⚠
@brief Sets the font style, including the font weight, width, and slant, for a text style.
OH_Drawing_SetTextStyleFontWeight⚠
@brief Sets the font weight. Before OpenHarmony 6.1, only variable fonts in system fonts support font weight adjustment. Starting from OpenHarmony 6.1, both system fonts and variable fonts in third-party registered fonts support font weight adjustment. For non-variable fonts, the font weight does not change when the weight value is set to less than semi-bold, and a pseudo-bold effect may be triggered when the weight value is set to semi-bold or greater.
OH_Drawing_SetTextStyleForegroundBrush⚠
@brief Sets the foreground brush for a text style.
OH_Drawing_SetTextStyleForegroundPen⚠
@brief Sets the foreground pen for a text style.
OH_Drawing_SetTextStyleHalfLeading⚠
@brief Sets whether to enable half leading for a text style.
OH_Drawing_SetTextStyleLetterSpacing⚠
@brief Sets the letter spacing for a text style.
OH_Drawing_SetTextStyleLocale⚠
@brief Sets the locale for a text style.
OH_Drawing_SetTextStyleWordSpacing⚠
@brief Sets the word spacing for a text style.
OH_Drawing_SetTypographyStyleFontStyleStruct⚠
@brief Sets the font style, including the font weight, width, and slant, for the default text style of a typography style.
OH_Drawing_SetTypographyStyleTextStrutStyle⚠
@brief Sets the strut style for a typography style.
OH_Drawing_SetTypographyTextAlign⚠
@brief Text alignment mode.
OH_Drawing_SetTypographyTextBreakStrategy⚠
@brief Sets the text break strategy.
OH_Drawing_SetTypographyTextDirection⚠
@brief Sets the text direction in a typography style.
OH_Drawing_SetTypographyTextEllipsis⚠
@brief Sets the ellipsis text for a typography style.
OH_Drawing_SetTypographyTextEllipsisModal⚠
@brief Sets the ellipsis style for a text style.
OH_Drawing_SetTypographyTextFontFamily⚠
@brief Sets the font family name for text.
OH_Drawing_SetTypographyTextFontHeight⚠
@brief Sets the font height for text typography as a multiple of the current font size.
OH_Drawing_SetTypographyTextFontSize⚠
@brief Sets the font size for text.
OH_Drawing_SetTypographyTextFontStyle⚠
@brief Sets the default font style for a typography style.
OH_Drawing_SetTypographyTextFontWeight⚠
@brief Sets the default font weight of the typography style. Before OpenHarmony 6.1, only variable fonts in system fonts support font weight adjustment. Starting from OpenHarmony 6.1, both system fonts and variable fonts in third-party registered fonts support font weight adjustment. For non- variable fonts, the font weight does not change when the weight value is set to less than semi-bold, and a pseudo- bold effect may be triggered when the weight value is set to semi-bold or greater.
OH_Drawing_SetTypographyTextHalfLeading⚠
@brief Sets whether to enable half leading for text.
OH_Drawing_SetTypographyTextLineStyleFontFamilies⚠
@brief Sets the font family of the line style for text typography.
OH_Drawing_SetTypographyTextLineStyleFontHeight⚠
@brief Sets the font height of the line style for text typography as a multiple of the current font size.
OH_Drawing_SetTypographyTextLineStyleFontSize⚠
@brief Sets the font size for a text line style.
OH_Drawing_SetTypographyTextLineStyleFontStyle⚠
@brief Sets the font style of the strut style in a typography style.
OH_Drawing_SetTypographyTextLineStyleFontWeight⚠
@brief Sets the font weight of the text style in the strut style of the typography style. Before OpenHarmony 6.1, only variable fonts in system fonts support font weight adjustment. Starting from OpenHarmony 6.1, both system fonts and variable fonts in third-party registered fonts support font weight adjustment. For non-variable fonts, the font weight does not change when the weight value is set to less than semi-bold, and a pseudo-bold effect may be triggered when the weight value is set to semi-bold or greater.
OH_Drawing_SetTypographyTextLineStyleHalfLeading⚠
@brief Sets whether to enable half leading for a text line style.
OH_Drawing_SetTypographyTextLineStyleOnly⚠
@brief Sets whether to enable the text line style only.
OH_Drawing_SetTypographyTextLineStyleSpacingScale⚠
@brief Sets the spacing scale factor for a text line style.
OH_Drawing_SetTypographyTextLocale⚠
@brief Sets the locale for a typography style.
OH_Drawing_SetTypographyTextMaxLines⚠
@brief Sets the maximum number of lines in the text.
OH_Drawing_SetTypographyTextSplitRatio⚠
@brief Sets the text division ratio, which is used to determine the cursor position within a glyph when tapping to locate a character.
OH_Drawing_SetTypographyTextStyle⚠
@brief Sets a text style.
OH_Drawing_SetTypographyTextUseLineStyle⚠
@brief Sets whether to enable the text line style.
OH_Drawing_SetTypographyTextWordBreakType⚠
@brief Sets the word break type.
OH_Drawing_ShaderEffectCreateColorShader⚠
@brief Creates an OH_Drawing_ShaderEffect object with a single color.
OH_Drawing_ShaderEffectCreateImageShader⚠
@brief Creates an OH_Drawing_ShaderEffect object for an image shader. You are advised not to use the function for the canvas of the capture type because it affects the performance. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either image or samplingOptions is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If either tileX or tileY is not set to one of the enumerated values, ** OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.
OH_Drawing_ShaderEffectCreateLinearGradient⚠
@brief Creates a ShaderEffect object that generates a linear gradient between two points. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If any of startPt, endPt, and colors is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If tileMode is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_ShaderEffectCreateLinearGradientWithLocalMatrix⚠
@brief Creates a ShaderEffect object that generates a linear gradient between two points. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If any of startPt, endPt, and colors is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If tileMode is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_ShaderEffectCreateRadialGradient⚠
@brief Creates an OH_Drawing_ShaderEffect object that generates a radial gradient based on the center and radius of a circle. The radial gradient transitions colors from the center to the ending shape in a radial manner. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either centerPt or colors is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If tileMode is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_ShaderEffectCreateRadialGradientWithLocalMatrix⚠
@brief Creates an OH_Drawing_ShaderEffect object that generates a radial gradient based on the center and radius of a circle. The radial gradient transitions colors from the center to the ending shape in a radial manner. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either centerPt or colors is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If tileMode is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_ShaderEffectCreateSweepGradient⚠
@brief Creates an OH_Drawing_ShaderEffect object that generates a sweep gradient based on the center. A sweep gradient paints a gradient in a sweeping arc ranging from 0° to 360°. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either centerPt or colors is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If tileMode is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_ShaderEffectCreateTwoPointConicalGradient⚠
@brief Creates an OH_Drawing_ShaderEffect object that generates a gradient between two given circles. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If any of startPt, endPt, and colors is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If tileMode is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_ShaderEffectDestroy⚠
@brief Destroys an OH_Drawing_ShaderEffect object and reclaims the memory occupied by the object.
OH_Drawing_ShadowLayerCreate⚠
@brief Creates an OH_Drawing_ShadowLayer object. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If blurRadius is less than or equal to 0, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_ShadowLayerDestroy⚠
@brief Destroys an OH_Drawing_ShadowLayer object and reclaims the memory occupied by the object.
OH_Drawing_SurfaceCreateFromGpuContext⚠
@brief Creates an OH_Drawing_Surface object using the GPU context to manage the content drawn on the canvas. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If gpuContext is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_SurfaceDestroy⚠
@brief Destroys an OH_Drawing_Surface object and reclaims the memory occupied.
OH_Drawing_SurfaceGetCanvas⚠
@brief Obtains a canvas from an OH_Drawing_Surface object. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If surface is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_TextBlobBuilderAllocRunPos⚠
@brief Allocates a run to store glyphs and positions. The pointer returned does not need to be managed by the caller. It can no longer be used after {@link OH_Drawing_TextBlobBuilderMake} is called. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either textBlobBuilder or font is NULL or count is less than or equal to 0, ** OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.
OH_Drawing_TextBlobBuilderCreate⚠
@brief Creates an OH_Drawing_TextBlobBuilder object.
OH_Drawing_TextBlobBuilderDestroy⚠
@brief Destroys an OH_Drawing_TextBlobBuilder object and reclaims the memory occupied by the object.
OH_Drawing_TextBlobBuilderMake⚠
@brief Makes an OH_Drawing_TextBlob object from an OH_Drawing_TextBlobBuilder. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If textBlobBuilder is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_TextBlobCreateFromPosText⚠
@brief Creates an OH_Drawing_TextBlob object from the text. The coordinates of each character in the ** OH_Drawing_TextBlob** object are determined by the coordinate information in the OH_Drawing_Point2D array. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If any of text, point2D, and font is NULL or byteLength is 0, ** OH_DRAWING_ERROR_INVALID_PARAMETER** is returned. If textEncoding is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_TextBlobCreateFromString⚠
@brief Creates an OH_Drawing_TextBlob object from a string. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either str or font is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If textEncoding is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_TextBlobCreateFromText⚠
@brief Creates an OH_Drawing_TextBlob object from the text. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either text or font is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If textEncoding is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
OH_Drawing_TextBlobDestroy⚠
@brief Destroys an OH_Drawing_TextBlob object and reclaims the memory occupied by the object.
OH_Drawing_TextBlobGetBounds⚠
@brief Obtains the bounds of an OH_Drawing_TextBlob object. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either textBlob or rect is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_TextBlobUniqueID⚠
@brief Obtains the unique identifier of a text blob. The identifier is a non-zero value. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If textBlob is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_TextStyleAddFontFeature⚠
@brief Adds a font feature for a text style.
OH_Drawing_TextStyleAddFontVariation⚠
@brief Adds a font variation. This function takes effect only when the corresponding font file (.ttf file) supports variable adjustment. Otherwise, calling this function does not take effect.
OH_Drawing_TextStyleAddShadow⚠
@brief Adds a text shadow element to the text shadow container.
OH_Drawing_TextStyleClearFontFeature⚠
@brief Clears all the contents in a font feature map container of a text style.
OH_Drawing_TextStyleClearShadows⚠
@brief Clears all elements in the text shadow container.
OH_Drawing_TextStyleDestroyFontFamilies⚠
@brief Reclaims the memory occupied by the font families, where num specifies the number of font families.
OH_Drawing_TextStyleDestroyFontFeatures⚠
@brief Reclaims the memory occupied by the struct array that holds all the font features.
OH_Drawing_TextStyleGetBackgroundBrush⚠
@brief Obtains the background brush of a text style.
OH_Drawing_TextStyleGetBackgroundPen⚠
@brief Obtains the background pen of a text style.
OH_Drawing_TextStyleGetBaseline⚠
@brief Obtains the baseline of a text style.
OH_Drawing_TextStyleGetBaselineShift⚠
@brief Obtains the baseline drift of a text style.
OH_Drawing_TextStyleGetColor⚠
@brief Obtains the color of a text style.
OH_Drawing_TextStyleGetDecorationStyle⚠
@brief Obtains the decoration style of a text style.
OH_Drawing_TextStyleGetFontFamilies⚠
@brief Obtains the font family name list.
OH_Drawing_TextStyleGetFontFeatureSize⚠
@brief Obtains the size of a font feature map container in a text style.
OH_Drawing_TextStyleGetFontFeatures⚠
@brief Obtains all the contents in a font feature map container of a text style.
OH_Drawing_TextStyleGetFontHeight⚠
@brief Obtains the font height of a text style.
OH_Drawing_TextStyleGetFontMetrics⚠
@brief Obtains the font metrics of a text style.
OH_Drawing_TextStyleGetFontSize⚠
@brief Obtains the font size of a text style.
OH_Drawing_TextStyleGetFontStyle⚠
@brief Obtains the font style of a text style.
OH_Drawing_TextStyleGetFontStyleStruct⚠
@brief Obtains the font style, including the font weight, width, and slant, of a text style.
OH_Drawing_TextStyleGetFontWeight⚠
@brief Obtains the font weight of a text style.
OH_Drawing_TextStyleGetForegroundBrush⚠
@brief Obtains the foreground brush of a text style.
OH_Drawing_TextStyleGetForegroundPen⚠
@brief Obtains the foreground pen of a text style.
OH_Drawing_TextStyleGetHalfLeading⚠
@brief Checks whether half leading is enabled for a text style.
OH_Drawing_TextStyleGetLetterSpacing⚠
@brief Obtains the letter spacing of a text style.
OH_Drawing_TextStyleGetLocale⚠
@brief Obtains the locale of a text style.
OH_Drawing_TextStyleGetShadowCount⚠
@brief Obtains the size of the text shadow container.
OH_Drawing_TextStyleGetShadowWithIndex⚠
@brief Obtains the element at the specified index in the text shadow container.
OH_Drawing_TextStyleGetShadows⚠
@brief Obtains the text shadow container. When the {@link OH_Drawing_TextShadow} is no longer needed, use {@link OH_Drawing_DestroyTextShadows} to release the pointer to the object.
OH_Drawing_TextStyleGetWordSpacing⚠
@brief Obtains the word spacing of a text style.
OH_Drawing_TextStyleIsAttributeMatched⚠
@brief Checks whether two text styles have the same font style type.
OH_Drawing_TextStyleIsEqual⚠
@brief Checks whether two text styles are equal. The word width property is not involved in the comparison.
OH_Drawing_TextStyleIsEqualByFont⚠
@brief Checks whether the font style properties of two text styles are equal.
OH_Drawing_TextStyleIsPlaceholder⚠
@brief Checks whether a placeholder is set for a text style.
OH_Drawing_TextStyleSetBackgroundRect⚠
@brief Sets a background rectangle and style ID for a text style. The style ID is valid only when the background box is a rounded rectangle.
OH_Drawing_TextStyleSetBaselineShift⚠
@brief Sets a baseline drift for a text style.
OH_Drawing_TextStyleSetPlaceholder⚠
@brief Adds a placeholder.
OH_Drawing_TypefaceCreateDefault⚠
@brief Creates a default OH_Drawing_Typeface object.
OH_Drawing_TypefaceCreateFromFile⚠
@brief Creates an OH_Drawing_Typeface object through a file. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If path is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_TypefaceCreateFromStream⚠
@brief Creates an OH_Drawing_Typeface object through a memory stream. If the memory stream is an invalid font file, a null pointer is returned. After the memory stream is passed in, the ownership is transferred and you cannot release it. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If memoryStream is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.
OH_Drawing_TypefaceDestroy⚠
@brief Destroys an OH_Drawing_Typeface object and reclaims the memory occupied by the object.
OH_Drawing_TypographyDestroyEllipsis⚠
@brief Releases the memory occupied by the ellipsis text.
OH_Drawing_TypographyDestroyLineFontMetrics⚠
@brief Reclaims the memory occupied by the struct array that holds all the font metrics of a given line.
OH_Drawing_TypographyDestroyTextBox⚠
@brief Releases the memory occupied by a text box.
OH_Drawing_TypographyDidExceedMaxLines⚠
@brief Checks whether the text in the typography object exceeds the line limit. This function must be called after {@link OH_Drawing_TypographyLayout} is called. It returns false if the line limit is not set using {@link OH_Drawing_SetTypographyTextMaxLines}.
OH_Drawing_TypographyGetAlphabeticBaseline⚠
@brief Obtains the alphabetic baseline position of the typography object. This API must be called after {@link OH_Drawing_TypographyLayout} is called.
OH_Drawing_TypographyGetEffectiveAlignment⚠
@brief Obtains the text alignment mode.
OH_Drawing_TypographyGetGlyphPositionAtCoordinate⚠
@brief Obtains the position and affinity of the glyph at the given coordinates.
OH_Drawing_TypographyGetGlyphPositionAtCoordinateWithCluster⚠
@brief Obtains the index position and affinity of the character cluster to which the text at the coordinate belongs. A character cluster refers to a group of one or more characters. When the {@link OH_Drawing_PositionAndAffinity} is no longer needed, use {@link OH_Drawing_DestroyPositionAndAffinity} to release the pointer to the object.
OH_Drawing_TypographyGetHeight⚠
@brief Obtains the overall height of a typography object. This function must be called after {@link OH_Drawing_TypographyLayout} is called.
OH_Drawing_TypographyGetIdeographicBaseline⚠
@brief Obtains the ideographic baseline position of the typography object. This API must be called after {@link OH_Drawing_TypographyLayout} is called.
OH_Drawing_TypographyGetIndentsWithIndex⚠
@brief Obtains indents with a given index in a typography object. The line index starts from 0.
OH_Drawing_TypographyGetLineCount⚠
@brief Obtains the number of lines in a typography object. This function must be called after {@link OH_Drawing_TypographyLayout} is called.
OH_Drawing_TypographyGetLineFontMetrics⚠
@brief Obtains all font metrics from a given line in a typography object. This function must be called after {@link OH_Drawing_TypographyLayout} is called. Otherwise, a null pointer is returned. Release this pointer by calling {@link OH_Drawing_TypographyDestroyLineFontMetrics} when this object is no longer needed.
OH_Drawing_TypographyGetLineHeight⚠
@brief Obtains the line height in a typography object. This function must be called after {@link OH_Drawing_TypographyLayout} is called.
OH_Drawing_TypographyGetLineInfo⚠
@brief Obtains the metrics of a given line or the metrics of the first character in a given line in a typography object. This function must be called after {@link OH_Drawing_TypographyLayout} is called.
OH_Drawing_TypographyGetLineMetrics⚠
@brief Obtains the line metrics in a typography object. This function must be called after {@link OH_Drawing_TypographyLayout} is called. Release this pointer by calling {@link OH_Drawing_DestroyLineMetrics} when this object is no longer needed.
OH_Drawing_TypographyGetLineMetricsAt⚠
@brief Obtains the position information of a specified line in the typography object. For details, see the {@link OH_Drawing_LineMetrics} struct. This API must be called after {@link OH_Drawing_TypographyLayout} is called.
OH_Drawing_TypographyGetLineTextRange⚠
@brief Obtains the line bounds in a typography object. This function must be called after {@link OH_Drawing_TypographyLayout} is called. This function can only be used to obtain the bounds of existing lines. That is, the line index must start from 0, and the maximum index is {@link OH_Drawing_TypographyGetLineCount} – 1.
OH_Drawing_TypographyGetLineWidth⚠
@brief Obtains the line width of a specified line. This function must be called after {@link OH_Drawing_TypographyLayout} is called.
OH_Drawing_TypographyGetLongestLine⚠
@brief Obtains the width of the longest line in a typography object. This function must be called after {@link OH_Drawing_TypographyLayout} is called. You are advised to round up the return value. If the text content is empty, 0.0 is returned.
OH_Drawing_TypographyGetMaxIntrinsicWidth⚠
@brief Obtains the maximum intrinsic width in a typography object. This function must be called after {@link OH_Drawing_TypographyLayout} is called.
OH_Drawing_TypographyGetMaxWidth⚠
@brief Obtains the typography width set by the user. This function must be called after {@link OH_Drawing_TypographyLayout} is called.
OH_Drawing_TypographyGetMinIntrinsicWidth⚠
@brief Obtains the minimum intrinsic width in a typography object. This function must be called after {@link OH_Drawing_TypographyLayout} is called.
OH_Drawing_TypographyGetRectsForPlaceholders⚠
@brief Obtains text boxes for placeholders in a typography object. This function must be called after {@link OH_Drawing_TypographyLayout} is called. Release this pointer by calling {@link OH_Drawing_TypographyDestroyTextBox} when this object is no longer needed.
OH_Drawing_TypographyGetRectsForRange⚠
@brief Obtains text boxes in a given range of a typography object. This function must be called after {@link OH_Drawing_TypographyLayout} is called. Release this pointer by calling {@link OH_Drawing_TypographyDestroyTextBox} when this object is no longer needed.
OH_Drawing_TypographyGetTextAlign⚠
@brief Obtains the text alignment mode.
OH_Drawing_TypographyGetTextDirection⚠
@brief Obtains the text direction of a typography style.
OH_Drawing_TypographyGetTextEllipsis⚠
@brief Obtains the text ellipsis content of a typography style.
OH_Drawing_TypographyGetTextMaxLines⚠
@brief Obtains the maximum number of lines.
OH_Drawing_TypographyGetTextStyle⚠
@brief Obtains the default text style of a typography style.
OH_Drawing_TypographyGetUnresolvedGlyphsCount⚠
@brief Obtains the number of unresolved glyphs in a typography object. This function can be called only after {@link OH_Drawing_TypographyLayout} is called and applied.
OH_Drawing_TypographyGetWordBoundary⚠
@brief Obtains the word boundary in the typography object. When the {@link OH_Drawing_Range} is no longer needed, use {@link OH_Drawing_ReleaseRangeBuffer} to release the pointer to the object.
OH_Drawing_TypographyHandlerAddPlaceholder⚠
@brief Adds a placeholder.
OH_Drawing_TypographyHandlerAddSymbol⚠
@brief Adds the symbol to use in the typography creation process.
OH_Drawing_TypographyHandlerAddText⚠
@brief Adds text.
OH_Drawing_TypographyHandlerPopTextStyle⚠
@brief Pops the top text style out of the text style stack.
OH_Drawing_TypographyHandlerPushTextStyle⚠
@brief Pushes a text style into the text style stack. Any text added afterward will use the style currently on top of the stack.
OH_Drawing_TypographyIsEllipsized⚠
@brief Checks whether an ellipsis is configured for a typography style.
OH_Drawing_TypographyIsLineUnlimited⚠
@brief Checks whether the maximum number of lines is limited for text.
OH_Drawing_TypographyLayout⚠
@brief Performs layout calculation on the typography object and wraps text based on the specified maximum width. After this API is called, the properties of the typography object can be correctly obtained.
OH_Drawing_TypographyMarkDirty⚠
@brief Marks a typography object as dirty data. This function is used to initialize the typography state.
OH_Drawing_TypographyPaint⚠
@brief Draws text from the upper left corner at a specified position. This function must be called after {@link OH_Drawing_TypographyLayout} is called and applied.
OH_Drawing_TypographyPaintOnPath⚠
@brief Draws text along a specified path. This API must be called after {@link OH_Drawing_TypographyLayout} is called and takes effect. It is recommended to use {@link OH_Drawing_SetTypographyTextMaxLines} to set the maximum number of lines to 1 to avoid overlapping issues caused by text width exceeding the typography width.
OH_Drawing_TypographySetIndents⚠
@brief Sets indents for typography. If this function is not called, texts will have no indentation applied.
OH_Drawing_TypographyStyleDestroyStrutStyle⚠
@brief Reclaims the memory occupied by a strut style.
OH_Drawing_TypographyStyleEquals⚠
@brief Checks whether two typography styles are the same. The text height modifier mode {@link OH_Drawing_TextHeightBehavior} is not involved in the comparison.
OH_Drawing_TypographyStyleGetEffectiveAlignment⚠
@brief Obtains the text alignment mode.
OH_Drawing_TypographyStyleGetFontStyleStruct⚠
@brief Obtains the font style, including the font weight, width, and slant, of the default text style of a typography style.
OH_Drawing_TypographyStyleGetStrutStyle⚠
@brief Obtains the strut style of a typography style.
OH_Drawing_TypographyStyleIsHintEnabled⚠
@brief Checks whether font hinting is enabled for a typography style. Font hinting is used to improve the readability and appearance of small-sized text when rendering it.
OH_Drawing_TypographyStyleSetHintsEnabled⚠
@brief Sets whether to enable font hinting for a typography style. Font hinting is used to improve the readability and appearance of small-sized text when rendering it.
OH_Drawing_TypographyStyleStrutStyleEquals⚠
@brief Checks whether two strut styles are equal.
OH_Drawing_TypographyTextGetHeightBehavior⚠
@brief Obtains the text height modifier pattern.
OH_Drawing_TypographyTextGetLineStyle⚠
@brief Checks whether the text line style is enabled for a typography style.
OH_Drawing_TypographyTextSetHeightBehavior⚠
@brief Sets a text height modifier pattern.
OH_Drawing_TypographyTextlineGetStyleOnly⚠
@brief Checks whether only the text line style is enabled for a typography style.
OH_Drawing_TypographyTextlineStyleDestroyFontFamilies⚠
@brief Releases the memory occupied by the font family name list.
OH_Drawing_TypographyTextlineStyleGetFontFamilies⚠
@brief Obtains the font families of a text line style.
OH_Drawing_TypographyTextlineStyleGetFontSize⚠
@brief Obtains the font size of a text line style.
OH_Drawing_TypographyTextlineStyleGetFontStyle⚠
@brief Obtains the font style of the strut style in a typography style.
OH_Drawing_TypographyTextlineStyleGetFontWeight⚠
@brief Obtains the font weight of a text line style.
OH_Drawing_TypographyTextlineStyleGetHalfLeading⚠
@brief Checks whether half leading is enabled for a text line style.
OH_Drawing_TypographyTextlineStyleGetHeightOnly⚠
@brief Checks whether only the font height is used for a text line style.
OH_Drawing_TypographyTextlineStyleGetHeightScale⚠
@brief Obtains the height scale factor of a text line style.
OH_Drawing_TypographyTextlineStyleGetSpacingScale⚠
@brief Obtains the spacing scale factor of a text line style.
OH_Drawing_TypographyUpdateFontSize⚠
@brief Updates the font size in a typography object.

Type Aliases§

OH_Drawing_AlphaFormat
@brief Defines an enum for the alpha formats of bitmap pixels.
OH_Drawing_BlendMode
@brief Defines an enum for blend modes. In blend mode, each operation generates a new color from two colors (source color and destination color). These operations are the same for the red, green, and blue color channels (the alpha channel follows a different rule). For simplicity, the following description uses the alpha channel as an example rather than naming each channel individually. For brevity, the following abbreviations are used: s: source. d: destination. sa: source alpha. da: destination alpha. The following abbreviations are used in the calculation result: r: The calculation methods of the four channels are the same. ra: used when only the alpha channel is manipulated. rc: used when the other three color channels are manipulated.
OH_Drawing_BlurType
@brief Defines an enum for the blur types.
OH_Drawing_BreakStrategy
@brief Enumerates the text break strategies.
OH_Drawing_CanvasClipOp
@brief Enumerates the canvas clipping modes.
OH_Drawing_CanvasShadowFlags
@brief Enumerates the shadow flags.
OH_Drawing_ColorFormat
@brief Defines an enum for the storage formats of bitmap pixels.
OH_Drawing_CornerPos
@brief Defines an enum for the corner positions of a rounded rectangle.
OH_Drawing_Corner_Radii
@brief Defines corner radii, which is on x-axis and y-axis.
OH_Drawing_EllipsisModal
@brief Enumerates the ellipsis styles.
OH_Drawing_ErrorCode
@brief Defines an enum for the error codes that may be generated by the module.
OH_Drawing_FilterMode
@brief Defines an enum for the filter modes.
OH_Drawing_FontConfigInfoErrorCode
@brief Enumerates the error codes for the system font configuration information list.
OH_Drawing_FontEdging
@brief Enumerates the font edging types.
OH_Drawing_FontHinting
@brief Defines an enum for the font hinting types.
OH_Drawing_FontStyle
@brief Font styles, including non-italic, italic, and oblique.
OH_Drawing_FontWeight
@brief Enumerates the font weights.
OH_Drawing_FontWidth
@brief Enumerates the font widths.
OH_Drawing_MipmapMode
@brief Defines an enum for the mipmap modes.
OH_Drawing_PathAddMode
@brief Enumerates the path adding modes.
OH_Drawing_PathDirection
@brief Enumerates the directions of a closed contour.
OH_Drawing_PathFillType
@brief Enumerates the fill types of a path.
OH_Drawing_PathMeasureMatrixFlags
@brief Enumerates the types of matrix information obtained during path measurement.
OH_Drawing_PathOpMode
@brief Enumerates the operation modes available for a path.
OH_Drawing_PenLineCapStyle
@brief Enumerates the line cap styles of a pen. The line cap style defines the style of both ends of a line segment drawn by the pen.
OH_Drawing_PenLineJoinStyle
@brief Enumerates the line join styles of a pen. The line join style defines the shape of the joints of a polyline segment drawn by the pen.
OH_Drawing_PlaceholderVerticalAlignment
@brief Enumerates the vertical alignment modes of placeholders.
OH_Drawing_PointMode
@brief Enumerates the modes of drawing multiple points. The modes include discrete points, line segments, and open polygons.
OH_Drawing_RectHeightStyle
@brief Enumerates the rectangle height styles.
OH_Drawing_RectWidthStyle
@brief Enumerates the rectangle width styles.
OH_Drawing_RegionOpMode
@brief Enumerates the operation modes available for a region.
OH_Drawing_ScaleToFit
@brief Defines an enum for the matrix scaling modes.
OH_Drawing_SrcRectConstraint
@brief Enumerates the constraint types of the source rectangle.
OH_Drawing_TextAlign
@brief Enumerates the text alignment modes.
OH_Drawing_TextBaseline
@brief Enumerates the text baselines.
OH_Drawing_TextDecoration
@brief Enumerates the text decorations.
OH_Drawing_TextDecorationStyle
@brief Enumerates the text decoration styles.
OH_Drawing_TextDirection
@brief Enumerates the text directions.
OH_Drawing_TextEncoding
@brief Defines an enum for the text encoding types.
OH_Drawing_TextHeightBehavior
@brief Enumerates the text height modifier patterns.
OH_Drawing_TextStyleType
@brief Enumerates the text style types.
OH_Drawing_TileMode
@brief Defines an enum for the tile modes of the shader effect.
OH_Drawing_VertexMode
@brief Enumerates the modes of interpreting the geometry of a given vertex.
OH_Drawing_WordBreakType
@brief Enumerates the word break types.