openharmony 鸿蒙 capi-native-render-h

2026-08-25 浏览 (1)

native_render.h

Overview

Declares the APIs of NativeRender. For details, see Building a Rendering Node.

File to include: <arkui/native_render.h>

Library: libace_ndk.z.so

System capability: SystemCapability.ArkUI.ArkUI.Full

Since: 20

Related module: ArkUI_RenderNodeUtils

Sample: NativeRenderNodeSample

Summary

Structs

Nametypedef KeywordDescription
ArkUI_RenderNode*ArkUI_RenderNodeHandleDefines a struct for the render node pointer.
ArkUI_RenderContentModifier*ArkUI_RenderContentModifierHandleDefines a struct for the content modifier pointer.
ArkUI_FloatProperty*ArkUI_FloatPropertyHandleDefines a struct for the float property pointer.
ArkUI_Vector2Property*ArkUI_Vector2PropertyHandleDefines a struct for the 2D vector property pointer.
ArkUI_ColorProperty*ArkUI_ColorPropertyHandleDefines a struct for the color property pointer.
ArkUI_FloatAnimatableProperty*ArkUI_FloatAnimatablePropertyHandleDefines a struct for the animatable float property pointer.
ArkUI_Vector2AnimatableProperty*ArkUI_Vector2AnimatablePropertyHandleDefines a struct for the animatable 2D vector property pointer.
ArkUI_ColorAnimatableProperty*ArkUI_ColorAnimatablePropertyHandleDefines a struct for the animatable color property pointer.
ArkUI_RectShapeArkUI_RectShapeOptionDefines a struct for the rectangle shape configuration.
ArkUI_NodeBorderStyleArkUI_NodeBorderStyleOptionDefines a struct for the node border style configuration.
ArkUI_NodeBorderWidthArkUI_NodeBorderWidthOptionDefines a struct for the node border width configuration.
ArkUI_NodeBorderColorArkUI_NodeBorderColorOptionDefines a struct for the node border color configuration.
ArkUI_NodeBorderRadiusArkUI_NodeBorderRadiusOptionDefines a struct for the node border radius configuration.
ArkUI_CircleShapeArkUI_CircleShapeOptionDefines a struct for the circle shape configuration.
ArkUI_RoundRectShapeArkUI_RoundRectShapeOptionDefines a struct for the rounded rectangle shape configuration.
ArkUI_CommandPathArkUI_CommandPathOptionDefines a struct for the custom path configuration.
ArkUI_RenderNodeMaskOptionArkUI_RenderNodeMaskOptionDefines a struct for the render node mask configuration.
ArkUI_RenderNodeClipOptionArkUI_RenderNodeClipOptionDefines a struct for the render node clip configuration.

Functions

