1 /* 2 * Copyright (c) 2025 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"), 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 /** 17 * @addtogroup ArkUI_RenderNodeUtils 18 * @{ 19 * 20 * @brief Provides RenderNode capabilities of ArkUI on the native side, such as RenderNode creation and destruction, 21 * tree node operations, and attribute setting. 22 * 23 * @since 20 24 */ 25 26 /** 27 * @file native_render.h 28 * 29 * @brief Provides type definitions for <b>NativeRenderNode</b> APIs. 30 * 31 * @library libace_ndk.z.so 32 * @syscap SystemCapability.ArkUI.ArkUI.Full 33 * @kit ArkUI 34 * @since 20 35 */ 36 37 #ifndef ARKUI_NATIVE_RENDER_H 38 #define ARKUI_NATIVE_RENDER_H 39 40 #ifdef __cplusplus 41 #include <cstdint> 42 #else 43 #include <stdint.h> 44 #endif 45 46 #include "native_type.h" 47 48 #ifdef __cplusplus 49 extern "C" { 50 #endif 51 52 /** 53 * @brief Handle to ArkUI native render node object. 54 * 55 * @since 20 56 */ 57 typedef struct ArkUI_RenderNode* ArkUI_RenderNodeHandle; 58 59 /** 60 * @brief Handle to ArkUI native render content modifier. 61 * 62 * @since 20 63 */ 64 typedef struct ArkUI_RenderContentModifier* ArkUI_RenderContentModifierHandle; 65 66 /** 67 * @brief Handle to the ArkUI native float render property. 68 * 69 * @since 20 70 */ 71 typedef struct ArkUI_FloatProperty* ArkUI_FloatPropertyHandle; 72 73 /** 74 * @brief Handle to the ArkUI native vector2 render property. 75 * 76 * @since 20 77 */ 78 typedef struct ArkUI_Vector2Property* ArkUI_Vector2PropertyHandle; 79 80 /** 81 * @brief Handle to the ArkUI native color render property. 82 * 83 * @since 20 84 */ 85 typedef struct ArkUI_ColorProperty* ArkUI_ColorPropertyHandle; 86 87 /** 88 * @brief Handle to the ArkUI native animatable float render property. 89 * 90 * @since 20 91 */ 92 typedef struct ArkUI_FloatAnimatableProperty* ArkUI_FloatAnimatablePropertyHandle; 93 94 /** 95 * @brief Handle to the ArkUI native animatable vector2 render property. 96 * 97 * @since 20 98 */ 99 typedef struct ArkUI_Vector2AnimatableProperty* ArkUI_Vector2AnimatablePropertyHandle; 100 101 /** 102 * @brief Handle to the ArkUI native animatable color render property. 103 * 104 * @since 20 105 */ 106 typedef struct ArkUI_ColorAnimatableProperty* ArkUI_ColorAnimatablePropertyHandle; 107 108 /** 109 * @brief Rectangle shape option. 110 * 111 * @since 20 112 */ 113 typedef struct ArkUI_RectShape ArkUI_RectShapeOption; 114 115 /** 116 * @brief Node border style option. 117 * 118 * @since 20 119 */ 120 typedef struct ArkUI_NodeBorderStyle ArkUI_NodeBorderStyleOption; 121 122 /** 123 * @brief Node border width option. 124 * 125 * @since 20 126 */ 127 typedef struct ArkUI_NodeBorderWidth ArkUI_NodeBorderWidthOption; 128 129 /** 130 * @brief Node border color option. 131 * 132 * @since 20 133 */ 134 typedef struct ArkUI_NodeBorderColor ArkUI_NodeBorderColorOption; 135 136 /** 137 * @brief Node border radius option. 138 * 139 * @since 20 140 */ 141 typedef struct ArkUI_NodeBorderRadius ArkUI_NodeBorderRadiusOption; 142 143 /** 144 * @brief Circle shape option. 145 * 146 * @since 20 147 */ 148 typedef struct ArkUI_CircleShape ArkUI_CircleShapeOption; 149 150 /** 151 * @brief Round rect shape option. 152 * 153 * @since 20 154 */ 155 typedef struct ArkUI_RoundRectShape ArkUI_RoundRectShapeOption; 156 157 /** 158 * @brief Command path option. 159 * 160 * @since 20 161 */ 162 typedef struct ArkUI_CommandPath ArkUI_CommandPathOption; 163 164 /** 165 * @brief Render node mask option. 166 * 167 * @since 20 168 */ 169 typedef struct ArkUI_RenderNodeMaskOption ArkUI_RenderNodeMaskOption; 170 171 /** 172 * @brief Render node clip option. 173 * 174 * @since 20 175 */ 176 typedef struct ArkUI_RenderNodeClipOption ArkUI_RenderNodeClipOption; 177 178 /** 179 * @brief Adds a child render node to a parent node. 180 * 181 * @param node the target parent node. 182 * - Only customNode type parent nodes are supported. 183 * - Each customNode can mount only one ArkUI_RenderNodeHandle. 184 * - customNode cannot mount other ArkUI_NodeHandle. 185 * @param child the child RenderNode to add. 186 * @return Error code. 187 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 188 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 189 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 190 * {@link ARKUI_ERROR_CODE_NOT_CUSTOM_NODE} The node is not a customNode. 191 * {@link ARKUI_ERROR_CODE_CHILD_EXISTED} The node already has a child. 192 * {@link ARKUI_ERROR_CODE_RENDER_PARENT_EXISTED} The child already has a parent node. 193 * @since 20 194 */ 195 int32_t OH_ArkUI_RenderNodeUtils_AddRenderNode(ArkUI_NodeHandle node, ArkUI_RenderNodeHandle child); 196 197 /** 198 * @brief Remove the specified child node from its parent node. 199 * 200 * @param node the parent node. 201 * @param child the child RenderNode to remove. 202 * @return Error code. 203 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 204 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 205 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 206 * {@link ARKUI_ERROR_CODE_NOT_CUSTOM_NODE} The node is not a customNode. 207 * @since 20 208 */ 209 int32_t OH_ArkUI_RenderNodeUtils_RemoveRenderNode(ArkUI_NodeHandle node, ArkUI_RenderNodeHandle child); 210 211 /** 212 * @brief Clear all child render nodes from the specified parent node. 213 * 214 * @param node the target parent node. 215 * @return Error code. 216 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 217 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 218 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 219 * {@link ARKUI_ERROR_CODE_NOT_CUSTOM_NODE} The node is not a customNode. 220 * @since 20 221 */ 222 int32_t OH_ArkUI_RenderNodeUtils_ClearRenderNodeChildren(ArkUI_NodeHandle node); 223 224 /** 225 * @brief Mark dirty the node handle. Invalidate the specified node, causing its lifecycle and triggering a 226 * rerender of its child render nodes. 227 * 228 * @param node Target node. 229 * @return Error code. 230 * {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. 231 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 232 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. 233 * @since 20 234 */ 235 int32_t OH_ArkUI_RenderNodeUtils_Invalidate(ArkUI_NodeHandle node); 236 237 /** 238 * @brief Create a new RenderNode handle. 239 * 240 * @return ArkUI_RenderNodeHandle pointer to receive the new node handle. 241 * @since 20 242 */ 243 ArkUI_RenderNodeHandle OH_ArkUI_RenderNodeUtils_CreateNode(); 244 245 /** 246 * @brief Dispose a RenderNode handle. 247 * 248 * @param node Handle to the render node to dispose. 249 * @return Error code. 250 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 251 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 252 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 253 * @since 20 254 */ 255 int32_t OH_ArkUI_RenderNodeUtils_DisposeNode(ArkUI_RenderNodeHandle node); 256 257 /** 258 * @brief Add a child node to the specified RenderNode. 259 * 260 * @param node the parent RenderNode. 261 * @param child the child RenderNode to add. 262 * @return Error code. 263 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 264 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 265 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 266 * @since 20 267 */ 268 int32_t OH_ArkUI_RenderNodeUtils_AddChild(ArkUI_RenderNodeHandle node, ArkUI_RenderNodeHandle child); 269 270 /** 271 * @brief Insert a child node after the specified sibling node in RenderNode. 272 * 273 * @param node the parent RenderNode. 274 * @param child the child RenderNode to insert. 275 * @param sibling the reference sibling node. If the sibling node does not exist in the children, 276 * the child component will be added to the end. 277 * @return Error code. 278 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 279 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 280 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 281 * @since 20 282 */ 283 int32_t OH_ArkUI_RenderNodeUtils_InsertChildAfter( 284 ArkUI_RenderNodeHandle node, ArkUI_RenderNodeHandle child, ArkUI_RenderNodeHandle sibling); 285 286 /** 287 * @brief Remove a child node from the specified RenderNode. 288 * 289 * @param node the parent RenderNode. 290 * @param child the child RenderNode to remove. 291 * @return Error code. 292 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 293 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 294 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 295 * @since 20 296 */ 297 int32_t OH_ArkUI_RenderNodeUtils_RemoveChild(ArkUI_RenderNodeHandle node, ArkUI_RenderNodeHandle child); 298 299 /** 300 * @brief Clear all children from the specified RenderNode. 301 * 302 * @param node Handle to the target render node. 303 * @return Error code. 304 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 305 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 306 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 307 * @since 20 308 */ 309 int32_t OH_ArkUI_RenderNodeUtils_ClearChildren(ArkUI_RenderNodeHandle node); 310 311 /** 312 * @brief Get a child node at the specified index position. 313 * 314 * @param node the parent RenderNode. 315 * @param index Zero-based index of the child node. 316 * @param child ArkUI_RenderNodeHandle pointer to receive the child node. 317 * @return Error code. 318 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 319 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 320 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 321 * {@link ARKUI_ERROR_CODE_CHILD_RENDER_NOT_EXIST} The child does not exist. 322 * @since 20 323 */ 324 int32_t OH_ArkUI_RenderNodeUtils_GetChild(ArkUI_RenderNodeHandle node, int32_t index, ArkUI_RenderNodeHandle* child); 325 326 /** 327 * @brief Get the first child node of the specified RenderNode. 328 * 329 * @param node Handle to the target render node. 330 * @param child ArkUI_RenderNodeHandle pointer to receive the first child. 331 * @return Error code. 332 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 333 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 334 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 335 * {@link ARKUI_ERROR_CODE_CHILD_RENDER_NOT_EXIST} The child does not exist. 336 * @since 20 337 */ 338 int32_t OH_ArkUI_RenderNodeUtils_GetFirstChild(ArkUI_RenderNodeHandle node, ArkUI_RenderNodeHandle* child); 339 340 /** 341 * @brief Get the next sibling node of the specified node. 342 * 343 * @param node the reference node. 344 * @param sibling ArkUI_RenderNodeHandle pointer to receive the next sibling. 345 * @return Error code. 346 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 347 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 348 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 349 * {@link ARKUI_ERROR_CODE_CHILD_RENDER_NOT_EXIST} The child does not exist. 350 * @since 20 351 */ 352 int32_t OH_ArkUI_RenderNodeUtils_GetNextSibling(ArkUI_RenderNodeHandle node, ArkUI_RenderNodeHandle* sibling); 353 354 /** 355 * @brief Get the previous sibling node of the specified node. 356 * 357 * @param node the reference node. 358 * @param sibling ArkUI_RenderNodeHandle pointer to receive the previous sibling. 359 * @return Error code. 360 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 361 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 362 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 363 * {@link ARKUI_ERROR_CODE_CHILD_RENDER_NOT_EXIST} The child does not exist. 364 * @since 20 365 */ 366 int32_t OH_ArkUI_RenderNodeUtils_GetPreviousSibling(ArkUI_RenderNodeHandle node, ArkUI_RenderNodeHandle* sibling); 367 368 /** 369 * @brief Retrieve all child render nodes of a parent render node. 370 * This function populates a list of child render nodes for the specified parent node. 371 * The caller is responsible for freeing the allocated child node array. 372 * 373 * @param node Handle to the target parent render node. 374 * @param children Pointer to an array of child render node handles. 375 * @param count Pointer to store the number of child nodes retrieved. 376 * @return Error code. 377 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 378 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 379 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 380 * @since 20 381 */ 382 int32_t OH_ArkUI_RenderNodeUtils_GetChildren( 383 ArkUI_RenderNodeHandle node, ArkUI_RenderNodeHandle** children, int32_t* count); 384 385 /** 386 * @brief Retrieve render child nodes count of a render node. 387 * 388 * @param node Handle to the target parent render node. 389 * @param count Pointer to store the number of child nodes retrieved. 390 * @return Error code. 391 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 392 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 393 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 394 * @since 20 395 */ 396 int32_t OH_ArkUI_RenderNodeUtils_GetChildrenCount(ArkUI_RenderNodeHandle node, int32_t* count); 397 398 /** 399 * @brief Set the background color for a RenderNode. 400 * 401 * @param node Handle to the target render node 402 * @param color Packed ARGB color value (32-bit unsigned integer) 403 * Color byte layout: 404 * - Bits 24-31: Alpha channel (0x00 fully transparent, 0xFF fully opaque) 405 * - Bits 16-23: Red channel 406 * - Bits 8-15: Green channel 407 * - Bits 0-7: Blue channel 408 * @return Error code. 409 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 410 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 411 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 412 * @since 20 413 */ 414 int32_t OH_ArkUI_RenderNodeUtils_SetBackgroundColor(ArkUI_RenderNodeHandle node, uint32_t color); 415 416 /** 417 * @brief Get the background color of a RenderNode. 418 * 419 * @param node Handle to the target render node 420 * @param color Integer pointer to store the retrieved RGBA color value. 421 * The retrieved color is a packed 32-bit value with the following byte layout: 422 * - Bits 24-31: Alpha channel (0x00 fully transparent, 0xFF fully opaque) 423 * - Bits 16-23: Red channel 424 * - Bits 8-15: Green channel 425 * - Bits 0-7: Blue channel 426 * @return Error code. 427 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 428 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 429 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 430 * @since 20 431 */ 432 int32_t OH_ArkUI_RenderNodeUtils_GetBackgroundColor(ArkUI_RenderNodeHandle node, uint32_t* color); 433 434 /** 435 * @brief Set whether to clip content to the node's frame. 436 * 437 * @param node Handle to the target render node. 438 * @param clipToFrame Integer (1 = clip to frame, 0 = do not clip). 439 * @return Error code. 440 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 441 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 442 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 443 * {@link ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE} Parameter out of range. 444 * @since 20 445 */ 446 int32_t OH_ArkUI_RenderNodeUtils_SetClipToFrame(ArkUI_RenderNodeHandle node, int32_t clipToFrame); 447 448 /** 449 * @brief Get the clip-to-frame status of a RenderNode. 450 * 451 * @param node Handle to the target render node. 452 * @param clipToFrame Integer pointer to receive clip status (1 or 0). 453 * @return Error code. 454 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 455 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 456 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 457 * @since 20 458 */ 459 int32_t OH_ArkUI_RenderNodeUtils_GetClipToFrame(ArkUI_RenderNodeHandle node, int32_t* clipToFrame); 460 461 /** 462 * @brief Set whether to clip content to the node's Bounds. 463 * 464 * @param node Handle to the target render node. 465 * @param clipToBounds Clipping flag (1: clip to bounds, 0: do not clip) 466 * @return Error code. 467 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 468 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 469 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 470 * {@link ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE} Parameter out of range. 471 * @since 20 472 */ 473 int32_t OH_ArkUI_RenderNodeUtils_SetClipToBounds(ArkUI_RenderNodeHandle node, int32_t clipToBounds); 474 475 /** 476 * @brief Get whether to clip content to the node's Bounds. 477 * 478 * @param node Handle to the target render node. 479 * @param clipToBounds Integer pointer (1 = clip to bounds, 0 = do not clip). 480 * @return Error code. 481 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 482 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 483 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 484 * @since 20 485 */ 486 int32_t OH_ArkUI_RenderNodeUtils_GetClipToBounds(ArkUI_RenderNodeHandle node, int32_t* clipToBounds); 487 488 /** 489 * @brief Set the opacity value for a RenderNode. 490 * 491 * @param node Handle to the target render node. 492 * @param opacity Opacity value (0.0-1.0). 493 * @return Error code. 494 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 495 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 496 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 497 * {@link ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE} Parameter out of range. 498 * @since 20 499 */ 500 int32_t OH_ArkUI_RenderNodeUtils_SetOpacity(ArkUI_RenderNodeHandle node, float opacity); 501 502 /** 503 * @brief Get the opacity value of a RenderNode. 504 * 505 * @param node Handle to the target render node. 506 * @param opacity Pointer to receive opacity value (0.0-1.0). 507 * @return Error code. 508 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 509 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 510 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 511 * @since 20 512 */ 513 int32_t OH_ArkUI_RenderNodeUtils_GetOpacity(ArkUI_RenderNodeHandle node, float* opacity); 514 515 /** 516 * @brief Set the dimensions for a RenderNode. 517 * 518 * @param node Handle to the target render node. 519 * @param width Width value in pixels. 520 * @param height Height value in pixels. 521 * @return Error code. 522 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 523 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 524 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 525 * {@link ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE} Parameter out of range. 526 * @since 20 527 */ 528 int32_t OH_ArkUI_RenderNodeUtils_SetSize(ArkUI_RenderNodeHandle node, int32_t width, int32_t height); 529 530 /** 531 * @brief Get the dimensions of a RenderNode. 532 * 533 * @param node Handle to the target render node. 534 * @param width Pointer to receive width value in pixels. 535 * @param height Pointer to receive height value in pixels. 536 * @return Error code. 537 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 538 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 539 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 540 * @since 20 541 */ 542 int32_t OH_ArkUI_RenderNodeUtils_GetSize(ArkUI_RenderNodeHandle node, int32_t* width, int32_t* height); 543 544 /** 545 * @brief Set the position coordinates for a RenderNode. 546 * 547 * @param node Handle to the target render node. 548 * @param x X-coordinate value in pixels. 549 * @param y Y-coordinate value in pixels. 550 * @return Error code. 551 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 552 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 553 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 554 * @since 20 555 */ 556 int32_t OH_ArkUI_RenderNodeUtils_SetPosition(ArkUI_RenderNodeHandle node, int32_t x, int32_t y); 557 558 /** 559 * @brief Get the position coordinates of a RenderNode. 560 * 561 * @param node Handle to the target render node. 562 * @param x Pointer to receive X-coordinate value in pixels. 563 * @param y Pointer to receive Y-coordinate value in pixels. 564 * @return Error code. 565 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 566 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 567 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 568 * @since 20 569 */ 570 int32_t OH_ArkUI_RenderNodeUtils_GetPosition(ArkUI_RenderNodeHandle node, int32_t* x, int32_t* y); 571 572 /** 573 * @brief Set the pivot point for transformations of a RenderNode. 574 * 575 * @param node Handle to the target render node. 576 * @param x The X-coordinate of pivot (normalized 0.0-1.0). 577 * @param y The Y-coordinate of pivot (normalized 0.0-1.0). 578 * @return Error code. 579 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 580 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 581 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 582 * @since 20 583 */ 584 int32_t OH_ArkUI_RenderNodeUtils_SetPivot(ArkUI_RenderNodeHandle node, float x, float y); 585 586 /** 587 * @brief Get the pivot point coordinates of a RenderNode. 588 * 589 * @param node Handle to the target render node. 590 * @param x Pointer to receive the X-coordinate of pivot. 591 * @param y Pointer to receive the Y-coordinate of pivot. 592 * @return Error code. 593 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 594 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 595 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 596 * @since 20 597 */ 598 int32_t OH_ArkUI_RenderNodeUtils_GetPivot(ArkUI_RenderNodeHandle node, float* x, float* y); 599 600 /** 601 * @brief Set the scaling factors for a RenderNode. 602 * 603 * @param node Handle to the target render node. 604 * @param x Horizontal scale factor. 605 * @param y Vertical scale factor. 606 * @return Error code. 607 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 608 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 609 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 610 * @since 20 611 */ 612 int32_t OH_ArkUI_RenderNodeUtils_SetScale(ArkUI_RenderNodeHandle node, float x, float y); 613 614 /** 615 * @brief Get the scaling factors of a RenderNode. 616 * 617 * @param node Handle to the target render node. 618 * @param x Pointer to receive horizontal scale factor. 619 * @param y Pointer to receive vertical scale factor. 620 * @return Error code. 621 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 622 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 623 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 624 * @since 20 625 */ 626 int32_t OH_ArkUI_RenderNodeUtils_GetScale(ArkUI_RenderNodeHandle node, float* x, float* y); 627 628 /** 629 * @brief Set the translation offset for a RenderNode. 630 * 631 * @param node Handle to the target render node. 632 * @param x Horizontal translation in pixels. 633 * @param y Vertical translation in pixels. 634 * @return Error code. 635 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 636 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 637 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 638 * @since 20 639 */ 640 int32_t OH_ArkUI_RenderNodeUtils_SetTranslation(ArkUI_RenderNodeHandle node, float x, float y); 641 642 /** 643 * @brief Get the translation offset of a RenderNode. 644 * 645 * @param node Handle to the target render node. 646 * @param x Pointer to receive horizontal translation. 647 * @param y Pointer to receive vertical translation. 648 * @return Error code. 649 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 650 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 651 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 652 * @since 20 653 */ 654 int32_t OH_ArkUI_RenderNodeUtils_GetTranslation(ArkUI_RenderNodeHandle node, float* x, float* y); 655 656 /** 657 * @brief Set the rotation angles for a RenderNode. 658 * 659 * @param node Handle to the target render node. 660 * @param x Rotation angle around X-axis in degrees. 661 * @param y Rotation angle around Y-axis in degrees. 662 * @param z Rotation angle around Z-axis in degrees. 663 * @return Error code. 664 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 665 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 666 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 667 * @since 20 668 */ 669 int32_t OH_ArkUI_RenderNodeUtils_SetRotation(ArkUI_RenderNodeHandle node, float x, float y, float z); 670 671 /** 672 * @brief Get the rotation angles of a RenderNode. 673 * 674 * @param node Handle to the target render node. 675 * @param x Pointer to receive X-axis rotation angle in degrees. 676 * @param y Pointer to receive Y-axis rotation angle in degrees. 677 * @param z Pointer to receive Z-axis rotation angle in degrees. 678 * @return Error code. 679 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 680 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 681 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 682 * @since 20 683 */ 684 int32_t OH_ArkUI_RenderNodeUtils_GetRotation(ArkUI_RenderNodeHandle node, float* x, float* y, float* z); 685 686 /** 687 * @brief Set the transformation matrix for a RenderNode. 688 * 689 * @param node Handle to the target render node. 690 * @param matrix Pointer to a 4x4 transformation matrix (16 consecutive values). 691 * The transformation matrix should be provided as 16 consecutive floating-point values in row-major order: 692 * [m00, m01, m02, m03, 693 * m10, m11, m12, m13, 694 * m20, m21, m22, m23, 695 * m30, m31, m32, m33] 696 * Where the matrix represents: 697 * | m00 m01 m02 m03 | 698 * | m10 m11 m12 m13 | 699 * | m20 m21 m22 m23 | 700 * | m30 m31 m32 m33 | 701 * Matrix components: 702 * | m00 | Scaling value of the x-axis. The default value is **1** for the identity matrix. | 703 * | m01 | The second value, which is affected by the rotation or tilt of the x, y, and z axes. | 704 * | m02 | The third value, which is affected by the rotation of the x, y, and z axes. | 705 * | m03 | The fourth value, which is affected by perspective projection. | 706 * | m10 | The fifth value, which is affected by the rotation or tilt of the x, y, and z axes. | 707 * | m11 | Scaling value of the y-axis. The default value is **1** for the identity matrix. | 708 * | m12 | The seventh value, which is affected by the rotation of the x, y, and z axes. | 709 * | m13 | The eighth value, which is affected by perspective projection. | 710 * | m20 | The ninth value, which is affected by the rotation of the x, y, and z axes. | 711 * | m21 | The tenth value, which is affected by the rotation of the x, y, and z axes. | 712 * | m22 | Scaling value of the z-axis. The default value is **1** for the identity matrix. | 713 * | m23 | The 12th value, which is affected by perspective projection. | 714 * | m30 | Translation value of the x-axis, in px. The default value is **0** for the identity matrix.| 715 * | m31 | Translation value of the y-axis, in px. The default value is **0** for the identity matrix.| 716 * | m32 | Translation value of the z-axis, in px. The default value is **0** for the identity matrix.| 717 * | m33 | Valid in homogeneous coordinates, presenting the perspective projection effect. | 718 * @return Error code. 719 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 720 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 721 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 722 * {@link ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE} Parameter out of range. 723 * @since 20 724 */ 725 int32_t OH_ArkUI_RenderNodeUtils_SetTransform(ArkUI_RenderNodeHandle node, float* matrix); 726 727 /** 728 * @brief Set the shadow color for a RenderNode. 729 * 730 * @param node Handle to the target render node. 731 * @param color Packed ARGB color value (32-bit unsigned integer) 732 * Color byte layout: 733 * - Bits 24-31: Alpha channel (0x00 fully transparent, 0xFF fully opaque) 734 * - Bits 16-23: Red channel 735 * - Bits 8-15: Green channel 736 * - Bits 0-7: Blue channel 737 * @return Error code. 738 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 739 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 740 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 741 * @since 20 742 */ 743 int32_t OH_ArkUI_RenderNodeUtils_SetShadowColor(ArkUI_RenderNodeHandle node, uint32_t color); 744 745 /** 746 * @brief Get the shadow color of a RenderNode. 747 * 748 * @param node Handle to the target render node. 749 * @param color Integer pointer to store the retrieved RGBA color value. 750 * The retrieved color is a packed 32-bit value with the following byte layout: 751 * - Bits 24-31: Alpha channel (0x00 fully transparent, 0xFF fully opaque) 752 * - Bits 16-23: Red channel 753 * - Bits 8-15: Green channel 754 * - Bits 0-7: Blue channel 755 * @return Error code. 756 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 757 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 758 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 759 * @since 20 760 */ 761 int32_t OH_ArkUI_RenderNodeUtils_GetShadowColor(ArkUI_RenderNodeHandle node, uint32_t* color); 762 763 /** 764 * @brief Set the shadow offset for a RenderNode. 765 * 766 * @param node Handle to the target render node. 767 * @param x Horizontal offset value in pixels. 768 * @param y Vertical offset value in pixels. 769 * @return Error code. 770 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 771 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 772 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 773 * @since 20 774 */ 775 int32_t OH_ArkUI_RenderNodeUtils_SetShadowOffset(ArkUI_RenderNodeHandle node, int32_t x, int32_t y); 776 777 /** 778 * @brief Get the shadow offset of a RenderNode. 779 * 780 * @param node Handle to the target render node. 781 * @param x Pointer to receive horizontal offset value. 782 * @param y Pointer to receive vertical offset value. 783 * @return Error code. 784 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 785 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 786 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 787 * @since 20 788 */ 789 int32_t OH_ArkUI_RenderNodeUtils_GetShadowOffset(ArkUI_RenderNodeHandle node, int32_t* x, int32_t* y); 790 791 /** 792 * @brief Set the shadow transparency for a RenderNode. 793 * 794 * @param node Handle to the target render node. 795 * @param alpha Shadow alpha value (0.0-1.0). 796 * @return Error code. 797 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 798 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 799 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 800 * {@link ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE} Parameter out of range. 801 * @since 20 802 */ 803 int32_t OH_ArkUI_RenderNodeUtils_SetShadowAlpha(ArkUI_RenderNodeHandle node, float alpha); 804 805 /** 806 * @brief Get the shadow transparency of a RenderNode. 807 * 808 * @param node Handle to the target render node. 809 * @param alpha Pointer to receive shadow alpha value. 810 * @return Error code. 811 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 812 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 813 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 814 * @since 20 815 */ 816 int32_t OH_ArkUI_RenderNodeUtils_GetShadowAlpha(ArkUI_RenderNodeHandle node, float* alpha); 817 818 /** 819 * @brief Set the shadow elevation for a RenderNode. 820 * 821 * @param node Handle to the target render node. 822 * @param elevation Elevation value. 823 * @return Error code. 824 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 825 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 826 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 827 * {@link ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE} Parameter out of range. 828 * @since 20 829 */ 830 int32_t OH_ArkUI_RenderNodeUtils_SetShadowElevation(ArkUI_RenderNodeHandle node, float elevation); 831 832 /** 833 * @brief Get the shadow elevation of a RenderNode. 834 * 835 * @param node Handle to the target render node. 836 * @param elevation Pointer to receive elevation value. 837 * @return Error code. 838 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 839 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 840 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 841 * @since 20 842 */ 843 int32_t OH_ArkUI_RenderNodeUtils_GetShadowElevation(ArkUI_RenderNodeHandle node, float* elevation); 844 845 /** 846 * @brief Set the shadow radius of a RenderNode. 847 * 848 * @param node Handle to the target render node. 849 * @param radius Radius value. 850 * @return Error code. 851 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 852 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 853 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 854 * {@link ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE} Parameter out of range. 855 * @since 20 856 */ 857 int32_t OH_ArkUI_RenderNodeUtils_SetShadowRadius(ArkUI_RenderNodeHandle node, float radius); 858 859 /** 860 * @brief Get the shadow radius of a RenderNode. 861 * 862 * @param node Handle to the target render node. 863 * @param radius Pointer to receive radius value. 864 * @return Error code. 865 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 866 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 867 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 868 * @since 20 869 */ 870 int32_t OH_ArkUI_RenderNodeUtils_GetShadowRadius(ArkUI_RenderNodeHandle node, float* radius); 871 872 /** 873 * @brief Set the border style for a RenderNode. 874 * 875 * @param node Handle to the target render node. 876 * @param borderStyle Handle to border style option. 877 * @return Error code. 878 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 879 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 880 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 881 * @since 20 882 */ 883 int32_t OH_ArkUI_RenderNodeUtils_SetBorderStyle(ArkUI_RenderNodeHandle node, ArkUI_NodeBorderStyleOption* borderStyle); 884 885 /** 886 * @brief Get the border style of a RenderNode. 887 * 888 * @param node Handle to the target render node. 889 * @param borderStyle Pointer to receive border style option. 890 * @return Error code. 891 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 892 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 893 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 894 * @since 20 895 */ 896 int32_t OH_ArkUI_RenderNodeUtils_GetBorderStyle(ArkUI_RenderNodeHandle node, ArkUI_NodeBorderStyleOption** borderStyle); 897 898 /** 899 * @brief Set the border widths for a RenderNode. 900 * 901 * @param node Handle to the target render node. 902 * @param borderWidth Handle to border width option. 903 * @return Error code. 904 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 905 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 906 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 907 * @since 20 908 */ 909 int32_t OH_ArkUI_RenderNodeUtils_SetBorderWidth(ArkUI_RenderNodeHandle node, ArkUI_NodeBorderWidthOption* borderWidth); 910 911 /** 912 * @brief Get the border widths of a RenderNode. 913 * 914 * @param node Handle to the target render node. 915 * @param borderWidth Pointer to receive border width option. 916 * @return Error code. 917 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 918 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 919 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 920 * @since 20 921 */ 922 int32_t OH_ArkUI_RenderNodeUtils_GetBorderWidth(ArkUI_RenderNodeHandle node, ArkUI_NodeBorderWidthOption** borderWidth); 923 924 /** 925 * @brief Set the border colors for a RenderNode. 926 * 927 * @param node Handle to the target render node. 928 * @param borderColor Handle to border color option. 929 * @return Error code. 930 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 931 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 932 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 933 * @since 20 934 */ 935 int32_t OH_ArkUI_RenderNodeUtils_SetBorderColor(ArkUI_RenderNodeHandle node, ArkUI_NodeBorderColorOption* borderColor); 936 937 /** 938 * @brief Get the border colors of a RenderNode. 939 * 940 * @param node Handle to the target render node. 941 * @param borderColor Pointer to receive border color option. 942 * @return Error code. 943 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 944 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 945 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 946 * @since 20 947 */ 948 int32_t OH_ArkUI_RenderNodeUtils_GetBorderColor(ArkUI_RenderNodeHandle node, ArkUI_NodeBorderColorOption** borderColor); 949 950 /** 951 * @brief Set the border corner radius for a RenderNode. 952 * 953 * @param node Handle to the target render node. 954 * @param borderRadius Handle to border radius option. 955 * @r eturn Error code. 956 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 957 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 958 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 959 * @since 20 960 */ 961 int32_t OH_ArkUI_RenderNodeUtils_SetBorderRadius( 962 ArkUI_RenderNodeHandle node, ArkUI_NodeBorderRadiusOption* borderRadius); 963 964 /** 965 * @brief Get the border corner radius of a RenderNode. 966 * 967 * @param node Handle to the target render node. 968 * @param borderRadius Pointer to receive border radius option. 969 * @return Error code. 970 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 971 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 972 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 973 * @since 20 974 */ 975 int32_t OH_ArkUI_RenderNodeUtils_GetBorderRadius( 976 ArkUI_RenderNodeHandle node, ArkUI_NodeBorderRadiusOption** borderRadius); 977 978 /** 979 * @brief Apply a mask to a render node using the mask option. 980 * 981 * @param node Handle to the target render node. 982 * @param mask Handle to the mask option. 983 * @return Error code. 984 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 985 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 986 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 987 * @since 20 988 */ 989 int32_t OH_ArkUI_RenderNodeUtils_SetMask(ArkUI_RenderNodeHandle node, ArkUI_RenderNodeMaskOption* mask); 990 991 /** 992 * @brief Apply a clip to a render node using the clip option. 993 * 994 * @param node Handle to the target render node. 995 * @param clip Handle to the clip option. 996 * @return Error code. 997 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 998 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 999 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1000 * @since 20 1001 */ 1002 int32_t OH_ArkUI_RenderNodeUtils_SetClip(ArkUI_RenderNodeHandle node, ArkUI_RenderNodeClipOption* clip); 1003 1004 /** 1005 * @brief Mark whether to preferentially draw the node and its children. 1006 * 1007 * @param node Handle to the target render node. 1008 * @param markNodeGroup Boolean flag indicates whether to preferentially draw the node and its children. 1009 * @return Error code. 1010 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1011 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1012 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1013 * @since 20 1014 */ 1015 int32_t OH_ArkUI_RenderNodeUtils_SetMarkNodeGroup(ArkUI_RenderNodeHandle node, bool markNodeGroup); 1016 1017 /** 1018 * @brief Set the bounds for a RenderNode. 1019 * 1020 * @param node Handle to the target render node. 1021 * @param x X-coordinate of the bounds's top-left corner (in pixels) 1022 * @param y Y-coordinate of the bounds's top-left corner (in pixels) 1023 * @param width Width of the bounds (in pixels). 1024 * @param height Height of the bounds (in pixels). 1025 * @return Error code. 1026 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1027 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1028 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1029 * {@link ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE} Parameter out of range. 1030 * @since 20 1031 */ 1032 int32_t OH_ArkUI_RenderNodeUtils_SetBounds( 1033 ArkUI_RenderNodeHandle node, int32_t x, int32_t y, int32_t width, int32_t height); 1034 1035 /** 1036 * @brief Get the bounds for a RenderNode. 1037 * 1038 * @param node Handle to the target render node. 1039 * @param x Pointer to receive x-coordinate value of the bounds's top-left corner (in pixels) 1040 * @param y Pointer to receive y-coordinate value of the bounds's top-left corner (in pixels) 1041 * @param width Pointer to receive width value in pixels. 1042 * @param height Pointer to receive height value in pixels. 1043 * @return Error code. 1044 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1045 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1046 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1047 * @since 20 1048 */ 1049 int32_t OH_ArkUI_RenderNodeUtils_GetBounds( 1050 ArkUI_RenderNodeHandle node, int32_t* x, int32_t* y, int32_t* width, int32_t* height); 1051 1052 /** 1053 * @brief Set the draw region for a RenderNode. 1054 * 1055 * @param node Handle to the target render node. 1056 * @param x X-coordinate of the bounds's top-left corner (in pixels). 1057 * @param y Y-coordinate of the bounds's top-left corner (in pixels). 1058 * @param w Width of the bounds (in pixels). 1059 * @param h Height of the bounds (in pixels). 1060 * @return Error code. 1061 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1062 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1063 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1064 * @since 20 1065 */ 1066 int32_t OH_ArkUI_RenderNodeUtils_SetDrawRegion(ArkUI_RenderNodeHandle node, float x, float y, float w, float h); 1067 1068 /** 1069 * @brief Attach a content modifier for the render node. 1070 * 1071 * @param node Handle to the target render node. 1072 * @param modifier {@link ArkUI_RenderContentModifierHandle} The content modifier handle. 1073 * @return Error code. 1074 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1075 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1076 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1077 * @since 20 1078 */ 1079 int32_t OH_ArkUI_RenderNodeUtils_AttachContentModifier( 1080 ArkUI_RenderNodeHandle node, ArkUI_RenderContentModifierHandle modifier); 1081 1082 /** 1083 * @brief Create a content modifier handle. 1084 * 1085 * @return Error code. 1086 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1087 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1088 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1089 * @since 20 1090 */ 1091 ArkUI_RenderContentModifierHandle OH_ArkUI_RenderNodeUtils_CreateContentModifier(); 1092 1093 /** 1094 * @brief Dispose the content modifier handle. 1095 * 1096 * @param modifier {@link ArkUI_RenderContentModifierHandle} Handle to the content modifier. 1097 * @since 20 1098 */ 1099 void OH_ArkUI_RenderNodeUtils_DisposeContentModifier(ArkUI_RenderContentModifierHandle modifier); 1100 1101 /** 1102 * @brief Attach a float property to the target content modifier. 1103 * 1104 * @param modifier {@link ArkUI_RenderContentModifierHandle} Set float property to the target content modifier. 1105 * @param property {@link ArkUI_FloatPropertyHandle} Handle to the float property. 1106 * @return Error code. 1107 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1108 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1109 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1110 * @since 20 1111 */ 1112 int32_t OH_ArkUI_RenderNodeUtils_AttachFloatProperty( 1113 ArkUI_RenderContentModifierHandle modifier, ArkUI_FloatPropertyHandle property); 1114 1115 /** 1116 * @brief Attach a vector2 property to the target content modifier. 1117 * 1118 * @param modifier {@link ArkUI_RenderContentModifierHandle} Set vector2 property to the target content modifier. 1119 * @param property {@link ArkUI_Vector2PropertyHandle} Handle to the vector2 property. 1120 * @return Error code. 1121 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1122 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1123 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1124 * @since 20 1125 */ 1126 int32_t OH_ArkUI_RenderNodeUtils_AttachVector2Property( 1127 ArkUI_RenderContentModifierHandle modifier, ArkUI_Vector2PropertyHandle property); 1128 1129 /** 1130 * @brief Attach a color property to the target content modifier. 1131 * 1132 * @param modifier {@link ArkUI_RenderContentModifierHandle} Set color property to the target content modifier. 1133 * @param property {@link ArkUI_ColorPropertyHandle} Handle to the color property. 1134 * @return Error code. 1135 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1136 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1137 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1138 * @since 20 1139 */ 1140 int32_t OH_ArkUI_RenderNodeUtils_AttachColorProperty( 1141 ArkUI_RenderContentModifierHandle modifier, ArkUI_ColorPropertyHandle property); 1142 1143 /** 1144 * @brief Attach a float animatable property to the target content modifier. 1145 * 1146 * @param modifier {@link ArkUI_RenderContentModifierHandle} Set float animatable property to the target content 1147 * modifier. 1148 * @param property {@link ArkUI_FloatAnimatablePropertyHandle} Handle to the float animatable property. 1149 * @return Error code. 1150 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1151 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1152 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1153 * @since 20 1154 */ 1155 int32_t OH_ArkUI_RenderNodeUtils_AttachFloatAnimatableProperty( 1156 ArkUI_RenderContentModifierHandle modifier, ArkUI_FloatAnimatablePropertyHandle property); 1157 1158 /** 1159 * @brief Attach a vector2 animatable property to the target content modifier. 1160 * 1161 * @param modifier {@link ArkUI_RenderContentModifierHandle} Set vector2 animatable property to the target content 1162 * modifier. 1163 * @param property {@link ArkUI_Vector2AnimatablePropertyHandle} Handle to the vector2 animatable property. 1164 * @return Error code. 1165 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1166 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1167 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1168 * @since 20 1169 */ 1170 int32_t OH_ArkUI_RenderNodeUtils_AttachVector2AnimatableProperty( 1171 ArkUI_RenderContentModifierHandle modifier, ArkUI_Vector2AnimatablePropertyHandle property); 1172 1173 /** 1174 * @brief Attach a color property to the target content modifier. 1175 * 1176 * @param modifier {@link ArkUI_RenderContentModifierHandle} Set color animatable property to the target content 1177 * modifier. 1178 * @param property {@link ArkUI_ColorAnimatablePropertyHandle} Handle to the color animatable property. 1179 * @return Error code. 1180 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1181 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1182 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1183 * @since 20 1184 */ 1185 int32_t OH_ArkUI_RenderNodeUtils_AttachColorAnimatableProperty( 1186 ArkUI_RenderContentModifierHandle modifier, ArkUI_ColorAnimatablePropertyHandle property); 1187 1188 /** 1189 * @brief Create a float property handle. 1190 * 1191 * @param value The property value. 1192 * @return Handle to the float property. 1193 * @since 20 1194 */ 1195 ArkUI_FloatPropertyHandle OH_ArkUI_RenderNodeUtils_CreateFloatProperty(float value); 1196 1197 /** 1198 * @brief Set value of the float property. 1199 * 1200 * @param property {@link ArkUI_FloatPropertyHandle} The float property handle. 1201 * @param value The property value. 1202 * @return Error code. 1203 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1204 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1205 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1206 * @since 20 1207 */ 1208 int32_t OH_ArkUI_RenderNodeUtils_SetFloatPropertyValue(ArkUI_FloatPropertyHandle property, float value); 1209 1210 /** 1211 * @brief Get value of the float property. 1212 * 1213 * @param property {@link ArkUI_FloatPropertyHandle} The float property handle. 1214 * @param value The pointer to receive property value. 1215 * @return Error code. 1216 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1217 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1218 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1219 * @since 20 1220 */ 1221 int32_t OH_ArkUI_RenderNodeUtils_GetFloatPropertyValue(ArkUI_FloatPropertyHandle property, float* value); 1222 1223 /** 1224 * @brief Dispose the float property handle. 1225 * 1226 * @param property {@link ArkUI_FloatPropertyHandle} Handle to the float property. 1227 * @since 20 1228 */ 1229 void OH_ArkUI_RenderNodeUtils_DisposeFloatProperty(ArkUI_FloatPropertyHandle property); 1230 1231 /** 1232 * @brief Create a vector2 property handle. 1233 * 1234 * @param x X-coordinate value of the property. 1235 * @param y Y-coordinate value of the property. 1236 * @return Handle to the vector2 property. 1237 * @since 20 1238 */ 1239 ArkUI_Vector2PropertyHandle OH_ArkUI_RenderNodeUtils_CreateVector2Property(float x, float y); 1240 1241 /** 1242 * @brief Set value of the vector2 property. 1243 * 1244 * @param property {@link ArkUI_Vector2PropertyHandle} The vector2 property handle. 1245 * @param x X-coordinate value of the property. 1246 * @param y Y-coordinate value of the property. 1247 * @return Error code. 1248 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1249 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1250 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1251 * @since 20 1252 */ 1253 int32_t OH_ArkUI_RenderNodeUtils_SetVector2PropertyValue(ArkUI_Vector2PropertyHandle property, float x, float y); 1254 1255 /** 1256 * @brief Get value of the vector2 property. 1257 * 1258 * @param property {@link ArkUI_Vector2PropertyHandle} The Vector2 property handle. 1259 * @param x The pointer to receive x-coordinate value of the property. 1260 * @param y The pointer to receive y-coordinate value of the property. 1261 * @return Error code. 1262 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1263 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1264 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1265 * @since 20 1266 */ 1267 int32_t OH_ArkUI_RenderNodeUtils_GetVector2PropertyValue(ArkUI_Vector2PropertyHandle property, float* x, float* y); 1268 1269 /** 1270 * @brief Dispose the vector2 property handle. 1271 * 1272 * @param property {@link ArkUI_Vector2PropertyHandle} Handle to the vector2 property. 1273 * @since 20 1274 */ 1275 void OH_ArkUI_RenderNodeUtils_DisposeVector2Property(ArkUI_Vector2PropertyHandle property); 1276 1277 /** 1278 * @brief Create a color property handle. 1279 * 1280 * @param value The property value. 1281 * @return Handle to the color property. 1282 * @since 20 1283 */ 1284 ArkUI_ColorPropertyHandle OH_ArkUI_RenderNodeUtils_CreateColorProperty(uint32_t value); 1285 1286 /** 1287 * @brief Set value of the color property. 1288 * 1289 * @param property {@link ArkUI_ColorPropertyHandle} The color property handle. 1290 * @param value The property value. 1291 * @return Error code. 1292 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1293 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1294 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1295 * @since 20 1296 */ 1297 int32_t OH_ArkUI_RenderNodeUtils_SetColorPropertyValue(ArkUI_ColorPropertyHandle property, uint32_t value); 1298 1299 /** 1300 * @brief Get value of the color property. 1301 * 1302 * @param property {@link ArkUI_ColorPropertyHandle} The color property handle. 1303 * @param value The pointer to receive property value. 1304 * @return Error code. 1305 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1306 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1307 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1308 * @since 20 1309 */ 1310 int32_t OH_ArkUI_RenderNodeUtils_GetColorPropertyValue(ArkUI_ColorPropertyHandle property, uint32_t* value); 1311 1312 /** 1313 * @brief Dispose the color property handle. 1314 * 1315 * @param property {@link ArkUI_ColorPropertyHandle} Handle to the color property. 1316 * @since 20 1317 */ 1318 void OH_ArkUI_RenderNodeUtils_DisposeColorProperty(ArkUI_ColorPropertyHandle property); 1319 1320 /** 1321 * @brief Create a float animatable property handle. 1322 * 1323 * @param value The property value. 1324 * @return Handle to the float animatable property. 1325 * @since 20 1326 */ 1327 ArkUI_FloatAnimatablePropertyHandle OH_ArkUI_RenderNodeUtils_CreateFloatAnimatableProperty(float value); 1328 1329 /** 1330 * @brief Set value of the float animatable property. 1331 * 1332 * @param property {@link ArkUI_FloatAnimatablePropertyHandle} The float animatable property handle. 1333 * @param value The property value. 1334 * @return Error code. 1335 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1336 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1337 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1338 * @since 20 1339 */ 1340 int32_t OH_ArkUI_RenderNodeUtils_SetFloatAnimatablePropertyValue( 1341 ArkUI_FloatAnimatablePropertyHandle property, float value); 1342 1343 /** 1344 * @brief Get value of the float animatable property. 1345 * 1346 * @param property {@link ArkUI_FloatAnimatablePropertyHandle} The float animatable property handle. 1347 * @param value The pointer to receive property value. 1348 * @return Error code. 1349 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1350 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1351 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1352 * @since 20 1353 */ 1354 int32_t OH_ArkUI_RenderNodeUtils_GetFloatAnimatablePropertyValue( 1355 ArkUI_FloatAnimatablePropertyHandle property, float* value); 1356 1357 /** 1358 * @brief Dispose the float animatable property handle. 1359 * 1360 * @param property {@link ArkUI_FloatAnimatablePropertyHandle} Handle to the float animatable property. 1361 * @since 20 1362 */ 1363 void OH_ArkUI_RenderNodeUtils_DisposeFloatAnimatableProperty(ArkUI_FloatAnimatablePropertyHandle property); 1364 1365 /** 1366 * @brief Create a vector2 animatable property handle. 1367 * 1368 * @param x X-coordinate value of the property. 1369 * @param y Y-coordinate value of the property. 1370 * @return Handle to the vector2 animatable property. 1371 * @since 20 1372 */ 1373 ArkUI_Vector2AnimatablePropertyHandle OH_ArkUI_RenderNodeUtils_CreateVector2AnimatableProperty(float x, float y); 1374 1375 /** 1376 * @brief Set value of the vector2 animatable property. 1377 * 1378 * @param property {@link ArkUI_Vector2AnimatablePropertyHandle} The vector2 animatable property handle. 1379 * @param x X-coordinate value of the property. 1380 * @param y Y-coordinate value of the property. 1381 * @return Error code. 1382 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1383 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1384 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1385 * @since 20 1386 */ 1387 int32_t OH_ArkUI_RenderNodeUtils_SetVector2AnimatablePropertyValue( 1388 ArkUI_Vector2AnimatablePropertyHandle property, float x, float y); 1389 1390 /** 1391 * @brief Get value of the vector2 animatable property. 1392 * 1393 * @param property {@link ArkUI_Vector2AnimatablePropertyHandle} The Vector2 animatable property handle. 1394 * @param x The pointer to receive x-coordinate value of the property. 1395 * @param y The pointer to receive y-coordinate value of the property. 1396 * @return Error code. 1397 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1398 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1399 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1400 * @since 20 1401 */ 1402 int32_t OH_ArkUI_RenderNodeUtils_GetVector2AnimatablePropertyValue( 1403 ArkUI_Vector2AnimatablePropertyHandle property, float* x, float* y); 1404 1405 /** 1406 * @brief Dispose the vector2 animatable property handle. 1407 * 1408 * @param property {@link ArkUI_Vector2AnimatablePropertyHandle} Handle to the vector2 animatable property. 1409 * @since 20 1410 */ 1411 void OH_ArkUI_RenderNodeUtils_DisposeVector2AnimatableProperty(ArkUI_Vector2AnimatablePropertyHandle property); 1412 1413 /** 1414 * @brief Create a color animatable property handle. 1415 * 1416 * @param value The property value. 1417 * @return Handle to the color animatable property. 1418 * @since 20 1419 */ 1420 ArkUI_ColorAnimatablePropertyHandle OH_ArkUI_RenderNodeUtils_CreateColorAnimatableProperty(uint32_t value); 1421 1422 /** 1423 * @brief Set value of the color animatable property. 1424 * 1425 * @param property {@link ArkUI_ColorAnimatablePropertyHandle} The color animatable property handle. 1426 * @param value The property value. 1427 * @return Error code. 1428 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1429 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1430 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1431 * @since 20 1432 */ 1433 int32_t OH_ArkUI_RenderNodeUtils_SetColorAnimatablePropertyValue( 1434 ArkUI_ColorAnimatablePropertyHandle property, uint32_t value); 1435 1436 /** 1437 * @brief Get value of the color animatable property. 1438 * 1439 * @param property {@link ArkUI_ColorAnimatablePropertyHandle} The color animatable property handle. 1440 * @param value The pointer to receive property value. 1441 * @return Error code. 1442 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1443 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1444 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1445 * @since 20 1446 */ 1447 int32_t OH_ArkUI_RenderNodeUtils_GetColorAnimatablePropertyValue( 1448 ArkUI_ColorAnimatablePropertyHandle property, uint32_t* value); 1449 1450 /** 1451 * @brief Dispose the color animatable property handle. 1452 * 1453 * @param property {@link ArkUI_ColorAnimatablePropertyHandle} Handle to the color animatable property. 1454 * @since 20 1455 */ 1456 void OH_ArkUI_RenderNodeUtils_DisposeColorAnimatableProperty(ArkUI_ColorAnimatablePropertyHandle property); 1457 1458 /** 1459 * @brief Set the onDraw function of the content modifier. 1460 * 1461 * @param modifier The target content modifier handle. 1462 * @param userData Custom data to be passed to the callback. 1463 * @param callback The draw event receiver callback. 1464 * @return Error code. 1465 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1466 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1467 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1468 * @since 20 1469 */ 1470 int32_t OH_ArkUI_RenderNodeUtils_SetContentModifierOnDraw(ArkUI_RenderContentModifierHandle modifier, void* userData, 1471 void (*callback)(ArkUI_DrawContext* context, void* userData)); 1472 1473 /** 1474 * @brief Create a RectShape option. 1475 * 1476 * @return A pointer to the RectShape option. 1477 * @since 20 1478 */ 1479 ArkUI_RectShapeOption* OH_ArkUI_RenderNodeUtils_CreateRectShapeOption(); 1480 1481 /** 1482 * @brief Dispose the RectShape option. 1483 * 1484 * @param option Pointer to the RectShape option. 1485 * @since 20 1486 */ 1487 void OH_ArkUI_RenderNodeUtils_DisposeRectShapeOption(ArkUI_RectShapeOption* option); 1488 1489 /** 1490 * @brief Set the edge value of RectShape option. 1491 * 1492 * @param option Pointer to the RectShape option. 1493 * @param edgeValue The edge value of the RectShape. 1494 * @param direction {@Link ArkUI_EdgeDirection} The direction of the edge. 1495 * @since 20 1496 */ 1497 void OH_ArkUI_RenderNodeUtils_SetRectShapeOptionEdgeValue( 1498 ArkUI_RectShapeOption* option, float edgeValue, ArkUI_EdgeDirection direction); 1499 1500 /** 1501 * @brief Create a NodeBorderStyle option. 1502 * 1503 * @return A pointer to the NodeBorderStyle option. 1504 * @since 20 1505 */ 1506 ArkUI_NodeBorderStyleOption* OH_ArkUI_RenderNodeUtils_CreateNodeBorderStyleOption(); 1507 1508 /** 1509 * @brief Dispose the NodeBorderStyle option. 1510 * 1511 * @param option Pointer to the NodeBorderStyle option. 1512 * @since 20 1513 */ 1514 void OH_ArkUI_RenderNodeUtils_DisposeNodeBorderStyleOption(ArkUI_NodeBorderStyleOption* option); 1515 1516 /** 1517 * @brief Set the edge value of NodeBorderStyle option. 1518 * 1519 * @param option Pointer to the NodeBorderStyle option. 1520 * @param edgeStyle {@Link ArkUI_BorderStyle} The edge border style value of the NodeBorderStyle option. 1521 * @param direction {@Link ArkUI_EdgeDirection} The direction of the edge. 1522 * @since 20 1523 */ 1524 void OH_ArkUI_RenderNodeUtils_SetNodeBorderStyleOptionEdgeStyle( 1525 ArkUI_NodeBorderStyleOption* option, ArkUI_BorderStyle edgeStyle, ArkUI_EdgeDirection direction); 1526 1527 /** 1528 * @brief Create a NodeBorderWidth option. 1529 * 1530 * @return A pointer to the NodeBorderWidth option. 1531 * @since 20 1532 */ 1533 ArkUI_NodeBorderWidthOption* OH_ArkUI_RenderNodeUtils_CreateNodeBorderWidthOption(); 1534 1535 /** 1536 * @brief Dispose the NodeBorderWidth option. 1537 * 1538 * @param option Pointer to the NodeBorderWidth option. 1539 * @since 20 1540 */ 1541 void OH_ArkUI_RenderNodeUtils_DisposeNodeBorderWidthOption(ArkUI_NodeBorderWidthOption* option); 1542 1543 /** 1544 * @brief Set the edge value of NodeBorderWidth option. 1545 * 1546 * @param option Pointer to the NodeBorderWidth option. 1547 * @param edgeWidth The edge width value of the NodeBorderWidth option. 1548 * @param direction {@Link ArkUI_EdgeDirection} The direction of the edge. 1549 * @since 20 1550 */ 1551 void OH_ArkUI_RenderNodeUtils_SetNodeBorderWidthOptionEdgeWidth( 1552 ArkUI_NodeBorderWidthOption* option, float edgeWidth, ArkUI_EdgeDirection direction); 1553 1554 /** 1555 * @brief Create a NodeBorderColor option. 1556 * 1557 * @return A pointer to the NodeBorderColor option. 1558 * @since 20 1559 */ 1560 ArkUI_NodeBorderColorOption* OH_ArkUI_RenderNodeUtils_CreateNodeBorderColorOption(); 1561 1562 /** 1563 * @brief Dispose the NodeBorderColor option. 1564 * 1565 * @param option Pointer to the NodeBorderColor option. 1566 * @since 20 1567 */ 1568 void OH_ArkUI_RenderNodeUtils_DisposeNodeBorderColorOption(ArkUI_NodeBorderColorOption* option); 1569 1570 /** 1571 * @brief Set the edge value of NodeBorderColor option. 1572 * 1573 * @param option Pointer to the NodeBorderColor option. 1574 * @param edgeColor The edge color value of the NodeBorderColor option. 1575 * @param direction {@Link ArkUI_EdgeDirection} The direction of the edge. 1576 * @since 20 1577 */ 1578 void OH_ArkUI_RenderNodeUtils_SetNodeBorderColorOptionEdgeColor( 1579 ArkUI_NodeBorderColorOption* option, uint32_t edgeColor, ArkUI_EdgeDirection direction); 1580 1581 /** 1582 * @brief Create a NodeBorderRadius option. 1583 * 1584 * @return A pointer to the NodeBorderRadius option. 1585 * @since 20 1586 */ 1587 ArkUI_NodeBorderRadiusOption* OH_ArkUI_RenderNodeUtils_CreateNodeBorderRadiusOption(); 1588 1589 /** 1590 * @brief Dispose the NodeBorderRadius option. 1591 * 1592 * @param option Pointer to the NodeBorderRadius option. 1593 * @since 20 1594 */ 1595 void OH_ArkUI_RenderNodeUtils_DisposeNodeBorderRadiusOption(ArkUI_NodeBorderRadiusOption* option); 1596 1597 /** 1598 * @brief Set the corner value of NodeBorderRadius option. 1599 * 1600 * @param option Pointer to the NodeBorderRadius option. 1601 * @param cornerRadius The corner radius value of the NodeBorderRadius option. 1602 * @param direction {@Link ArkUI_CornerDirection} The direction of the corner. 1603 * @since 20 1604 */ 1605 void OH_ArkUI_RenderNodeUtils_SetNodeBorderRadiusOptionCornerRadius( 1606 ArkUI_NodeBorderRadiusOption* option, uint32_t cornerRadius, ArkUI_CornerDirection direction); 1607 1608 /** 1609 * @brief Create a CircleShape option. 1610 * 1611 * @return A pointer to the CircleShape option. 1612 * @since 20 1613 */ 1614 ArkUI_CircleShapeOption* OH_ArkUI_RenderNodeUtils_CreateCircleShapeOption(); 1615 1616 /** 1617 * @brief Dispose the CircleShape option. 1618 * 1619 * @param option Pointer to the CircleShape option. 1620 * @since 20 1621 */ 1622 void OH_ArkUI_RenderNodeUtils_DisposeCircleShapeOption(ArkUI_CircleShapeOption* option); 1623 1624 /** 1625 * @brief Set the centerX value of CircleShape option. 1626 * 1627 * @param option Pointer to the CircleShape option. 1628 * @param centerX The centerX value. 1629 * @since 20 1630 */ 1631 void OH_ArkUI_RenderNodeUtils_SetCircleShapeOptionCenterX(ArkUI_CircleShapeOption* option, float centerX); 1632 1633 /** 1634 * @brief Set the centerY value of CircleShape option. 1635 * 1636 * @param option Pointer to the CircleShape option. 1637 * @param centerY The centerY value. 1638 * @since 20 1639 */ 1640 void OH_ArkUI_RenderNodeUtils_SetCircleShapeOptionCenterY(ArkUI_CircleShapeOption* option, float centerY); 1641 1642 /** 1643 * @brief Set the radius value of CircleShape option. 1644 * 1645 * @param option Pointer to the CircleShape option. 1646 * @param radius The radius value. 1647 * @since 20 1648 */ 1649 void OH_ArkUI_RenderNodeUtils_SetCircleShapeOptionRadius(ArkUI_CircleShapeOption* option, float radius); 1650 1651 /** 1652 * @brief Create a RoundRectShape option. 1653 * 1654 * @return A pointer to the RoundRectShape option. 1655 * @since 20 1656 */ 1657 ArkUI_RoundRectShapeOption* OH_ArkUI_RenderNodeUtils_CreateRoundRectShapeOption(); 1658 1659 /** 1660 * @brief Dispose the RoundRectShape option. 1661 * 1662 * @param option Pointer to the RoundRectShape option. 1663 * @since 20 1664 */ 1665 void OH_ArkUI_RenderNodeUtils_DisposeRoundRectShapeOption(ArkUI_RoundRectShapeOption* option); 1666 1667 /** 1668 * @brief Set the edge value of RoundRectShape option. 1669 * 1670 * @param option Pointer to the RoundRectShape option. 1671 * @param edgeValue The edge value of the RoundRectShape. 1672 * @param direction {@Link ArkUI_EdgeDirection} The direction of the edge. 1673 * @since 20 1674 */ 1675 void OH_ArkUI_RenderNodeUtils_SetRoundRectShapeOptionEdgeValue( 1676 ArkUI_RoundRectShapeOption* option, float edgeValue, ArkUI_EdgeDirection direction); 1677 1678 /** 1679 * @brief Set the coordinate value of the target corner. 1680 * 1681 * @param option Pointer to the RoundRectShape option. 1682 * @param x X-coordinate of the target corner (in pixels). 1683 * @param y Y-coordinate of the target corner (in pixels). 1684 * @param direction {@Link ArkUI_CornerDirection} The direction of the corner. 1685 * @since 20 1686 */ 1687 void OH_ArkUI_RenderNodeUtils_SetRoundRectShapeOptionCornerXY( 1688 ArkUI_RoundRectShapeOption* option, float x, float y, ArkUI_CornerDirection direction); 1689 1690 /** 1691 * @brief Create a CommandPath option. 1692 * 1693 * @return A pointer to the CommandPath option. 1694 * @since 20 1695 */ 1696 ArkUI_CommandPathOption* OH_ArkUI_RenderNodeUtils_CreateCommandPathOption(); 1697 1698 /** 1699 * @brief Dispose the CommandPath option. 1700 * 1701 * @param option Pointer to the CommandPath option. 1702 * @since 20 1703 */ 1704 void OH_ArkUI_RenderNodeUtils_DisposeCommandPathOption(ArkUI_CommandPathOption* option); 1705 1706 /** 1707 * @brief Set the commands value of CommandPath option. 1708 * 1709 * @param option Pointer to the CommandPath option. 1710 * @param commands The commands value. 1711 * @since 20 1712 */ 1713 void OH_ArkUI_RenderNodeUtils_SetCommandPathOptionCommands(ArkUI_CommandPathOption* option, char* commands); 1714 1715 /** 1716 * @brief Create a mask option from a RectShape option. 1717 * 1718 * @param shape {@link ArkUI_RectShapeOption} Pointer to the RectShape option. 1719 * @return A pointer to the RenderNodeMask option. 1720 * @since 20 1721 */ 1722 ArkUI_RenderNodeMaskOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeMaskOptionFromRectShape( 1723 ArkUI_RectShapeOption* shape); 1724 1725 /** 1726 * @brief Create a mask option from a RoundRectShape option. 1727 * 1728 * @param shape {@link ArkUI_RoundRectShapeOption} Pointer to the RoundRectShape option. 1729 * @return A pointer to the RenderNodeMask option. 1730 * @since 20 1731 */ 1732 ArkUI_RenderNodeMaskOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeMaskOptionFromRoundRectShape( 1733 ArkUI_RoundRectShapeOption* shape); 1734 1735 /** 1736 * @brief Create a mask option from a CircleShape option. 1737 * 1738 * @param shape {@link ArkUI_CircleShapeOption} Pointer to the CircleShape option. 1739 * @return A pointer to the RenderNodeMask option. 1740 * @since 20 1741 */ 1742 ArkUI_RenderNodeMaskOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeMaskOptionFromCircleShape( 1743 ArkUI_CircleShapeOption* shape); 1744 1745 /** 1746 * @brief Create a mask option from a OvalShape option. 1747 * 1748 * @param shape {@link ArkUI_RectShapeOption} Pointer to the OvalShape option. 1749 * @return A pointer to the RenderNodeMask option. 1750 * @since 20 1751 */ 1752 ArkUI_RenderNodeMaskOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeMaskOptionFromOvalShape( 1753 ArkUI_RectShapeOption* shape); 1754 1755 /** 1756 * @brief Create a mask option from a CommandPath option. 1757 * 1758 * @param path {@link ArkUI_CommandPathOption} Pointer to the CommandPath option. 1759 * @return A pointer to the RenderNodeMask option. 1760 * @since 20 1761 */ 1762 ArkUI_RenderNodeMaskOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeMaskOptionFromCommandPath( 1763 ArkUI_CommandPathOption* path); 1764 1765 /** 1766 * @brief Dispose the RenderNodeMask option. 1767 * 1768 * @param option Pointer to the RenderNodeMask option. 1769 * @since 20 1770 */ 1771 void OH_ArkUI_RenderNodeUtils_DisposeRenderNodeMaskOption(ArkUI_RenderNodeMaskOption* option); 1772 1773 /** 1774 * @brief Set the fill color of RenderNodeMask option. 1775 * 1776 * @param mask Pointer to the RenderNodeMask option. 1777 * @param fillColor The fill color of the mask. 1778 * @return Error code. 1779 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1780 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1781 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1782 * @since 20 1783 */ 1784 void OH_ArkUI_RenderNodeUtils_SetRenderNodeMaskOptionFillColor(ArkUI_RenderNodeMaskOption* mask, uint32_t fillColor); 1785 1786 /** 1787 * @brief Set the stroke color of RenderNodeMask option. 1788 * 1789 * @param mask Pointer to the RenderNodeMask option. 1790 * @param strokeColor The stroke color of the mask. 1791 * @return Error code. 1792 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1793 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1794 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1795 * @since 20 1796 */ 1797 void OH_ArkUI_RenderNodeUtils_SetRenderNodeMaskOptionStrokeColor( 1798 ArkUI_RenderNodeMaskOption* mask, uint32_t strokeColor); 1799 1800 /** 1801 * @brief Set the stroke width of RenderNodeMask option. 1802 * 1803 * @param mask Pointer to the RenderNodeMask option. 1804 * @param strokeWidth The stroke width of the mask. 1805 * @return Error code. 1806 * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 1807 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. 1808 * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if CAPI init error. 1809 * @since 20 1810 */ 1811 void OH_ArkUI_RenderNodeUtils_SetRenderNodeMaskOptionStrokeWidth(ArkUI_RenderNodeMaskOption* mask, float strokeWidth); 1812 1813 /** 1814 * @brief Create a clip option from a RectShape option. 1815 * 1816 * @param shape {@link ArkUI_RectShapeOption} Pointer to the RectShape option. 1817 * @return A pointer to the RenderNodeClip option. 1818 * @since 20 1819 */ 1820 ArkUI_RenderNodeClipOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeClipOptionFromRectShape( 1821 ArkUI_RectShapeOption* shape); 1822 1823 /** 1824 * @brief Create a clip option from a RoundRectShape option. 1825 * 1826 * @param shape {@link ArkUI_RoundRectShapeOption} Pointer to the RoundRectShape option. 1827 * @return A pointer to the RenderNodeClip option. 1828 * @since 20 1829 */ 1830 ArkUI_RenderNodeClipOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeClipOptionFromRoundRectShape( 1831 ArkUI_RoundRectShapeOption* shape); 1832 1833 /** 1834 * @brief Create a clip option from a CircleShape option. 1835 * 1836 * @param shape {@link ArkUI_CircleShapeOption} Pointer to the CircleShape option. 1837 * @return A pointer to the RenderNodeClip option. 1838 * @since 20 1839 */ 1840 ArkUI_RenderNodeClipOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeClipOptionFromCircleShape( 1841 ArkUI_CircleShapeOption* shape); 1842 1843 /** 1844 * @brief Create a clip option from a OvalShape option. 1845 * 1846 * @param shape {@link ArkUI_RectShapeOption} Pointer to the OvalShape option. 1847 * @return A pointer to the RenderNodeClip option. 1848 * @since 20 1849 */ 1850 ArkUI_RenderNodeClipOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeClipOptionFromOvalShape( 1851 ArkUI_RectShapeOption* shape); 1852 1853 /** 1854 * @brief Create a clip option from a CommandPath option. 1855 * 1856 * @param path {@link ArkUI_CommandPathOption} Pointer to the CommandPath option. 1857 * @return A pointer to the RenderNodeClip option. 1858 * @since 20 1859 */ 1860 ArkUI_RenderNodeClipOption* OH_ArkUI_RenderNodeUtils_CreateRenderNodeClipOptionFromCommandPath( 1861 ArkUI_CommandPathOption* path); 1862 1863 /** 1864 * @brief Dispose the RenderNodeClip option. 1865 * 1866 * @param option Pointer to the RenderNodeClip option. 1867 * @since 20 1868 */ 1869 void OH_ArkUI_RenderNodeUtils_DisposeRenderNodeClipOption(ArkUI_RenderNodeClipOption* option); 1870 1871 #ifdef __cplusplus 1872 }; 1873 #endif 1874 1875 #endif // ARKUI_NATIVE_RENDER_H 1876 /** @} */ 1877