Nametypedef KeywordDescription
int32_t OH_ArkUI_RenderNodeUtils_AddRenderNode(ArkUI_NodeHandle node, ArkUI_RenderNodeHandle child)-Adds a child render node to the parent custom node.
int32_t OH_ArkUI_RenderNodeUtils_RemoveRenderNode(ArkUI_NodeHandle node, ArkUI_RenderNodeHandle child)-Removes the specified child render node from the parent node.
int32_t OH_ArkUI_RenderNodeUtils_ClearRenderNodeChildren(ArkUI_NodeHandle node)-Clears child render nodes in the parent node.
int32_t OH_ArkUI_RenderNodeUtils_Invalidate(ArkUI_NodeHandle node)-Marks the target node, triggering its lifecycle and child nodes to re-render.
ArkUI_RenderNodeHandle OH_ArkUI_RenderNodeUtils_CreateNode()-Creates a render node.
int32_t OH_ArkUI_RenderNodeUtils_DisposeNode(ArkUI_RenderNodeHandle node)-Destroys the render node.
int32_t OH_ArkUI_RenderNodeUtils_AddChild(ArkUI_RenderNodeHandle node, ArkUI_RenderNodeHandle child)-Adds a child node to the target parent render node.
int32_t OH_ArkUI_RenderNodeUtils_InsertChildAfter(ArkUI_RenderNodeHandle node, ArkUI_RenderNodeHandle child, ArkUI_RenderNodeHandle sibling)-Adds a child node after the target child node of the parent node.
int32_t OH_ArkUI_RenderNodeUtils_RemoveChild(ArkUI_RenderNodeHandle node, ArkUI_RenderNodeHandle child)-Removes a child node from the specified render node.
int32_t OH_ArkUI_RenderNodeUtils_ClearChildren(ArkUI_RenderNodeHandle node)-Clears all child nodes of the specified render node.
int32_t OH_ArkUI_RenderNodeUtils_GetChild(ArkUI_RenderNodeHandle node, int32_t index, ArkUI_RenderNodeHandle* child)-Obtains the child node at the specified index.
int32_t OH_ArkUI_RenderNodeUtils_GetFirstChild(ArkUI_RenderNodeHandle node, ArkUI_RenderNodeHandle* child)-Obtains the first child node of the specified render node.
int32_t OH_ArkUI_RenderNodeUtils_GetNextSibling(ArkUI_RenderNodeHandle node, ArkUI_RenderNodeHandle* sibling)-Obtains the next sibling node of the specified node.
int32_t OH_ArkUI_RenderNodeUtils_GetPreviousSibling(ArkUI_RenderNodeHandle node, ArkUI_RenderNodeHandle* sibling)-Obtains the previous sibling node of the specified node.
int32_t OH_ArkUI_RenderNodeUtils_GetChildren(ArkUI_RenderNodeHandle node, ArkUI_RenderNodeHandle** children, int32_t* count)-Obtains all child render nodes of the parent render node.
int32_t OH_ArkUI_RenderNodeUtils_GetChildrenCount(ArkUI_RenderNodeHandle node, int32_t* count)-Obtains the number of child render nodes of the specified render node.
int32_t OH_ArkUI_RenderNodeUtils_SetBackgroundColor(ArkUI_RenderNodeHandle node, uint32_t color)-Sets the background color for the render node.
int32_t OH_ArkUI_RenderNodeUtils_GetBackgroundColor(ArkUI_RenderNodeHandle node, uint32_t* color)-Obtains the background color of the render node.
int32_t OH_ArkUI_RenderNodeUtils_SetClipToFrame(ArkUI_RenderNodeHandle node, int32_t clipToFrame)-Sets whether to clip the render node.
int32_t OH_ArkUI_RenderNodeUtils_GetClipToFrame(ArkUI_RenderNodeHandle node, int32_t* clipToFrame)-Obtains whether the render node is clipped.
int32_t OH_ArkUI_RenderNodeUtils_SetClipToBounds(ArkUI_RenderNodeHandle node, int32_t clipToBounds)-Sets whether to clip to the bounds of the render node.
int32_t OH_ArkUI_RenderNodeUtils_GetClipToBounds(ArkUI_RenderNodeHandle node, int32_t* clipToBounds)-Sets whether clipping to the bounds of the render node is enabled.
int32_t OH_ArkUI_RenderNodeUtils_SetOpacity(ArkUI_RenderNodeHandle node, float opacity)-Sets the opacity value for the render node.
int32_t OH_ArkUI_RenderNodeUtils_GetOpacity(ArkUI_RenderNodeHandle node, float* opacity)-Obtains the opacity value of the render node.
int32_t OH_ArkUI_RenderNodeUtils_SetSize(ArkUI_RenderNodeHandle node, int32_t width, int32_t height)-Sets the size for the render node.
int32_t OH_ArkUI_RenderNodeUtils_GetSize(ArkUI_RenderNodeHandle node, int32_t* width, int32_t* height)-Obtains the size of the render node.
int32_t OH_ArkUI_RenderNodeUtils_SetPosition(ArkUI_RenderNodeHandle node, int32_t x, int32_t y)-Sets the position coordinates for the render node.
int32_t OH_ArkUI_RenderNodeUtils_GetPosition(ArkUI_RenderNodeHandle node, int32_t* x, int32_t* y)-Obtains the position coordinates of the render node. The coordinates are the position offset of the render node relative to its parent node after the layout. The unit is px. The coordinates are the result after the parent node lays out the node. Therefore, the offset attribute that takes effect after the layout and the position attribute that does not participate in the layout do not affect the coordinates.
int32_t OH_ArkUI_RenderNodeUtils_SetPivot(ArkUI_RenderNodeHandle node, float x, float y)-Sets the pivot point for the transformation of the render node.
int32_t OH_ArkUI_RenderNodeUtils_GetPivot(ArkUI_RenderNodeHandle node, float* x, float* y)-Obtains the pivot point coordinates of the render node.
int32_t OH_ArkUI_RenderNodeUtils_SetScale(ArkUI_RenderNodeHandle node, float x, float y)-Sets the scale factors for the render node.
int32_t OH_ArkUI_RenderNodeUtils_GetScale(ArkUI_RenderNodeHandle node, float* x, float* y)-Obtains the scale factors of the render node.
int32_t OH_ArkUI_RenderNodeUtils_SetTranslation(ArkUI_RenderNodeHandle node, float x, float y)-Sets the translation offset for the render node.
int32_t OH_ArkUI_RenderNodeUtils_GetTranslation(ArkUI_RenderNodeHandle node, float* x, float* y)-Obtains the translation offset of the render node.
int32_t OH_ArkUI_RenderNodeUtils_SetRotation(ArkUI_RenderNodeHandle node, float x, float y, float z)-Sets the rotation angles for the render node.
int32_t OH_ArkUI_RenderNodeUtils_GetRotation(ArkUI_RenderNodeHandle node, float* x, float* y, float* z)-Obtains the rotation angles of the render node.
int32_t OH_ArkUI_RenderNodeUtils_SetTransform(ArkUI_RenderNodeHandle node, float* matrix)-Sets the transformation matrix for the render node.
int32_t OH_ArkUI_RenderNodeUtils_SetShadowColor(ArkUI_RenderNodeHandle node, uint32_t color)-Sets the shadow color for the render node.
int32_t OH_ArkUI_RenderNodeUtils_GetShadowColor(ArkUI_RenderNodeHandle node, uint32_t* color)-Obtains the shadow color of the render node.
int32_t OH_ArkUI_RenderNodeUtils_SetShadowOffset(ArkUI_RenderNodeHandle node, int32_t x, int32_t y)-Sets the shadow offset for the render node.
int32_t OH_ArkUI_RenderNodeUtils_GetShadowOffset(ArkUI_RenderNodeHandle node, int32_t* x, int32_t* y)-Obtains the shadow offset of the render node.
int32_t OH_ArkUI_RenderNodeUtils_SetShadowAlpha(ArkUI_RenderNodeHandle node, float alpha)-Sets the shadow alpha (transparency) for the render node.
int32_t OH_ArkUI_RenderNodeUtils_GetShadowAlpha(ArkUI_RenderNodeHandle node, float* alpha)-Obtains the shadow alpha (transparency) of the render node.
int32_t OH_ArkUI_RenderNodeUtils_SetShadowElevation(ArkUI_RenderNodeHandle node, float elevation)-Sets the shadow elevation for the render node.
int32_t OH_ArkUI_RenderNodeUtils_GetShadowElevation(ArkUI_RenderNodeHandle node, float* elevation)-Obtains the shadow elevation of the render node.
int32_t OH_ArkUI_RenderNodeUtils_SetShadowRadius(ArkUI_RenderNodeHandle node, float radius)-Sets the shadow radius for the render node.
int32_t OH_ArkUI_RenderNodeUtils_GetShadowRadius(ArkUI_RenderNodeHandle node, float* radius)-Obtains the shadow radius of the render node.
int32_t OH_ArkUI_RenderNodeUtils_SetBorderStyle(ArkUI_RenderNodeHandle node, ArkUI_NodeBorderStyleOption* borderStyle)-Sets the border style for the render node.
int32_t OH_ArkUI_RenderNodeUtils_GetBorderStyle(ArkUI_RenderNodeHandle node, ArkUI_NodeBorderStyleOption** borderStyle)-Obtains the border style of the render node.
int32_t OH_ArkUI_RenderNodeUtils_SetBorderWidth(ArkUI_RenderNodeHandle node, ArkUI_NodeBorderWidthOption* borderWidth)-Sets the border width for the render node.
int32_t OH_ArkUI_RenderNodeUtils_GetBorderWidth(ArkUI_RenderNodeHandle node, ArkUI_NodeBorderWidthOption** borderWidth)-Obtains the border width of the render node.
int32_t OH_ArkUI_RenderNodeUtils_SetBorderColor(ArkUI_RenderNodeHandle node, ArkUI_NodeBorderColorOption* borderColor)-Sets the border color for the render node.
int32_t OH_ArkUI_RenderNodeUtils_GetBorderColor(ArkUI_RenderNodeHandle node, ArkUI_NodeBorderColorOption** borderColor)-Obtains the border color of the render node.
int32_t OH_ArkUI_RenderNodeUtils_SetBorderRadius(ArkUI_RenderNodeHandle node, ArkUI_NodeBorderRadiusOption* borderRadius)-Sets the border corner radius for the render node.
int32_t OH_ArkUI_RenderNodeUtils_GetBorderRadius(ArkUI_RenderNodeHandle node, ArkUI_NodeBorderRadiusOption** borderRadius)-Obtains the border corner radius of the render node.
int32_t OH_ArkUI_RenderNodeUtils_SetMask(ArkUI_RenderNodeHandle node, ArkUI_RenderNodeMaskOption* mask)-Applies a mask to the render node using the mask configuration.
int32_t OH_ArkUI_RenderNodeUtils_SetClip(ArkUI_RenderNodeHandle node, ArkUI_RenderNodeClipOption* clip)-Applies clipping to the render node using the clipping configuration.
int32_t OH_ArkUI_RenderNodeUtils_SetMarkNodeGroup(ArkUI_RenderNodeHandle node, bool markNodeGroup)-Marks whether to prioritize drawing the node and its child nodes.
int32_t OH_ArkUI_RenderNodeUtils_SetBounds(ArkUI_RenderNodeHandle node, int32_t x, int32_t y, int32_t width, int32_t height)-Sets the bounds for the render node.
int32_t OH_ArkUI_RenderNodeUtils_GetBounds(ArkUI_RenderNodeHandle node, int32_t* x, int32_t* y, int32_t* width, int32_t* height)-Obtains the bounds of the render node.
int32_t OH_ArkUI_RenderNodeUtils_SetDrawRegion(ArkUI_RenderNodeHandle node, float x, float y, float w, float h)-Sets the drawing region for the render node.
int32_t OH_ArkUI_RenderNodeUtils_AttachContentModifier(ArkUI_RenderNodeHandle node, ArkUI_RenderContentModifierHandle modifier)-Attaches a content modifier to the render node.
ArkUI_RenderContentModifierHandle OH_ArkUI_RenderNodeUtils_CreateContentModifier()-Creates a content modifier.
void OH_ArkUI_RenderNodeUtils_DisposeContentModifier(ArkUI_RenderContentModifierHandle modifier)-Disposes of the content modifier.
int32_t OH_ArkUI_RenderNodeUtils_AttachFloatProperty(ArkUI_RenderContentModifierHandle modifier, ArkUI_FloatPropertyHandle property)-Attaches a float property to the target content modifier.
int32_t OH_ArkUI_RenderNodeUtils_AttachVector2Property(ArkUI_RenderContentModifierHandle modifier, ArkUI_Vector2PropertyHandle property)-Attaches a 2D vector property to the target content modifier.
int32_t OH_ArkUI_RenderNodeUtils_AttachColorProperty(ArkUI_RenderContentModifierHandle modifier, ArkUI_ColorPropertyHandle property)-Attaches a color property to the target content modifier.
int32_t OH_ArkUI_RenderNodeUtils_AttachFloatAnimatableProperty(ArkUI_RenderContentModifierHandle modifier, ArkUI_FloatAnimatablePropertyHandle property)-Attaches an animatable float property to the target content modifier.
int32_t OH_ArkUI_RenderNodeUtils_AttachVector2AnimatableProperty(ArkUI_RenderContentModifierHandle modifier, ArkUI_Vector2AnimatablePropertyHandle property)-Attaches an animatable 2D vector property to the target content modifier.
int32_t OH_ArkUI_RenderNodeUtils_AttachColorAnimatableProperty(ArkUI_RenderContentModifierHandle modifier, ArkUI_ColorAnimatablePropertyHandle property)-Attaches an animatable color property to the target content modifier.
ArkUI_FloatPropertyHandle OH_ArkUI_RenderNodeUtils_CreateFloatProperty(float value)-Creates a float property.
int32_t OH_ArkUI_RenderNodeUtils_SetFloatPropertyValue(ArkUI_FloatPropertyHandle property, float value)-Sets the value of the float property.
int32_t OH_ArkUI_RenderNodeUtils_GetFloatPropertyValue(ArkUI_FloatPropertyHandle property, float* value)-Obtains the value of the float property.
void OH_ArkUI_RenderNodeUtils_DisposeFloatProperty(ArkUI_FloatPropertyHandle property)-Disposes of the float property.
ArkUI_Vector2PropertyHandle OH_ArkUI_RenderNodeUtils_CreateVector2Property(float x, float y)-Creates a 2D vector property.
int32_t OH_ArkUI_RenderNodeUtils_SetVector2PropertyValue(ArkUI_Vector2PropertyHandle property, float x, float y)-Sets the value of the 2D vector property.
int32_t OH_ArkUI_RenderNodeUtils_GetVector2PropertyValue(ArkUI_Vector2PropertyHandle property, float* x, float* y)-Obtains the value of the 2D vector property.
void OH_ArkUI_RenderNodeUtils_DisposeVector2Property(ArkUI_Vector2PropertyHandle property)-Disposes of the 2D vector property.
ArkUI_ColorPropertyHandle OH_ArkUI_RenderNodeUtils_CreateColorProperty(uint32_t value)-Creates a color property.
int32_t OH_ArkUI_RenderNodeUtils_SetColorPropertyValue(ArkUI_ColorPropertyHandle property, uint32_t value)-Sets the value of the color property.
int32_t OH_ArkUI_RenderNodeUtils_GetColorPropertyValue(ArkUI_ColorPropertyHandle property, uint32_t* value)-Obtains the value of the color property.
void OH_ArkUI_RenderNodeUtils_DisposeColorProperty(ArkUI_ColorPropertyHandle property)-Disposes of the color property.
ArkUI_FloatAnimatablePropertyHandle OH_ArkUI_RenderNodeUtils_CreateFloatAnimatableProperty(float value)-Creates an animatable float property.
int32_t OH_ArkUI_RenderNodeUtils_SetFloatAnimatablePropertyValue(ArkUI_FloatAnimatablePropertyHandle property, float value)-Sets the value of the animatable float property.
int32_t OH_ArkUI_RenderNodeUtils_GetFloatAnimatablePropertyValue(ArkUI_FloatAnimatablePropertyHandle property, float* value)-Obtains the value of the animatable float property.
void OH_ArkUI_RenderNodeUtils_DisposeFloatAnimatableProperty(ArkUI_FloatAnimatablePropertyHandle property)-Disposes of the animatable float property.
ArkUI_Vector2AnimatablePropertyHandle OH_ArkUI_RenderNodeUtils_CreateVector2AnimatableProperty(float x, float y)-Creates an animatable 2D vector property.
int32_t OH_ArkUI_RenderNodeUtils_SetVector2AnimatablePropertyValue(ArkUI_Vector2AnimatablePropertyHandle property, float x, float y)-Sets the value of the animatable 2D vector property.
int32_t OH_ArkUI_RenderNodeUtils_GetVector2AnimatablePropertyValue(ArkUI_Vector2AnimatablePropertyHandle property, float* x, float* y)-Obtains the value of the animatable 2D vector property.
void OH_ArkUI_RenderNodeUtils_DisposeVector2AnimatableProperty(ArkUI_Vector2AnimatablePropertyHandle property)-Disposes of the animatable 2D vector property.
ArkUI_ColorAnimatablePropertyHandle OH_ArkUI_RenderNodeUtils_CreateColorAnimatableProperty(uint32_t value)-Creates an animatable color property.
int32_t OH_ArkUI_RenderNodeUtils_SetColorAnimatablePropertyValue(ArkUI_ColorAnimatablePropertyHandle property, uint32_t value)-Sets the value of the animatable color property.
int32_t OH_ArkUI_RenderNodeUtils_GetColorAnimatablePropertyValue(ArkUI_ColorAnimatablePropertyHandle property, uint32_t* value)-Obtains the value of the animatable color property.
void OH_ArkUI_RenderNodeUtils_DisposeColorAnimatableProperty(ArkUI_ColorAnimatablePropertyHandle property)-Disposes of the animatable color property.
int32_t OH_ArkUI_RenderNodeUtils_SetContentModifierOnDraw(ArkUI_RenderContentModifierHandle modifier, void* userData, void (callback)(ArkUI_DrawContext* context, void userData))-Sets the onDraw callback function for the content modifier.
ArkUI_RectShapeOption* OH_ArkUI_RenderNodeUtils_CreateRectShapeOption()-Creates a rectangle shape option.
void OH_ArkUI_RenderNodeUtils_DisposeRectShapeOption(ArkUI_RectShapeOption* option)-Disposes of the rectangle shape option.
void OH_ArkUI_RenderNodeUtils_SetRectShapeOptionEdgeValue(ArkUI_RectShapeOption* option, float edgeValue, ArkUI_EdgeDirection direction)-Sets the edge value for the rectangle shape option.
ArkUI_NodeBorderStyleOption* OH_ArkUI_RenderNodeUtils_CreateNodeBorderStyleOption()-Creates a node border style option.
void OH_ArkUI_RenderNodeUtils_DisposeNodeBorderStyleOption(ArkUI_NodeBorderStyleOption* option)-Disposes of the node border style option.
void OH_ArkUI_RenderNodeUtils_SetNodeBorderStyleOptionEdgeStyle(ArkUI_NodeBorderStyleOption* option, ArkUI_BorderStyle edgeStyle, ArkUI_EdgeDirection direction)-Sets the edge style for the node border style option.
ArkUI_NodeBorderWidthOption* OH_ArkUI_RenderNodeUtils_CreateNodeBorderWidthOption()-Creates a node border width option.
void OH_ArkUI_RenderNodeUtils_DisposeNodeBorderWidthOption(ArkUI_NodeBorderWidthOption* option)-Disposes of the node border width option.
void OH_ArkUI_RenderNodeUtils_SetNodeBorderWidthOptionEdgeWidth(ArkUI_NodeBorderWidthOption* option, float edgeWidth, ArkUI_EdgeDirection direction)-Sets the edge width for the node border width option.
ArkUI_NodeBorderColorOption* OH_ArkUI_RenderNodeUtils_CreateNodeBorderColorOption()-Creates a node border color option.
void OH_ArkUI_RenderNodeUtils_DisposeNodeBorderColorOption(ArkUI_NodeBorderColorOption* option)-Disposes of the node border color option.
void OH_ArkUI_RenderNodeUtils_SetNodeBorderColorOptionEdgeColor(ArkUI_NodeBorderColorOption* option, uint32_t edgeColor, ArkUI_EdgeDirection direction)-Sets the edge color for the node border color option.
ArkUI_NodeBorderRadiusOption* OH_ArkUI_RenderNodeUtils_CreateNodeBorderRadiusOption()-Creates a node border radius option.
void OH_ArkUI_RenderNodeUtils_DisposeNodeBorderRadiusOption(ArkUI_NodeBorderRadiusOption* option)-Disposes of the node border radius option.
void OH_ArkUI_RenderNodeUtils_SetNodeBorderRadiusOptionCornerRadius(ArkUI_NodeBorderRadiusOption* option, uint32_t cornerRadius, ArkUI_CornerDirection direction)-Sets the corner radius for the node border radius option.
ArkUI_CircleShapeOption* OH_ArkUI_RenderNodeUtils_CreateCircleShapeOption()-Creates a circle shape option.
void OH_ArkUI_RenderNodeUtils_DisposeCircleShapeOption(ArkUI_CircleShapeOption* option)-Disposes of the circle shape option.
void OH_ArkUI_RenderNodeUtils_SetCircleShapeOptionCenterX(ArkUI_CircleShapeOption* option, float centerX)-Sets the x-coordinate of the center for the circle shape option.
void OH_ArkUI_RenderNodeUtils_SetCircleShapeOptionCenterY(ArkUI_CircleShapeOption* option, float centerY)-Sets the y-coordinate of the center for the circle shape option.
void OH_ArkUI_RenderNodeUtils_SetCircleShapeOptionRadius(ArkUI_CircleShapeOption* option, float radius)-Sets the radius value for the circle shape option.
ArkUI_RoundRectShapeOption* OH_ArkUI_RenderNodeUtils_CreateRoundRectShapeOption()-Creates a rounded rectangle shape option.
void OH_ArkUI_RenderNodeUtils_DisposeRoundRectShapeOption(ArkUI_RoundRectShapeOption* option)-Disposes of the rounded rectangle shape option.
void OH_ArkUI_RenderNodeUtils_SetRoundRectShapeOptionEdgeValue(ArkUI_RoundRectShapeOption* option, float edgeValue, ArkUI_EdgeDirection direction)-Sets the edge values for the rounded rectangle shape option.
void OH_ArkUI_RenderNodeUtils_SetRoundRectShapeOptionCornerXY(ArkUI_RoundRectShapeOption* option, float x, float y, ArkUI_CornerDirection direction)-Sets the coordinates for the target corner.
ArkUI_CommandPathOption* OH_ArkUI_RenderNodeUtils_CreateCommandPathOption()-Creates a custom drawing path option.
void OH_ArkUI_RenderNodeUtils_DisposeCommandPathOption(ArkUI_CommandPathOption* option)-Disposes of the custom drawing path option.
void OH_ArkUI_RenderNodeUtils_SetCommandPathOptionCommands(ArkUI_CommandPathOption* option, char* commands)-Sets the command values for the custom drawing path option.
ArkUI_RenderNodeMaskOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeMaskOptionFromRectShape(ArkUI_RectShapeOption* shape)-Creates a mask from a rectangle shape.
ArkUI_RenderNodeMaskOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeMaskOptionFromRoundRectShape(ArkUI_RoundRectShapeOption* shape)-Creates a mask from a rounded rectangle shape.
ArkUI_RenderNodeMaskOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeMaskOptionFromCircleShape(ArkUI_CircleShapeOption* shape)-Creates a mask from a circle shape.
ArkUI_RenderNodeMaskOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeMaskOptionFromOvalShape(ArkUI_RectShapeOption* shape)-Creates a mask from an oval shape.
ArkUI_RenderNodeMaskOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeMaskOptionFromCommandPath(ArkUI_CommandPathOption* path)-Creates a mask from a custom drawing path.
void OH_ArkUI_RenderNodeUtils_DisposeRenderNodeMaskOption(ArkUI_RenderNodeMaskOption* option)-Disposes of the render node mask option.
void OH_ArkUI_RenderNodeUtils_SetRenderNodeMaskOptionFillColor(ArkUI_RenderNodeMaskOption* mask, uint32_t fillColor)-Sets the fill color for the render node mask option.
void OH_ArkUI_RenderNodeUtils_SetRenderNodeMaskOptionStrokeColor(ArkUI_RenderNodeMaskOption* mask, uint32_t strokeColor)-Sets the stroke color for the render node mask option.
void OH_ArkUI_RenderNodeUtils_SetRenderNodeMaskOptionStrokeWidth(ArkUI_RenderNodeMaskOption* mask, float strokeWidth)-Sets the stroke width for the render node mask option.
ArkUI_RenderNodeClipOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeClipOptionFromRectShape(ArkUI_RectShapeOption* shape)-Creates a render node clip option from a rectangle shape.
ArkUI_RenderNodeClipOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeClipOptionFromRoundRectShape(ArkUI_RoundRectShapeOption* shape)-Creates a render node clip option from a rounded rectangle shape.
ArkUI_RenderNodeClipOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeClipOptionFromCircleShape(ArkUI_CircleShapeOption* shape)-Creates a render node clip option from a circle shape.
ArkUI_RenderNodeClipOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeClipOptionFromOvalShape(ArkUI_RectShapeOption* shape)-Creates a render node clip option from an oval shape.
ArkUI_RenderNodeClipOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeClipOptionFromCommandPath(ArkUI_CommandPathOption* path)-Creates a render node clip option from a custom drawing path.
void OH_ArkUI_RenderNodeUtils_DisposeRenderNodeClipOption(ArkUI_RenderNodeClipOption* option)-Disposes of the render node clip option.
void OH_ArkUI_RenderNodeUtils_SetRectShapeOptionValue(ArkUI_RectShapeOption* option, float x, float y, float width, float height)-Sets the border range for a rectangle shape option. This function defines the geometric frame of a rectangle by specifying its position and size.
void OH_ArkUI_RenderNodeUtils_SetRoundRectShapeOptionValue(ArkUI_RoundRectShapeOption* option, float x, float y, float width, float height)-Sets the border range for a rounded rectangle shape option. This function defines the geometric frame of a rounded rectangle by specifying its position and size.

Function Description

OH_ArkUI_RenderNodeUtils_AddRenderNode()

int32_t OH_ArkUI_RenderNodeUtils_AddRenderNode(ArkUI_NodeHandle node, ArkUI_RenderNodeHandle child)

Description Adds a child render node to the parent custom node.

The parent node supports only nodes of the ARKUI_NODE_CUSTOM type in ArkUI_NodeType. Each custom node can be mounted to only one ArkUI_RenderNodeHandle. customNode cannot be mounted to another ArkUI_NodeHandle.

Since: 20

Parameters

NameDescription
ArkUI_NodeHandle nodeTarget parent node.
ArkUI_RenderNodeHandle childChild render node to be added.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_NOT_CUSTOM_NODE if the target node is not a custom node.
Returns ARKUI_ERROR_CODE_CHILD_EXISTED if the target node already has a child node.
Returns ARKUI_ERROR_CODE_RENDER_PARENT_EXISTED if the target rendering node already has a parent node.
Returns ARKUI_ERROR_CODE_RENDER_HAS_INVALID_FRAME_NODE if the current render node originates from a FrameNode that has been either detached as a child node or destroyed. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_RemoveRenderNode()

int32_t OH_ArkUI_RenderNodeUtils_RemoveRenderNode(ArkUI_NodeHandle node, ArkUI_RenderNodeHandle child)

Description Removes the specified child render node from the parent node.

Since: 20

Parameters

NameDescription
ArkUI_NodeHandle nodeTarget parent node.
ArkUI_RenderNodeHandle childChild render node to be removed.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_NOT_CUSTOM_NODE if the target node is not a custom node.

OH_ArkUI_RenderNodeUtils_ClearRenderNodeChildren()

int32_t OH_ArkUI_RenderNodeUtils_ClearRenderNodeChildren(ArkUI_NodeHandle node)

Description Clears child render nodes in the parent node.

Since: 20

Parameters

NameDescription
ArkUI_NodeHandle nodeTarget parent node.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_NOT_CUSTOM_NODE if the target node is not a custom node.

OH_ArkUI_RenderNodeUtils_Invalidate()

int32_t OH_ArkUI_RenderNodeUtils_Invalidate(ArkUI_NodeHandle node)

Description Marks the target node, triggering its lifecycle and child nodes to re-render.

Since: 20

Parameters

NameDescription
ArkUI_NodeHandle nodeTarget node.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.

OH_ArkUI_RenderNodeUtils_CreateNode()

ArkUI_RenderNodeHandle OH_ArkUI_RenderNodeUtils_CreateNode()

Description Creates a render node.

Since: 20

Return value

TypeDescription
ArkUI_RenderNodeHandleTarget render node.

OH_ArkUI_RenderNodeUtils_DisposeNode()

int32_t OH_ArkUI_RenderNodeUtils_DisposeNode(ArkUI_RenderNodeHandle node)

Description Destroys the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.

OH_ArkUI_RenderNodeUtils_AddChild()

int32_t OH_ArkUI_RenderNodeUtils_AddChild(ArkUI_RenderNodeHandle node, ArkUI_RenderNodeHandle child)

Description Adds a child node to the target parent render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget parent render node.
ArkUI_RenderNodeHandle childChild render node to be added.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.
Returns ARKUI_ERROR_CODE_RENDER_HAS_INVALID_FRAME_NODE if the current render node originates from a FrameNode that has been either detached as a child node or destroyed. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_InsertChildAfter()

int32_t OH_ArkUI_RenderNodeUtils_InsertChildAfter(ArkUI_RenderNodeHandle node, ArkUI_RenderNodeHandle child, ArkUI_RenderNodeHandle sibling)

Description Adds a child node after the target child node of the parent node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget parent render node.
ArkUI_RenderNodeHandle childChild render node to be added.
ArkUI_RenderNodeHandle siblingTarget child node, which is used to determine the reference sibling render node of the insertion position. If the node is not in the current child node list of node, the node is appended to the end.
Return value
TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.
Returns ARKUI_ERROR_CODE_RENDER_HAS_INVALID_FRAME_NODE if the current render node originates from a FrameNode that has been either detached as a child node or destroyed. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_RemoveChild()

int32_t OH_ArkUI_RenderNodeUtils_RemoveChild(ArkUI_RenderNodeHandle node, ArkUI_RenderNodeHandle child)

Description Removes a child node from the specified render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget parent render node.
ArkUI_RenderNodeHandle childChild render node to be removed.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_ClearChildren()

int32_t OH_ArkUI_RenderNodeUtils_ClearChildren(ArkUI_RenderNodeHandle node)

Description Clears all child nodes of the specified render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_GetChild()

int32_t OH_ArkUI_RenderNodeUtils_GetChild(ArkUI_RenderNodeHandle node, int32_t index, ArkUI_RenderNodeHandle* child)

Description Obtains the child node at the specified index.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget parent render node.
int32_t indexZero-based index of the child node.
ArkUI_RenderNodeHandle* childRender node pointer used to receive the child node.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_CHILD_NOT_EXIST if the corresponding render child node is not found.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_GetFirstChild()

int32_t OH_ArkUI_RenderNodeUtils_GetFirstChild(ArkUI_RenderNodeHandle node, ArkUI_RenderNodeHandle* child)

Description Obtains the first child node of the specified render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
ArkUI_RenderNodeHandle* childRender node pointer used to receive the first child node.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_CHILD_NOT_EXIST if the corresponding render child node is not found.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_GetNextSibling()

int32_t OH_ArkUI_RenderNodeUtils_GetNextSibling(ArkUI_RenderNodeHandle node, ArkUI_RenderNodeHandle* sibling)

Description Obtains the next sibling node of the specified node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeReference node.
ArkUI_RenderNodeHandle* siblingPointer to the render node, which is used to receive the next sibling node.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_CHILD_NOT_EXIST if the corresponding render child node is not found.

OH_ArkUI_RenderNodeUtils_GetPreviousSibling()

int32_t OH_ArkUI_RenderNodeUtils_GetPreviousSibling(ArkUI_RenderNodeHandle node, ArkUI_RenderNodeHandle* sibling)

Description Obtains the previous sibling node of the specified node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeReference node.
ArkUI_RenderNodeHandle* siblingPointer to the render node, which is used to receive the previous sibling node.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_CHILD_NOT_EXIST if the corresponding render child node is not found.

OH_ArkUI_RenderNodeUtils_GetChildren()

int32_t OH_ArkUI_RenderNodeUtils_GetChildren(ArkUI_RenderNodeHandle node, ArkUI_RenderNodeHandle** children, int32_t* count)

Description Obtains all child render nodes of the parent render node. The caller is responsible for releasing the returned child node array.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget parent render node.
ArkUI_RenderNodeHandle** childrenPointer array used to store all child render nodes.
int32_t* countPointer used to store the number of obtained child nodes.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_GetChildrenCount()

int32_t OH_ArkUI_RenderNodeUtils_GetChildrenCount(ArkUI_RenderNodeHandle node, int32_t* count)

Description Obtains the number of child render nodes of the specified render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget parent render node.
int32_t* countPointer used to store the number of child nodes.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_SetBackgroundColor()

int32_t OH_ArkUI_RenderNodeUtils_SetBackgroundColor(ArkUI_RenderNodeHandle node, uint32_t color)

Description Sets the background color for the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
uint32_t colorARGB color value (32-bit unsigned integer).
Default value: 0x00000000.
Description of color byte layout:
- Bits 24-31: alpha channel (0x00 for fully transparent, 0xFF for fully opaque).
- Bits 16-23: red channel.
- Bits 8-15: green channel.
- Bits 0-7: blue channel.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_GetBackgroundColor()

int32_t OH_ArkUI_RenderNodeUtils_GetBackgroundColor(ArkUI_RenderNodeHandle node, uint32_t* color)

Description Obtains the background color of the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
uint32_t* colorInteger pointer used to store the obtained RGBA color value.
Default value: 0x00000000.
Description of color byte layout:
- Bits 24-31: alpha channel (0x00 for fully transparent, 0xFF for fully opaque).
- Bits 16-23: red channel.
- Bits 8-15: green channel.
- Bits 0-7: blue channel.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_SetClipToFrame()

int32_t OH_ArkUI_RenderNodeUtils_SetClipToFrame(ArkUI_RenderNodeHandle node, int32_t clipToFrame)

Description Sets whether to clip the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
int32_t clipToFrameWhether to clip the current render node. 1: Clip to frame. 0: Do not clip.
Default value: 0.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE if the parameter value is out of range.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_GetClipToFrame()

int32_t OH_ArkUI_RenderNodeUtils_GetClipToFrame(ArkUI_RenderNodeHandle node, int32_t* clipToFrame)

Description Obtains whether the render node is clipped.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
int32_t* clipToFrameInteger pointer used to receive the clipping status (1 or 0).
Default value: 0.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_SetClipToBounds()

int32_t OH_ArkUI_RenderNodeUtils_SetClipToBounds(ArkUI_RenderNodeHandle node, int32_t clipToBounds)

Description Sets whether to clip to the bounds of the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
int32_t clipToBoundsClipping flag. 1: Clip to bounds. 0: Do not clip.
Default value: 0.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE if the parameter value is out of range.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_GetClipToBounds()

int32_t OH_ArkUI_RenderNodeUtils_GetClipToBounds(ArkUI_RenderNodeHandle node, int32_t* clipToBounds)

Description Sets whether clipping to the bounds of the render node is enabled.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
int32_t* clipToBoundsClipping flag. 1: Clip to bounds. 0: Do not clip.
Default value: 0.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_SetOpacity()

int32_t OH_ArkUI_RenderNodeUtils_SetOpacity(ArkUI_RenderNodeHandle node, float opacity)

Description Sets the opacity value for the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
float opacityOpacity value (0.0–1.0).
Default value: 1.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE if the parameter value is out of range.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_GetOpacity()

int32_t OH_ArkUI_RenderNodeUtils_GetOpacity(ArkUI_RenderNodeHandle node, float* opacity)

Description Obtains the opacity value of the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
float* opacityPointer used to store the opacity value (0.0–1.0).
Default value: 1.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_SetSize()

int32_t OH_ArkUI_RenderNodeUtils_SetSize(ArkUI_RenderNodeHandle node, int32_t width, int32_t height)

Description Sets the size for the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
int32_t widthWidth value (in px).
Default value: 0, in px. The value must be greater than or equal to 0. If a negative value is passed, ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE is returned.
int32_t heightHeight value (in px).
Default value: 0, in px. The value must be greater than or equal to 0. If a negative value is passed, ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE is returned.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE if the parameter value is out of range.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_GetSize()

int32_t OH_ArkUI_RenderNodeUtils_GetSize(ArkUI_RenderNodeHandle node, int32_t* width, int32_t* height)

Description Obtains the size of the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
int32_t* widthPointer used to store the width value (in px).
Default value: 0, in px.
int32_t* heightPointer used to store the height value (in px).
Default value: 0, in px.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_SetPosition()

int32_t OH_ArkUI_RenderNodeUtils_SetPosition(ArkUI_RenderNodeHandle node, int32_t x, int32_t y)

Description Sets the position coordinates for the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
int32_t xX-coordinate (in px).
Default value: 0, in px.
int32_t yY-coordinate (in px).
Default value: 0, in px.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_GetPosition()

int32_t OH_ArkUI_RenderNodeUtils_GetPosition(ArkUI_RenderNodeHandle node, int32_t* x, int32_t* y)

Description

Obtains the position coordinates of the render node. The coordinates are the position offset of the render node relative to its parent node after the layout. The unit is px. The coordinates are the result after the parent node lays out the node. Therefore, the offset attribute that takes effect after the layout and the position attribute that does not participate in the layout do not affect the coordinates.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
int32_t* xPointer used to store the x-coordinate (in px).
Default value: 0, in px.
int32_t* yPointer used to store the y-coordinate (in px).
Default value: 0, in px.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_SetPivot()

int32_t OH_ArkUI_RenderNodeUtils_SetPivot(ArkUI_RenderNodeHandle node, float x, float y)

Description Sets the pivot point for the transformation of the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
float xX-coordinate of the pivot point. Standard value range: 0.0–1.0.
Default value: 0.5.
float yY-coordinate of the pivot point. Standard value range: 0.0–1.0.
Default value: 0.5.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_GetPivot()

int32_t OH_ArkUI_RenderNodeUtils_GetPivot(ArkUI_RenderNodeHandle node, float* x, float* y)

Description Obtains the pivot point coordinates of the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
float* xPointer used to store the x-coordinate of the pivot point.
Default value: 0.5.
float* yPointer used to store the y-coordinate of the pivot point.
Default value: 0.5.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_SetScale()

int32_t OH_ArkUI_RenderNodeUtils_SetScale(ArkUI_RenderNodeHandle node, float x, float y)

Description Sets the scale factors for the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
float xScale factor on the x-axis.
Default value: 1.
float yScale factor on the y-axis.
Default value: 1.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_GetScale()

int32_t OH_ArkUI_RenderNodeUtils_GetScale(ArkUI_RenderNodeHandle node, float* x, float* y)

Description Obtains the scale factors of the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
float* xPointer used to store the scale factor on the x-axis.
Default value: 1.
float* yPointer used to store the scale factor on the y-axis.
Default value: 1.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_SetTranslation()

int32_t OH_ArkUI_RenderNodeUtils_SetTranslation(ArkUI_RenderNodeHandle node, float x, float y)

Description Sets the translation offset for the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
float xHorizontal translation offset (in pixels).
Default value: 0.
float yVertical translation offset (in pixels).
Default value: 0.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_GetTranslation()

int32_t OH_ArkUI_RenderNodeUtils_GetTranslation(ArkUI_RenderNodeHandle node, float* x, float* y)

Description Obtains the translation offset of the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
float* xPointer used to store the horizontal translation offset.
Default value: 0.
float* yPointer used to store the vertical translation offset.
Default value: 0.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_SetRotation()

int32_t OH_ArkUI_RenderNodeUtils_SetRotation(ArkUI_RenderNodeHandle node, float x, float y, float z)

Description Sets the rotation angles for the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
float xRotation angle around the x-axis (in degrees).
Default value: 0.
float yRotation angle around the y-axis (in degrees).
Default value: 0.
float zRotation angle around the z-axis (in degrees).
Default value: 0.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_GetRotation()

int32_t OH_ArkUI_RenderNodeUtils_GetRotation(ArkUI_RenderNodeHandle node, float* x, float* y, float* z)

Description Obtains the rotation angles of the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
float* xPointer used to store the rotation angle around the x-axis (in degrees).
Default value: 0.
float* yPointer used to store the rotation angle around the y-axis (in degrees).
Default value: 0.
float* zPointer used to store the rotation angle around the z-axis (in degrees).
Default value: 0.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_SetTransform()

int32_t OH_ArkUI_RenderNodeUtils_SetTransform(ArkUI_RenderNodeHandle node, float* matrix)

Description Sets the transformation matrix for the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
float* matrixFloat array of 4x4 transformation matrix (16 consecutive values).

The transformation matrix must be provided as 16 consecutive float values in row-major order:
[m00, m01, m02, m03,
m10, m11, m12, m13,
m20, m21, m22, m23,
m30, m31, m32, m33]
The matrix is represented as follows:
|m00 m01 m02 m03 |
|m10 m11 m12 m13 |
|m20 m21 m22 m23 |
|m30 m31 m32 m33 |
Matrix components:

Matrix ElementDescription
m00Scale value for the x-axis. The default value is 1 in the identity matrix.
m01Second value, affected by rotation or skewing around x, y, z axes.
m02Third value, affected by rotation around x, y, z axes.
m03Fourth value, affected by perspective projection.
m10Fifth value, affected by rotation or skewing around x, y, z axes.
m11Scale value for the y-axis. The default value is 1 in the identity matrix.
m12Seventh value, affected by rotation around x, y, z axes.
m13Eighth value, affected by perspective projection.
m20Ninth value, affected by rotation around x, y, z axes.
m21Tenth value, affected by rotation around x, y, z axes.
m22Scale value for the z-axis. The default value is 1 in the identity matrix.
m23Twelfth value, affected by perspective projection.
m30Translation value for the x-axis (in px). The default value is 0 in the identity matrix.
m31Translation value for the y-axis (in px). The default value is 0 in the identity matrix.
m32Translation value for the z-axis (in px). The default value is 0 in the identity matrix.
m33Valid in homogeneous coordinates, producing perspective projection effects.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE if the parameter value is out of range.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_SetShadowColor()

int32_t OH_ArkUI_RenderNodeUtils_SetShadowColor(ArkUI_RenderNodeHandle node, uint32_t color)

Description Sets the shadow color for the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
uint32_t colorARGB color value (32-bit unsigned integer).
Default value: 0x00000000.
Description of color byte layout:
- Bits 24-31: alpha channel (0x00 for fully transparent, 0xFF for fully opaque).
- Bits 16-23: red channel.
- Bits 8-15: green channel.
- Bits 0-7: blue channel.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_GetShadowColor()

int32_t OH_ArkUI_RenderNodeUtils_GetShadowColor(ArkUI_RenderNodeHandle node, uint32_t* color)

Description Obtains the shadow color of the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
uint32_t* colorInteger pointer used to store the obtained RGBA color value.
Default value: 0xFF000000.
Description of color byte layout:
- Bits 24-31: alpha channel (0x00 for fully transparent, 0xFF for fully opaque).
- Bits 16-23: red channel.
- Bits 8-15: green channel.
- Bits 0-7: blue channel.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_SetShadowOffset()

int32_t OH_ArkUI_RenderNodeUtils_SetShadowOffset(ArkUI_RenderNodeHandle node, int32_t x, int32_t y)

Description Sets the shadow offset for the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
int32_t xHorizontal offset (in pixels).
Default value: 0.
int32_t yVertical offset (in pixels).
Default value: 0.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_GetShadowOffset()

int32_t OH_ArkUI_RenderNodeUtils_GetShadowOffset(ArkUI_RenderNodeHandle node, int32_t* x, int32_t* y)

Description Obtains the shadow offset of the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
int32_t* xPointer used to store the horizontal offset.
Default value: 0, in px.
int32_t* yPointer used to store the vertical offset.
Default value: 0, in px.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_SetShadowAlpha()

int32_t OH_ArkUI_RenderNodeUtils_SetShadowAlpha(ArkUI_RenderNodeHandle node, float alpha)

Description Sets the shadow alpha (transparency) for the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
float alphaShadow alpha value (0.0–1.0).
Default value: 0.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE if the parameter value is out of range.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_GetShadowAlpha()

int32_t OH_ArkUI_RenderNodeUtils_GetShadowAlpha(ArkUI_RenderNodeHandle node, float* alpha)

Description Obtains the shadow alpha (transparency) of the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
float* alphaPointer used to store the shadow alpha value.
Default value: 1.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_SetShadowElevation()

int32_t OH_ArkUI_RenderNodeUtils_SetShadowElevation(ArkUI_RenderNodeHandle node, float elevation)

Description Sets the shadow elevation for the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
float elevationElevation.
Default value: 0.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE if the parameter value is out of range.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_GetShadowElevation()

int32_t OH_ArkUI_RenderNodeUtils_GetShadowElevation(ArkUI_RenderNodeHandle node, float* elevation)

Description Obtains the shadow elevation of the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
float* elevationPointer used to store the elevation value.
Default value: 0.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_SetShadowRadius()

int32_t OH_ArkUI_RenderNodeUtils_SetShadowRadius(ArkUI_RenderNodeHandle node, float radius)

Description Sets the shadow radius for the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
float radiusRadius value.
Default value: 0. The value must be greater than or equal to 0. If a negative value is passed, ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE is returned.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE if the parameter value is out of range.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_GetShadowRadius()

int32_t OH_ArkUI_RenderNodeUtils_GetShadowRadius(ArkUI_RenderNodeHandle node, float* radius)

Description Obtains the shadow radius of the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
float* radiusPointer used to store the radius value.
Default value: 0.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_SetBorderStyle()

int32_t OH_ArkUI_RenderNodeUtils_SetBorderStyle(ArkUI_RenderNodeHandle node, ArkUI_NodeBorderStyleOption* borderStyle)

Description Sets the border style for the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
ArkUI_NodeBorderStyleOption* borderStylePointer to the border style.
Default value in the struct pointer: ARKUI_BORDER_STYLE_SOLID.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_GetBorderStyle()

int32_t OH_ArkUI_RenderNodeUtils_GetBorderStyle(ArkUI_RenderNodeHandle node, ArkUI_NodeBorderStyleOption** borderStyle)

Description Obtains the border style of the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
ArkUI_NodeBorderStyleOption** borderStylePointer used to store the border style.
Default value in the struct pointer: ARKUI_BORDER_STYLE_SOLID.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_SetBorderWidth()

int32_t OH_ArkUI_RenderNodeUtils_SetBorderWidth(ArkUI_RenderNodeHandle node, ArkUI_NodeBorderWidthOption* borderWidth)

Description Sets the border width for the render node. The border width must be smaller than the node size.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
ArkUI_NodeBorderWidthOption* borderWidthPointer to the border width.
Default value in the struct pointer: 0. Unit: px.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_GetBorderWidth()

int32_t OH_ArkUI_RenderNodeUtils_GetBorderWidth(ArkUI_RenderNodeHandle node, ArkUI_NodeBorderWidthOption** borderWidth)

Description Obtains the border width of the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
ArkUI_NodeBorderWidthOption** borderWidthPointer used to store the border width.
Default value in the struct pointer: 0. Unit: px.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_SetBorderColor()

int32_t OH_ArkUI_RenderNodeUtils_SetBorderColor(ArkUI_RenderNodeHandle node, ArkUI_NodeBorderColorOption* borderColor)

Description Sets the border color for the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
ArkUI_NodeBorderColorOption* borderColorPointer to the border color.
Default value in the struct pointer: 0x00000000.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_GetBorderColor()

int32_t OH_ArkUI_RenderNodeUtils_GetBorderColor(ArkUI_RenderNodeHandle node, ArkUI_NodeBorderColorOption** borderColor)

Description Obtains the border color of the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
ArkUI_NodeBorderColorOption** borderColorPointer used to store the border color.
Default value in the struct pointer: 0x00000000.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_SetBorderRadius()

int32_t OH_ArkUI_RenderNodeUtils_SetBorderRadius(ArkUI_RenderNodeHandle node, ArkUI_NodeBorderRadiusOption* borderRadius)

Description Sets the border corner radius for the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
ArkUI_NodeBorderRadiusOption* borderRadiusPointer to the border radius.
Default value in the struct pointer: 0.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_GetBorderRadius()

int32_t OH_ArkUI_RenderNodeUtils_GetBorderRadius(ArkUI_RenderNodeHandle node, ArkUI_NodeBorderRadiusOption** borderRadius)

Description Obtains the border corner radius of the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
ArkUI_NodeBorderRadiusOption** borderRadiusPointer used to store the border corner radius.
Default value in the struct pointer: 0.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_SetMask()

int32_t OH_ArkUI_RenderNodeUtils_SetMask(ArkUI_RenderNodeHandle node, ArkUI_RenderNodeMaskOption* mask)

Description Applies a mask to the render node using the mask configuration.

The mask is created as follows:

  1. Add brightness and a linear color filter to the mask layer.
  2. Draw the mask graphic under this filter.
  3. Use the original node image as the source color and the mask graphic as the target color, and blend them into a mask image using the BlendMode.SRC_IN API.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
ArkUI_RenderNodeMaskOption* maskPointer to the mask configuration.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_SetClip()

int32_t OH_ArkUI_RenderNodeUtils_SetClip(ArkUI_RenderNodeHandle node, ArkUI_RenderNodeClipOption* clip)

Description Applies clipping to the render node using the clipping configuration.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
ArkUI_RenderNodeClipOption* clipPointer to the clipping configuration.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_SetMarkNodeGroup()

int32_t OH_ArkUI_RenderNodeUtils_SetMarkNodeGroup(ArkUI_RenderNodeHandle node, bool markNodeGroup)

Description Marks whether to prioritize drawing the node and its child nodes.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
bool markNodeGroupWhether to prioritize drawing the node and its child nodes.
true: Enable drawing priority. false: Disable drawing priority.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_SetBounds()

int32_t OH_ArkUI_RenderNodeUtils_SetBounds(ArkUI_RenderNodeHandle node, int32_t x, int32_t y, int32_t width, int32_t height)

Description Sets the bounds for the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
int32_t xX-coordinate of the upper left corner of the bounds, in pixels.
Default value: 0.
int32_t yY-coordinate of the upper left corner of the bounds, in pixels.
Default value: 0.
int32_t widthWidth of the bounds (in pixels).
Default value: 0. The value must be greater than or equal to 0. If a negative value is passed, ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE is returned.
int32_t heightHeight of the bounds (in pixels).
Default value: 0. The value must be greater than or equal to 0. If a negative value is passed, ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE is returned.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE if the parameter value is out of range.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_GetBounds()

int32_t OH_ArkUI_RenderNodeUtils_GetBounds(ArkUI_RenderNodeHandle node, int32_t* x, int32_t* y, int32_t* width, int32_t* height)

Description Obtains the bounds of the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
int32_t* xPointer used to store the x-coordinate of the upper left corner of the bounds, in pixels.
Default value: 0.
int32_t* yPointer used to store the y-coordinate of the upper left corner of the bounds, in pixels.
Default value: 0.
int32_t* widthPointer used to store the width of the bounds (in pixels).
Default value: 0.
int32_t* heightPointer used to store the height of the bounds (in pixels).
Default value: 0.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_SetDrawRegion()

int32_t OH_ArkUI_RenderNodeUtils_SetDrawRegion(ArkUI_RenderNodeHandle node, float x, float y, float w, float h)

Description Sets the drawing region for the render node. This drawing region is mainly used to address drawing issues caused by exceeding boundaries. When possible, set the size according to the actual drawing range.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
float xX-coordinate of the upper left corner of the bounds, in pixels.
float yY-coordinate of the upper left corner of the bounds, in pixels.
float wWidth of the bounds (in pixels).
float hHeight of the bounds (in pixels).

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_AttachContentModifier()

int32_t OH_ArkUI_RenderNodeUtils_AttachContentModifier(ArkUI_RenderNodeHandle node, ArkUI_RenderContentModifierHandle modifier)

Description Attaches a content modifier to the render node.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeHandle nodeTarget render node.
ArkUI_RenderContentModifierHandle modifierContent modifier.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE if the target node originates from a FrameNode. This specification is supported since API version 22.

OH_ArkUI_RenderNodeUtils_CreateContentModifier()

ArkUI_RenderContentModifierHandle OH_ArkUI_RenderNodeUtils_CreateContentModifier()

Description Creates a content modifier.

Since: 20

Return value

TypeDescription
ArkUI_RenderContentModifierHandleContent modifier.

OH_ArkUI_RenderNodeUtils_DisposeContentModifier()

void OH_ArkUI_RenderNodeUtils_DisposeContentModifier(ArkUI_RenderContentModifierHandle modifier)

Description Disposes of the content modifier.

Since: 20

Parameters

NameDescription
ArkUI_RenderContentModifierHandle modifierContent modifier.

OH_ArkUI_RenderNodeUtils_AttachFloatProperty()

int32_t OH_ArkUI_RenderNodeUtils_AttachFloatProperty(ArkUI_RenderContentModifierHandle modifier, ArkUI_FloatPropertyHandle property)

Description Attaches a float property to the target content modifier.

Since: 20

Parameters

NameDescription
ArkUI_RenderContentModifierHandle modifierTarget content modifier.
ArkUI_FloatPropertyHandle propertyFloat property.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.

OH_ArkUI_RenderNodeUtils_AttachVector2Property()

int32_t OH_ArkUI_RenderNodeUtils_AttachVector2Property(ArkUI_RenderContentModifierHandle modifier, ArkUI_Vector2PropertyHandle property)

Description Attaches a 2D vector property to the target content modifier.

Since: 20

Parameters

NameDescription
ArkUI_RenderContentModifierHandle modifierTarget content modifier.
ArkUI_Vector2PropertyHandle property2D vector property.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.

OH_ArkUI_RenderNodeUtils_AttachColorProperty()

int32_t OH_ArkUI_RenderNodeUtils_AttachColorProperty(ArkUI_RenderContentModifierHandle modifier, ArkUI_ColorPropertyHandle property)

Description Attaches a color property to the target content modifier.

Since: 20

Parameters

NameDescription
ArkUI_RenderContentModifierHandle modifierTarget content modifier.
ArkUI_ColorPropertyHandle propertyColor property.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.

OH_ArkUI_RenderNodeUtils_AttachFloatAnimatableProperty()

int32_t OH_ArkUI_RenderNodeUtils_AttachFloatAnimatableProperty(ArkUI_RenderContentModifierHandle modifier, ArkUI_FloatAnimatablePropertyHandle property)

Description Attaches an animatable float property to the target content modifier.

Since: 20

Parameters

NameDescription
ArkUI_RenderContentModifierHandle modifierTarget content modifier.
ArkUI_FloatAnimatablePropertyHandle propertyAnimatable float property.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.

OH_ArkUI_RenderNodeUtils_AttachVector2AnimatableProperty()

int32_t OH_ArkUI_RenderNodeUtils_AttachVector2AnimatableProperty(ArkUI_RenderContentModifierHandle modifier, ArkUI_Vector2AnimatablePropertyHandle property)

Description Attaches an animatable 2D vector property to the target content modifier.

Since: 20

Parameters

NameDescription
ArkUI_RenderContentModifierHandle modifierTarget content modifier.
ArkUI_Vector2AnimatablePropertyHandle propertyAnimatable 2D vector property.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.

OH_ArkUI_RenderNodeUtils_AttachColorAnimatableProperty()

int32_t OH_ArkUI_RenderNodeUtils_AttachColorAnimatableProperty(ArkUI_RenderContentModifierHandle modifier, ArkUI_ColorAnimatablePropertyHandle property)

Description Attaches an animatable color property to the target content modifier.

Since: 20

Parameters

NameDescription
ArkUI_RenderContentModifierHandle modifierTarget content modifier.
ArkUI_ColorAnimatablePropertyHandle propertyAnimatable color property.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.

OH_ArkUI_RenderNodeUtils_CreateFloatProperty()

ArkUI_FloatPropertyHandle OH_ArkUI_RenderNodeUtils_CreateFloatProperty(float value)

Description Creates a float property.

Since: 20

Parameters

NameDescription
float valueProperty value.

Return value

TypeDescription
ArkUI_FloatPropertyHandleFloat property.

OH_ArkUI_RenderNodeUtils_SetFloatPropertyValue()

int32_t OH_ArkUI_RenderNodeUtils_SetFloatPropertyValue(ArkUI_FloatPropertyHandle property, float value)

Description Sets the value of the float property.

Since: 20

Parameters

NameDescription
ArkUI_FloatPropertyHandle propertyFloat property.
float valueProperty value.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.

OH_ArkUI_RenderNodeUtils_GetFloatPropertyValue()

int32_t OH_ArkUI_RenderNodeUtils_GetFloatPropertyValue(ArkUI_FloatPropertyHandle property, float* value)

Description Obtains the value of the float property.

Since: 20

Parameters

NameDescription
ArkUI_FloatPropertyHandle propertyFloat property.
float* valuePointer used to store the property value.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.

OH_ArkUI_RenderNodeUtils_DisposeFloatProperty()

void OH_ArkUI_RenderNodeUtils_DisposeFloatProperty(ArkUI_FloatPropertyHandle property)

Description Disposes of the float property.

Since: 20

Parameters

NameDescription
ArkUI_FloatPropertyHandle propertyFloat property.

OH_ArkUI_RenderNodeUtils_CreateVector2Property()

ArkUI_Vector2PropertyHandle OH_ArkUI_RenderNodeUtils_CreateVector2Property(float x, float y)

Description Creates a 2D vector property.

Since: 20

Parameters

NameDescription
float xX-coordinate of the property.
float yY-coordinate of the property.

Return value

TypeDescription
ArkUI_Vector2PropertyHandle2D vector property.

OH_ArkUI_RenderNodeUtils_SetVector2PropertyValue()

int32_t OH_ArkUI_RenderNodeUtils_SetVector2PropertyValue(ArkUI_Vector2PropertyHandle property, float x, float y)

Description Sets the value of the 2D vector property.

Since: 20

Parameters

NameDescription
ArkUI_Vector2PropertyHandle property2D vector property.
float xX-coordinate of the property.
float yY-coordinate of the property.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.

OH_ArkUI_RenderNodeUtils_GetVector2PropertyValue()

int32_t OH_ArkUI_RenderNodeUtils_GetVector2PropertyValue(ArkUI_Vector2PropertyHandle property, float* x, float* y)

Description Obtains the value of the 2D vector property.

Since: 20

Parameters

NameDescription
ArkUI_Vector2PropertyHandle property2D vector property.
float* xPointer used to store the x-coordinate of the property.
float* yPointer used to store the y-coordinate of the property.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.

OH_ArkUI_RenderNodeUtils_DisposeVector2Property()

void OH_ArkUI_RenderNodeUtils_DisposeVector2Property(ArkUI_Vector2PropertyHandle property)

Description Disposes of the 2D vector property.

Since: 20

Parameters

NameDescription
ArkUI_Vector2PropertyHandle property2D vector property.

OH_ArkUI_RenderNodeUtils_CreateColorProperty()

ArkUI_ColorPropertyHandle OH_ArkUI_RenderNodeUtils_CreateColorProperty(uint32_t value)

Description Creates a color property.

Since: 20

Parameters

NameDescription
uint32_t valueProperty value.

Return value

TypeDescription
ArkUI_ColorPropertyHandleColor property.

OH_ArkUI_RenderNodeUtils_SetColorPropertyValue()

int32_t OH_ArkUI_RenderNodeUtils_SetColorPropertyValue(ArkUI_ColorPropertyHandle property, uint32_t value)

Description Sets the value of the color property.

Since: 20

Parameters

NameDescription
ArkUI_ColorPropertyHandle propertyColor property.
uint32_t valueProperty value.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.

OH_ArkUI_RenderNodeUtils_GetColorPropertyValue()

int32_t OH_ArkUI_RenderNodeUtils_GetColorPropertyValue(ArkUI_ColorPropertyHandle property, uint32_t* value)

Description Obtains the value of the color property.

Since: 20

Parameters

NameDescription
ArkUI_ColorPropertyHandle propertyColor property.
uint32_t* valuePointer used to store the property value.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.

OH_ArkUI_RenderNodeUtils_DisposeColorProperty()

void OH_ArkUI_RenderNodeUtils_DisposeColorProperty(ArkUI_ColorPropertyHandle property)

Description Disposes of the color property.

Since: 20

Parameters

NameDescription
ArkUI_ColorPropertyHandle propertyColor property.

OH_ArkUI_RenderNodeUtils_CreateFloatAnimatableProperty()

ArkUI_FloatAnimatablePropertyHandle OH_ArkUI_RenderNodeUtils_CreateFloatAnimatableProperty(float value)

Description Creates an animatable float property.

Since: 20

Parameters

NameDescription
float valueProperty value.

Return value

TypeDescription
ArkUI_FloatAnimatablePropertyHandleAnimatable float property.

OH_ArkUI_RenderNodeUtils_SetFloatAnimatablePropertyValue()

int32_t OH_ArkUI_RenderNodeUtils_SetFloatAnimatablePropertyValue(ArkUI_FloatAnimatablePropertyHandle property, float value)

Description Sets the value of the animatable float property.

Since: 20

Parameters

NameDescription
ArkUI_FloatAnimatablePropertyHandle propertyAnimatable float property.
float valueProperty value.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.

OH_ArkUI_RenderNodeUtils_GetFloatAnimatablePropertyValue()

int32_t OH_ArkUI_RenderNodeUtils_GetFloatAnimatablePropertyValue(ArkUI_FloatAnimatablePropertyHandle property, float* value)

Description Obtains the value of the animatable float property.

Since: 20

Parameters

NameDescription
ArkUI_FloatAnimatablePropertyHandle propertyAnimatable float property.
float* valuePointer used to store the property value.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.

OH_ArkUI_RenderNodeUtils_DisposeFloatAnimatableProperty()

void OH_ArkUI_RenderNodeUtils_DisposeFloatAnimatableProperty(ArkUI_FloatAnimatablePropertyHandle property)

Description Disposes of the animatable float property.

Since: 20

Parameters

NameDescription
ArkUI_FloatAnimatablePropertyHandle propertyAnimatable float property.

OH_ArkUI_RenderNodeUtils_CreateVector2AnimatableProperty()

ArkUI_Vector2AnimatablePropertyHandle OH_ArkUI_RenderNodeUtils_CreateVector2AnimatableProperty(float x, float y)

Description Creates an animatable 2D vector property.

Since: 20

Parameters

NameDescription
float xX-coordinate of the property.
float yY-coordinate of the property.

Return value

TypeDescription
ArkUI_Vector2AnimatablePropertyHandleAnimatable 2D vector property.

OH_ArkUI_RenderNodeUtils_SetVector2AnimatablePropertyValue()

int32_t OH_ArkUI_RenderNodeUtils_SetVector2AnimatablePropertyValue(ArkUI_Vector2AnimatablePropertyHandle property, float x, float y)

Description Sets the value of the animatable 2D vector property.

Since: 20

Parameters

NameDescription
ArkUI_Vector2AnimatablePropertyHandle propertyAnimatable 2D vector property.
float xX-coordinate of the property.
float yY-coordinate of the property.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.

OH_ArkUI_RenderNodeUtils_GetVector2AnimatablePropertyValue()

int32_t OH_ArkUI_RenderNodeUtils_GetVector2AnimatablePropertyValue(ArkUI_Vector2AnimatablePropertyHandle property, float* x, float* y)

Description Obtains the value of the animatable 2D vector property.

Since: 20

Parameters

NameDescription
ArkUI_Vector2AnimatablePropertyHandle propertyAnimatable 2D vector property.
float* xPointer used to store the x-coordinate of the property.
float* yPointer used to store the y-coordinate of the property.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.

OH_ArkUI_RenderNodeUtils_DisposeVector2AnimatableProperty()

void OH_ArkUI_RenderNodeUtils_DisposeVector2AnimatableProperty(ArkUI_Vector2AnimatablePropertyHandle property)

Description Disposes of the animatable 2D vector property.

Since: 20

Parameters

NameDescription
ArkUI_Vector2AnimatablePropertyHandle propertyAnimatable 2D vector property.

OH_ArkUI_RenderNodeUtils_CreateColorAnimatableProperty()

ArkUI_ColorAnimatablePropertyHandle OH_ArkUI_RenderNodeUtils_CreateColorAnimatableProperty(uint32_t value)

Description Creates an animatable color property.

Since: 20

Parameters

NameDescription
uint32_t valueProperty value.

Return value

TypeDescription
ArkUI_ColorAnimatablePropertyHandleAnimatable color property.

OH_ArkUI_RenderNodeUtils_SetColorAnimatablePropertyValue()

int32_t OH_ArkUI_RenderNodeUtils_SetColorAnimatablePropertyValue(ArkUI_ColorAnimatablePropertyHandle property, uint32_t value)

Description Sets the value of the animatable color property.

Since: 20

Parameters

NameDescription
ArkUI_ColorAnimatablePropertyHandle propertyAnimatable color property.
uint32_t valueProperty value.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.

OH_ArkUI_RenderNodeUtils_GetColorAnimatablePropertyValue()

int32_t OH_ArkUI_RenderNodeUtils_GetColorAnimatablePropertyValue(ArkUI_ColorAnimatablePropertyHandle property, uint32_t* value)

Description Obtains the value of the animatable color property.

Since: 20

Parameters

NameDescription
ArkUI_ColorAnimatablePropertyHandle propertyAnimatable color property.
uint32_t* valuePointer used to store the property value.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.

OH_ArkUI_RenderNodeUtils_DisposeColorAnimatableProperty()

void OH_ArkUI_RenderNodeUtils_DisposeColorAnimatableProperty(ArkUI_ColorAnimatablePropertyHandle property)

Description Disposes of the animatable color property.

Since: 20

Parameters

NameDescription
ArkUI_ColorAnimatablePropertyHandle propertyAnimatable color property.

OH_ArkUI_RenderNodeUtils_SetContentModifierOnDraw()

int32_t OH_ArkUI_RenderNodeUtils_SetContentModifierOnDraw(ArkUI_RenderContentModifierHandle modifier, void* userData, void (*callback)(ArkUI_DrawContext* context, void* userData))

Description Sets the onDraw callback function for the content modifier.

Since: 20

Parameters

NameDescription
ArkUI_RenderContentModifierHandle modifierTarget content modifier.
void* userDataCustom data to be passed to the callback.
void (callback)(ArkUI_DrawContext context, void* userData)Callback for receiving drawing events.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.

OH_ArkUI_RenderNodeUtils_CreateRectShapeOption()

ArkUI_RectShapeOption* OH_ArkUI_RenderNodeUtils_CreateRectShapeOption()

Description Creates a rectangle shape option.

Since: 20

Return value

TypeDescription
ArkUI_RectShapeOption*Pointer to the rectangle shape option.

OH_ArkUI_RenderNodeUtils_DisposeRectShapeOption()

void OH_ArkUI_RenderNodeUtils_DisposeRectShapeOption(ArkUI_RectShapeOption* option)

Description Disposes of the rectangle shape option.

Since: 20

Parameters

NameDescription
ArkUI_RectShapeOption* optionPointer to the rectangle shape option.

OH_ArkUI_RenderNodeUtils_SetRectShapeOptionEdgeValue()

void OH_ArkUI_RenderNodeUtils_SetRectShapeOptionEdgeValue(ArkUI_RectShapeOption* option, float edgeValue, ArkUI_EdgeDirection direction)

Description Sets the edge value for the rectangle shape option. When the left and top boundaries are set to negative values, part of the content that exceeds the node may fail to draw due to the layer overlay effect involved in display.

Since: 20

Parameters

NameDescription
ArkUI_RectShapeOption* optionPointer to the rectangle shape option.
float edgeValueEdge value to set.
ArkUI_EdgeDirection directionEdge direction to apply the value.

OH_ArkUI_RenderNodeUtils_CreateNodeBorderStyleOption()

ArkUI_NodeBorderStyleOption* OH_ArkUI_RenderNodeUtils_CreateNodeBorderStyleOption()

Description Creates a node border style option.

Since: 20

Return value

TypeDescription
ArkUI_NodeBorderStyleOption*Pointer to the node border style option.

OH_ArkUI_RenderNodeUtils_DisposeNodeBorderStyleOption()

void OH_ArkUI_RenderNodeUtils_DisposeNodeBorderStyleOption(ArkUI_NodeBorderStyleOption* option)

Description Disposes of the node border style option.

Since: 20

Parameters

NameDescription
ArkUI_NodeBorderStyleOption* optionPointer to the node border style option.

OH_ArkUI_RenderNodeUtils_SetNodeBorderStyleOptionEdgeStyle()

void OH_ArkUI_RenderNodeUtils_SetNodeBorderStyleOptionEdgeStyle(ArkUI_NodeBorderStyleOption* option, ArkUI_BorderStyle edgeStyle, ArkUI_EdgeDirection direction)

Description Sets the edge style for the node border style option.

Since: 20

Parameters

NameDescription
ArkUI_NodeBorderStyleOption* optionPointer to the node border style option.
ArkUI_BorderStyle edgeStyleEdge border style value of the node border style option.
ArkUI_EdgeDirection directionEdge direction.

OH_ArkUI_RenderNodeUtils_CreateNodeBorderWidthOption()

ArkUI_NodeBorderWidthOption* OH_ArkUI_RenderNodeUtils_CreateNodeBorderWidthOption()

Description Creates a node border width option.

Since: 20

Return value

TypeDescription
ArkUI_NodeBorderWidthOption*Pointer to the node border width option.

OH_ArkUI_RenderNodeUtils_DisposeNodeBorderWidthOption()

void OH_ArkUI_RenderNodeUtils_DisposeNodeBorderWidthOption(ArkUI_NodeBorderWidthOption* option)

Description Disposes of the node border width option.

Since: 20

Parameters

NameDescription
ArkUI_NodeBorderWidthOption* optionPointer to the node border width option.

OH_ArkUI_RenderNodeUtils_SetNodeBorderWidthOptionEdgeWidth()

void OH_ArkUI_RenderNodeUtils_SetNodeBorderWidthOptionEdgeWidth(ArkUI_NodeBorderWidthOption* option, float edgeWidth, ArkUI_EdgeDirection direction)

Description Sets the edge width for the node border width option.

Since: 20

Parameters

NameDescription
ArkUI_NodeBorderWidthOption* optionPointer to the node border width option.
float edgeWidthEdge width of the node border width option.
Value range: [0, +∞).
ArkUI_EdgeDirection directionEdge direction.

OH_ArkUI_RenderNodeUtils_CreateNodeBorderColorOption()

ArkUI_NodeBorderColorOption* OH_ArkUI_RenderNodeUtils_CreateNodeBorderColorOption()

Description Creates a node border color option.

Since: 20

Return value

TypeDescription
ArkUI_NodeBorderColorOption*Pointer to the node border color option.

OH_ArkUI_RenderNodeUtils_DisposeNodeBorderColorOption()

void OH_ArkUI_RenderNodeUtils_DisposeNodeBorderColorOption(ArkUI_NodeBorderColorOption* option)

Description Disposes of the node border color option.

Since: 20

Parameters

NameDescription
ArkUI_NodeBorderColorOption* optionPointer to the node border color option.

OH_ArkUI_RenderNodeUtils_SetNodeBorderColorOptionEdgeColor()

void OH_ArkUI_RenderNodeUtils_SetNodeBorderColorOptionEdgeColor(ArkUI_NodeBorderColorOption* option, uint32_t edgeColor, ArkUI_EdgeDirection direction)

Description Sets the edge color for the node border color option.

Since: 20

Parameters

NameDescription
ArkUI_NodeBorderColorOption* optionPointer to the node border color option.
uint32_t edgeColorEdge color of the node border color option.
ArkUI_EdgeDirection directionEdge direction.

OH_ArkUI_RenderNodeUtils_CreateNodeBorderRadiusOption()

ArkUI_NodeBorderRadiusOption* OH_ArkUI_RenderNodeUtils_CreateNodeBorderRadiusOption()

Description Creates a node border radius option.

Since: 20

Return value

TypeDescription
ArkUI_NodeBorderRadiusOption*Pointer to the node border radius option.

OH_ArkUI_RenderNodeUtils_DisposeNodeBorderRadiusOption()

void OH_ArkUI_RenderNodeUtils_DisposeNodeBorderRadiusOption(ArkUI_NodeBorderRadiusOption* option)

Description Disposes of the node border radius option.

Since: 20

Parameters

NameDescription
ArkUI_NodeBorderRadiusOption* optionPointer to the node border radius option.

OH_ArkUI_RenderNodeUtils_SetNodeBorderRadiusOptionCornerRadius()

void OH_ArkUI_RenderNodeUtils_SetNodeBorderRadiusOptionCornerRadius(ArkUI_NodeBorderRadiusOption* option, uint32_t cornerRadius, ArkUI_CornerDirection direction)

Description Sets the corner radius for the node border radius option. Note that the input parameter cornerRadius is of type uint32_t, and only positive integers are supported.

Since: 20

Parameters

NameDescription
ArkUI_NodeBorderRadiusOption* optionPointer to the node border radius option.
uint32_t cornerRadiusCorner radius of the node border radius option.
ArkUI_CornerDirection directionEdge direction.

OH_ArkUI_RenderNodeUtils_CreateCircleShapeOption()

ArkUI_CircleShapeOption* OH_ArkUI_RenderNodeUtils_CreateCircleShapeOption()

Description Creates a circle shape option.

Since: 20

Return value

TypeDescription
ArkUI_CircleShapeOption*Pointer to the circle shape option.

OH_ArkUI_RenderNodeUtils_DisposeCircleShapeOption()

void OH_ArkUI_RenderNodeUtils_DisposeCircleShapeOption(ArkUI_CircleShapeOption* option)

Description Disposes of the circle shape option.

Since: 20

Parameters

NameDescription
ArkUI_CircleShapeOption* optionPointer to the circle shape option.

OH_ArkUI_RenderNodeUtils_SetCircleShapeOptionCenterX()

void OH_ArkUI_RenderNodeUtils_SetCircleShapeOptionCenterX(ArkUI_CircleShapeOption* option, float centerX)

Description Sets the x-coordinate of the center for the circle shape option.

Since: 20

Parameters

NameDescription
ArkUI_CircleShapeOption* optionPointer to the circle shape option.
float centerXX-coordinate of the center of the circle shape option.

OH_ArkUI_RenderNodeUtils_SetCircleShapeOptionCenterY()

void OH_ArkUI_RenderNodeUtils_SetCircleShapeOptionCenterY(ArkUI_CircleShapeOption* option, float centerY)

Description Sets the y-coordinate of the center for the circle shape option.

Since: 20

Parameters

NameDescription
ArkUI_CircleShapeOption* optionPointer to the circle shape option.
float centerYY-coordinate of the center of the circle shape option.

OH_ArkUI_RenderNodeUtils_SetCircleShapeOptionRadius()

void OH_ArkUI_RenderNodeUtils_SetCircleShapeOptionRadius(ArkUI_CircleShapeOption* option, float radius)

Description Sets the radius value for the circle shape option.

Since: 20

Parameters

NameDescription
ArkUI_CircleShapeOption* optionPointer to the circle shape option.
float radiusRadius, in pixels.

OH_ArkUI_RenderNodeUtils_CreateRoundRectShapeOption()

ArkUI_RoundRectShapeOption* OH_ArkUI_RenderNodeUtils_CreateRoundRectShapeOption()

Description Creates a rounded rectangle shape option.

Since: 20

Return value

TypeDescription
ArkUI_RoundRectShapeOption*Pointer to the rounded rectangle shape option.

OH_ArkUI_RenderNodeUtils_DisposeRoundRectShapeOption()

void OH_ArkUI_RenderNodeUtils_DisposeRoundRectShapeOption(ArkUI_RoundRectShapeOption* option)

Description Disposes of the rounded rectangle shape option.

Since: 20

Parameters

NameDescription
ArkUI_RoundRectShapeOption* optionPointer to the rounded rectangle shape option.

OH_ArkUI_RenderNodeUtils_SetRoundRectShapeOptionEdgeValue()

void OH_ArkUI_RenderNodeUtils_SetRoundRectShapeOptionEdgeValue(ArkUI_RoundRectShapeOption* option, float edgeValue, ArkUI_EdgeDirection direction)

Description Sets the edge values for the rounded rectangle shape option.

Since: 20

Parameters

NameDescription
ArkUI_RoundRectShapeOption* optionPointer to the rounded rectangle shape option.
float edgeValueEdge value to set.
ArkUI_EdgeDirection directionEdge direction to apply the value.

OH_ArkUI_RenderNodeUtils_SetRoundRectShapeOptionCornerXY()

void OH_ArkUI_RenderNodeUtils_SetRoundRectShapeOptionCornerXY(ArkUI_RoundRectShapeOption* option, float x, float y, ArkUI_CornerDirection direction)

Description Sets the coordinates for the target corner.

Since: 20

Parameters

NameDescription
ArkUI_RoundRectShapeOption* optionPointer to the rounded rectangle shape option.
float xX-coordinate of the target corner, in pixels.
float yY-coordinate of the target corner, in pixels.
ArkUI_CornerDirection directionDirection of the target corner.

OH_ArkUI_RenderNodeUtils_CreateCommandPathOption()

ArkUI_CommandPathOption* OH_ArkUI_RenderNodeUtils_CreateCommandPathOption()

Description Creates a custom drawing path option.

Since: 20

Return value

TypeDescription
ArkUI_CommandPathOption*Pointer to the custom drawing path option.

OH_ArkUI_RenderNodeUtils_DisposeCommandPathOption()

void OH_ArkUI_RenderNodeUtils_DisposeCommandPathOption(ArkUI_CommandPathOption* option)

Description Disposes of the custom drawing path option.

Since: 20

Parameters

NameDescription
ArkUI_CommandPathOption* optionPointer to the custom drawing path option.

OH_ArkUI_RenderNodeUtils_SetCommandPathOptionCommands()

void OH_ArkUI_RenderNodeUtils_SetCommandPathOptionCommands(ArkUI_CommandPathOption* option, char* commands)

Description Sets the command values for the custom drawing path option.

Since: 20

Parameters

NameDescription
ArkUI_CommandPathOption* optionPointer to the custom drawing path option.
char* commandsCommand values. The input parameter format is <path>shape.

OH_ArkUI_RenderNodeUtils_CreateRenderNodeMaskOptionFromRectShape()

ArkUI_RenderNodeMaskOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeMaskOptionFromRectShape(ArkUI_RectShapeOption* shape)

Description Creates a mask from a rectangle shape.

Since: 20

Parameters

NameDescription
ArkUI_RectShapeOption* shapePointer to the rectangle shape option.

Return value

TypeDescription
ArkUI_RenderNodeMaskOptionPointer to the render node mask.

OH_ArkUI_RenderNodeUtils_CreateRenderNodeMaskOptionFromRoundRectShape()

ArkUI_RenderNodeMaskOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeMaskOptionFromRoundRectShape(ArkUI_RoundRectShapeOption* shape)

Description Creates a mask from a rounded rectangle shape.

Since: 20

Parameters

NameDescription
ArkUI_RoundRectShapeOption* shapePointer to the rounded rectangle shape option.

Return value

TypeDescription
ArkUI_RenderNodeMaskOptionPointer to the render node mask.

OH_ArkUI_RenderNodeUtils_CreateRenderNodeMaskOptionFromCircleShape()

ArkUI_RenderNodeMaskOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeMaskOptionFromCircleShape(ArkUI_CircleShapeOption* shape)

Description Creates a mask from a circle shape.

Since: 20

Parameters

NameDescription
ArkUI_CircleShapeOption* shapePointer to the circle shape option.

Return value

TypeDescription
ArkUI_RenderNodeMaskOptionPointer to the render node mask.

OH_ArkUI_RenderNodeUtils_CreateRenderNodeMaskOptionFromOvalShape()

ArkUI_RenderNodeMaskOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeMaskOptionFromOvalShape(ArkUI_RectShapeOption* shape)

Description Creates a mask from an oval shape.

Since: 20

Parameters

NameDescription
ArkUI_RectShapeOption* shapePointer to the oval shape option.

Return value

TypeDescription
ArkUI_RenderNodeMaskOptionPointer to the render node mask.

OH_ArkUI_RenderNodeUtils_CreateRenderNodeMaskOptionFromCommandPath()

ArkUI_RenderNodeMaskOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeMaskOptionFromCommandPath(ArkUI_CommandPathOption* path)

Description Creates a mask from a custom drawing path.

Since: 20

Parameters

NameDescription
ArkUI_CommandPathOption* pathPointer to the custom drawing path option.

Return value

TypeDescription
ArkUI_RenderNodeMaskOptionPointer to the render node mask.

OH_ArkUI_RenderNodeUtils_DisposeRenderNodeMaskOption()

void OH_ArkUI_RenderNodeUtils_DisposeRenderNodeMaskOption(ArkUI_RenderNodeMaskOption* option)

Description Disposes of the render node mask option.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeMaskOption* optionPointer to the render node mask.

OH_ArkUI_RenderNodeUtils_SetRenderNodeMaskOptionFillColor()

void OH_ArkUI_RenderNodeUtils_SetRenderNodeMaskOptionFillColor(ArkUI_RenderNodeMaskOption* mask, uint32_t fillColor)

Description Sets the fill color for the render node mask option.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeMaskOption* maskPointer to the render node mask.
uint32_t fillColorFill color of the mask.

OH_ArkUI_RenderNodeUtils_SetRenderNodeMaskOptionStrokeColor()

void OH_ArkUI_RenderNodeUtils_SetRenderNodeMaskOptionStrokeColor(ArkUI_RenderNodeMaskOption* mask, uint32_t strokeColor)

Description Sets the stroke color for the render node mask option.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeMaskOption* maskPointer to the render node mask.
uint32_t strokeColorStroke color of the mask.

OH_ArkUI_RenderNodeUtils_SetRenderNodeMaskOptionStrokeWidth()

void OH_ArkUI_RenderNodeUtils_SetRenderNodeMaskOptionStrokeWidth(ArkUI_RenderNodeMaskOption* mask, float strokeWidth)

Description Sets the stroke width for the render node mask option. Drawing with the corresponding width is performed centered on the border path.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeMaskOption* maskPointer to the render node mask.
float strokeWidthStroke width of the mask.
Value range: (0, +∞). If the value is a negative number or 0, the stroke width is set to 1 pixel during drawing.

OH_ArkUI_RenderNodeUtils_CreateRenderNodeClipOptionFromRectShape()

ArkUI_RenderNodeClipOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeClipOptionFromRectShape(ArkUI_RectShapeOption* shape)

Description Creates a render node clip option from a rectangle shape.

Since: 20

Parameters

NameDescription
ArkUI_RectShapeOption* shapePointer to the rectangle shape option.

Return value

TypeDescription
ArkUI_RenderNodeClipOption*Pointer to the render node clip.

OH_ArkUI_RenderNodeUtils_CreateRenderNodeClipOptionFromRoundRectShape()

ArkUI_RenderNodeClipOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeClipOptionFromRoundRectShape(ArkUI_RoundRectShapeOption* shape)

Description Creates a render node clip option from a rounded rectangle shape.

Since: 20

Parameters

NameDescription
ArkUI_RoundRectShapeOption* shapePointer to the rounded rectangle shape option.

Return value

TypeDescription
ArkUI_RenderNodeClipOption*Pointer to the render node clip.

OH_ArkUI_RenderNodeUtils_CreateRenderNodeClipOptionFromCircleShape()

ArkUI_RenderNodeClipOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeClipOptionFromCircleShape(ArkUI_CircleShapeOption* shape)

Description Creates a render node clip option from a circle shape.

Since: 20

Parameters

NameDescription
ArkUI_CircleShapeOption* shapePointer to the circle shape option.

Return value

TypeDescription
ArkUI_RenderNodeClipOption*Pointer to the render node clip.

OH_ArkUI_RenderNodeUtils_CreateRenderNodeClipOptionFromOvalShape()

ArkUI_RenderNodeClipOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeClipOptionFromOvalShape(ArkUI_RectShapeOption* shape)

Description Creates a render node clip option from an oval shape.

Since: 20

Parameters

NameDescription
ArkUI_RectShapeOption* shapePointer to the oval shape option.

Return value

TypeDescription
ArkUI_RenderNodeClipOption*Pointer to the render node clip.

OH_ArkUI_RenderNodeUtils_CreateRenderNodeClipOptionFromCommandPath()

ArkUI_RenderNodeClipOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeClipOptionFromCommandPath(ArkUI_CommandPathOption* path)

Description Creates a render node clip option from a custom drawing path.

Since: 20

Parameters

NameDescription
ArkUI_CommandPathOption* pathPointer to the custom drawing path option.

Return value

TypeDescription
ArkUI_RenderNodeClipOption*Pointer to the render node clip.

OH_ArkUI_RenderNodeUtils_DisposeRenderNodeClipOption()

void OH_ArkUI_RenderNodeUtils_DisposeRenderNodeClipOption(ArkUI_RenderNodeClipOption* option)

Description Disposes of the render node clip option.

Since: 20

Parameters

NameDescription
ArkUI_RenderNodeClipOption* optionPointer to the render node clip.

OH_ArkUI_RenderNodeUtils_GetRenderNode()

int32_t OH_ArkUI_RenderNodeUtils_GetRenderNode(ArkUI_NodeHandle node, ArkUI_RenderNodeHandle* renderNode);

Description Obtains the RenderNode of the target node that has been accepted as a child node. If a RenderNode is obtained through this API, when the disposeNode API of ArkUI_NativeNodeAPI_1 is invoked to destroy the FrameNode, the OH_ArkUI_RenderNodeUtils_DisposeNode API needs to be invoked additionally to release the RenderNode.

Since: 22

Parameters

NameDescription
ArkUI_NodeHandle nodePointer to ArkUI_NodeHandle, which specifies the target node.
ArkUI_RenderNodeHandle* renderNodePointer to ArkUI_RenderNodeHandle, which specifies the RenderNode of the target node.

Return value

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_RENDER_NOT_ADOPTED_NODE if this node is not accepted as a child node.

OH_ArkUI_RenderNodeUtils_SetRectShapeOptionValue()

void OH_ArkUI_RenderNodeUtils_SetRectShapeOptionValue(ArkUI_RectShapeOption* option, float x, float y, float width, float height)

Description Sets the border range for a rectangle shape option. This function defines the geometric frame of a rectangle by specifying its position and size.

Since: 26.0.0

Parameters

NameDescription
ArkUI_RectShapeOption* optionPointer to the rectangle shape option to be configured.
float xX coordinate of the upper left corner of the rectangle, which is used to determine the position of the left boundary.
float yY coordinate of the upper left corner of the rectangle, which is used to determine the position of the upper boundary.
float widthWidth of the rectangle, which indicates the horizontal span starting from the X coordinate and is used to determine the position of the right boundary. That is, the X coordinate of the lower right corner of the rectangle is equal to x + width.
float heightHeight of the rectangle, which indicates the vertical span starting from the Y coordinate and is used to determine the position of the bottom boundary. That is, the Y coordinate of the lower right corner of the rectangle is equal to y + height.

OH_ArkUI_RenderNodeUtils_SetRoundRectShapeOptionValue()

void OH_ArkUI_RenderNodeUtils_SetRoundRectShapeOptionValue(ArkUI_RoundRectShapeOption* option, float x, float y, float width, float height)

Description Sets the border range for a rounded rectangle shape option. This function defines the geometric frame of a rounded rectangle by specifying its position and size.

Since: 26.0.0

Parameters

NameDescription
ArkUI_RoundRectShapeOption* optionPointer to the rounded rectangle shape option to be configured.
float xX coordinate of the upper left corner of the rectangle, which is used to determine the position of the left boundary.
float yY coordinate of the upper left corner of the rectangle, which is used to determine the position of the upper boundary.
float widthWidth of the rectangle, which indicates the horizontal span starting from the X coordinate and is used to determine the position of the right boundary. That is, the X coordinate of the lower right corner of the rectangle is equal to x + width.
float heightHeight of the rectangle, which indicates the vertical span starting from the Y coordinate and is used to determine the position of the bottom boundary. That is, the Y coordinate of the lower right corner of the rectangle is equal to y + height.

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 arkts-apis-uicontext-contextmenucontroller

openharmony 鸿蒙 errorcode-canvas

openharmony 鸿蒙 capi-oh-nativexcomponent-native-xcomponent-oh-nativexcomponent

openharmony 鸿蒙 errorcode-bindSheet

openharmony 鸿蒙 js-apis-arkui-uiExtension-sys

openharmony 鸿蒙 capi-arkui-accessibility-arkui-accessibilityeventinfo

openharmony 鸿蒙 capi-arkui-rendernodeutils

openharmony 鸿蒙 js-apis-arkui-node

openharmony 鸿蒙 capi-native-node-h

openharmony 鸿蒙 capi-arkui-nativemodule-arkui-listitemswipeactionitem

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