1/* 2 * Copyright (c) 2023 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 * @file 18 * @kit ArkUI 19 */ 20import { DrawContext, Size, Offset, Position, Pivot, Scale, Translation, Matrix4, Rotation, Frame, BorderRadiuses, ShapeMask, ShapeClip, Edges, LengthMetricsUnit } from './Graphics'; 21 22/** 23 * Defines RenderNode. Contains node tree operations and render property operations on node. 24 * 25 * @syscap SystemCapability.ArkUI.ArkUI.Full 26 * @crossplatform 27 * @since 11 28 */ 29/** 30 * Defines RenderNode. Contains node tree operations and render property operations on node. 31 * 32 * @syscap SystemCapability.ArkUI.ArkUI.Full 33 * @crossplatform 34 * @atomicservice 35 * @since 12 36 */ 37export class RenderNode { 38 /** 39 * Constructor. 40 * 41 * @syscap SystemCapability.ArkUI.ArkUI.Full 42 * @crossplatform 43 * @since 11 44 */ 45 /** 46 * Constructor. 47 * 48 * @syscap SystemCapability.ArkUI.ArkUI.Full 49 * @crossplatform 50 * @atomicservice 51 * @since 12 52 */ 53 constructor(); 54 55 /** 56 * Add child to the end of the RenderNode's children. 57 * 58 * @param { RenderNode } node - The node will be added. 59 * @syscap SystemCapability.ArkUI.ArkUI.Full 60 * @crossplatform 61 * @since 11 62 */ 63 /** 64 * Add child to the end of the RenderNode's children. 65 * 66 * @param { RenderNode } node - The node will be added. 67 * @syscap SystemCapability.ArkUI.ArkUI.Full 68 * @crossplatform 69 * @atomicservice 70 * @since 12 71 */ 72 appendChild(node: RenderNode): void; 73 74 /** 75 * Add child to the current RenderNode. 76 * 77 * @param { RenderNode } child - The node will be added. 78 * @param { RenderNode | null } sibling - The new node is added after this node. When sibling is null, insert node as the first children of the node. 79 * @syscap SystemCapability.ArkUI.ArkUI.Full 80 * @crossplatform 81 * @since 11 82 */ 83 /** 84 * Add child to the current RenderNode. 85 * 86 * @param { RenderNode } child - The node will be added. 87 * @param { RenderNode | null } sibling - The new node is added after this node. When sibling is null, insert node as the first children of the node. 88 * @syscap SystemCapability.ArkUI.ArkUI.Full 89 * @crossplatform 90 * @atomicservice 91 * @since 12 92 */ 93 insertChildAfter(child: RenderNode, sibling: RenderNode | null): void; 94 95 /** 96 * Remove child from the current RenderNode. 97 * 98 * @param { RenderNode } node - The node will be removed. 99 * @syscap SystemCapability.ArkUI.ArkUI.Full 100 * @crossplatform 101 * @since 11 102 */ 103 /** 104 * Remove child from the current RenderNode. 105 * 106 * @param { RenderNode } node - The node will be removed. 107 * @syscap SystemCapability.ArkUI.ArkUI.Full 108 * @crossplatform 109 * @atomicservice 110 * @since 12 111 */ 112 removeChild(node: RenderNode): void; 113 114 /** 115 * Clear children of the current RenderNode. 116 * 117 * @syscap SystemCapability.ArkUI.ArkUI.Full 118 * @crossplatform 119 * @since 11 120 */ 121 /** 122 * Clear children of the current RenderNode. 123 * 124 * @syscap SystemCapability.ArkUI.ArkUI.Full 125 * @crossplatform 126 * @atomicservice 127 * @since 12 128 */ 129 clearChildren(): void; 130 131 /** 132 * Get a child of the current RenderNode by index. 133 * 134 * @param { number } index - The index of the desired node in the children of RenderNode. 135 * @returns { RenderNode | null } - Returns a RenderNode. When the required node does not exist, returns null. 136 * @syscap SystemCapability.ArkUI.ArkUI.Full 137 * @crossplatform 138 * @since 11 139 */ 140 /** 141 * Get a child of the current RenderNode by index. 142 * 143 * @param { number } index - The index of the desired node in the children of RenderNode. 144 * @returns { RenderNode | null } - Returns a RenderNode. When the required node does not exist, returns null. 145 * @syscap SystemCapability.ArkUI.ArkUI.Full 146 * @crossplatform 147 * @atomicservice 148 * @since 12 149 */ 150 getChild(index: number): RenderNode | null; 151 152 /** 153 * Get the first child of the current RenderNode. 154 * 155 * @returns { RenderNode | null } - Returns a RenderNode, which is first child of the current RenderNode. 156 * If current RenderNode does not have child node, returns null. 157 * @syscap SystemCapability.ArkUI.ArkUI.Full 158 * @crossplatform 159 * @since 11 160 */ 161 /** 162 * Get the first child of the current RenderNode. 163 * 164 * @returns { RenderNode | null } - Returns a RenderNode, which is first child of the current RenderNode. 165 * If current RenderNode does not have child node, returns null. 166 * @syscap SystemCapability.ArkUI.ArkUI.Full 167 * @crossplatform 168 * @atomicservice 169 * @since 12 170 */ 171 getFirstChild(): RenderNode | null; 172 173 /** 174 * Get the next sibling node of the current RenderNode. 175 * 176 * @returns { RenderNode | null } - Returns a RenderNode. If current RenderNode does not have next sibling node, returns null. 177 * @syscap SystemCapability.ArkUI.ArkUI.Full 178 * @crossplatform 179 * @since 11 180 */ 181 /** 182 * Get the next sibling node of the current RenderNode. 183 * 184 * @returns { RenderNode | null } - Returns a RenderNode. If current RenderNode does not have next sibling node, returns null. 185 * @syscap SystemCapability.ArkUI.ArkUI.Full 186 * @crossplatform 187 * @atomicservice 188 * @since 12 189 */ 190 getNextSibling(): RenderNode | null; 191 192 /** 193 * Get the previous sibling node of the current RenderNode. If current RenderNode does not have previous sibling node, returns null. 194 * 195 * @returns { RenderNode | null } - Returns a RenderNode. 196 * @syscap SystemCapability.ArkUI.ArkUI.Full 197 * @crossplatform 198 * @since 11 199 */ 200 /** 201 * Get the previous sibling node of the current RenderNode. 202 * 203 * @returns { RenderNode | null } - Returns a RenderNode. 204 * @syscap SystemCapability.ArkUI.ArkUI.Full 205 * @crossplatform 206 * @atomicservice 207 * @since 12 208 */ 209 getPreviousSibling(): RenderNode | null; 210 211 /** 212 * Set the background color of the RenderNode. 213 * 214 * @param { number } color - The background color. Colors are defined as ARGB format represented by number. 215 * @syscap SystemCapability.ArkUI.ArkUI.Full 216 * @crossplatform 217 * @since 11 218 */ 219 /** 220 * Set the background color of the RenderNode. 221 * 222 * @param { number } color - The background color. Colors are defined as ARGB format represented by number. 223 * @syscap SystemCapability.ArkUI.ArkUI.Full 224 * @crossplatform 225 * @atomicservice 226 * @since 12 227 */ 228 set backgroundColor(color: number); 229 230 /** 231 * Get the background color of the RenderNode. 232 * 233 * @returns { number } - Returns a background color. Colors are defined as ARGB format represented by number. 234 * @default 0X00000000 235 * @syscap SystemCapability.ArkUI.ArkUI.Full 236 * @crossplatform 237 * @since 11 238 */ 239 /** 240 * Get the background color of the RenderNode. 241 * 242 * @returns { number } - Returns a background color. Colors are defined as ARGB format represented by number. 243 * @syscap SystemCapability.ArkUI.ArkUI.Full 244 * @crossplatform 245 * @atomicservice 246 * @since 12 247 */ 248 get backgroundColor(): number; 249 250 /** 251 * Set whether the RenderNode clip to frame. 252 * 253 * @param { boolean } useClip - Whether the RenderNode clip to frame. 254 * @syscap SystemCapability.ArkUI.ArkUI.Full 255 * @crossplatform 256 * @since 11 257 */ 258 /** 259 * Set whether the RenderNode clip to frame. 260 * 261 * @param { boolean } useClip - Whether the RenderNode clip to frame. 262 * @syscap SystemCapability.ArkUI.ArkUI.Full 263 * @crossplatform 264 * @atomicservice 265 * @since 12 266 */ 267 set clipToFrame(useClip: boolean); 268 269 /** 270 * Get whether the RenderNode clip to frame. 271 * 272 * @returns { boolean } - Returns whether the RenderNode clip to frame. 273 * @default true 274 * @syscap SystemCapability.ArkUI.ArkUI.Full 275 * @crossplatform 276 * @since 11 277 */ 278 /** 279 * Get whether the RenderNode clip to frame. 280 * 281 * @returns { boolean } - Returns whether the RenderNode clip to frame. 282 * @syscap SystemCapability.ArkUI.ArkUI.Full 283 * @crossplatform 284 * @atomicservice 285 * @since 12 286 */ 287 get clipToFrame(): boolean; 288 289 /** 290 * Set opacity of the RenderNode. 291 * 292 * @param { number } value - The opacity of the RenderNode. 293 * @syscap SystemCapability.ArkUI.ArkUI.Full 294 * @crossplatform 295 * @since 11 296 */ 297 /** 298 * Set opacity of the RenderNode. 299 * 300 * @param { number } value - The opacity of the RenderNode. 301 * @syscap SystemCapability.ArkUI.ArkUI.Full 302 * @crossplatform 303 * @atomicservice 304 * @since 12 305 */ 306 set opacity(value: number); 307 308 /** 309 * Get opacity of the RenderNode. 310 * 311 * @returns { number } Returns the opacity of the RenderNode. 312 * @default 1 313 * @syscap SystemCapability.ArkUI.ArkUI.Full 314 * @crossplatform 315 * @since 11 316 */ 317 /** 318 * Get opacity of the RenderNode. 319 * 320 * @returns { number } Returns the opacity of the RenderNode. 321 * @syscap SystemCapability.ArkUI.ArkUI.Full 322 * @crossplatform 323 * @atomicservice 324 * @since 12 325 */ 326 get opacity(): number; 327 328 /** 329 * Set frame size of the RenderNode. 330 * 331 * @param { Size } size - The size of the RenderNode frame. 332 * @syscap SystemCapability.ArkUI.ArkUI.Full 333 * @crossplatform 334 * @since 11 335 */ 336 /** 337 * Set frame size of the RenderNode. 338 * 339 * @param { Size } size - The size of the RenderNode frame. 340 * @syscap SystemCapability.ArkUI.ArkUI.Full 341 * @crossplatform 342 * @atomicservice 343 * @since 12 344 */ 345 set size(size: Size); 346 347 /** 348 * Get frame size of the RenderNode. 349 * 350 * @returns { Size } The size of the RenderNode frame. 351 * @default Size { width: 0, height: 0 } 352 * @syscap SystemCapability.ArkUI.ArkUI.Full 353 * @crossplatform 354 * @since 11 355 */ 356 /** 357 * Get frame size of the RenderNode. 358 * 359 * @returns { Size } The size of the RenderNode frame. 360 * @syscap SystemCapability.ArkUI.ArkUI.Full 361 * @crossplatform 362 * @atomicservice 363 * @since 12 364 */ 365 get size(): Size; 366 367 /** 368 * Set frame position of the RenderNode. 369 * 370 * @param { Position } position - The position of the RenderNode frame. 371 * @syscap SystemCapability.ArkUI.ArkUI.Full 372 * @crossplatform 373 * @since 11 374 */ 375 /** 376 * Set frame position of the RenderNode. 377 * 378 * @param { Position } position - The position of the RenderNode frame. 379 * @syscap SystemCapability.ArkUI.ArkUI.Full 380 * @crossplatform 381 * @atomicservice 382 * @since 12 383 */ 384 set position(position: Position); 385 386 /** 387 * Get frame position of the RenderNode. 388 * 389 * @returns { Position } - The position of the RenderNode frame. 390 * @default Position { x: 0, y: 0 } 391 * @syscap SystemCapability.ArkUI.ArkUI.Full 392 * @crossplatform 393 * @since 11 394 */ 395 /** 396 * Get frame position of the RenderNode. 397 * 398 * @returns { Position } - The position of the RenderNode frame. 399 * @syscap SystemCapability.ArkUI.ArkUI.Full 400 * @crossplatform 401 * @atomicservice 402 * @since 12 403 */ 404 get position(): Position; 405 406 /** 407 * Set frame info of the RenderNode. 408 * 409 * @param { Frame } frame - The frame info of the RenderNode frame. 410 * @syscap SystemCapability.ArkUI.ArkUI.Full 411 * @crossplatform 412 * @since 11 413 */ 414 /** 415 * Set frame info of the RenderNode. 416 * 417 * @param { Frame } frame - The frame info of the RenderNode frame. 418 * @syscap SystemCapability.ArkUI.ArkUI.Full 419 * @crossplatform 420 * @atomicservice 421 * @since 12 422 */ 423 set frame(frame: Frame); 424 425 /** 426 * Get frame info of the RenderNode. 427 * 428 * @returns { Frame } - Returns frame info of the RenderNode. 429 * @default Frame { x: 0, y: 0, width: 0, height: 0 } 430 * @syscap SystemCapability.ArkUI.ArkUI.Full 431 * @crossplatform 432 * @since 11 433 */ 434 /** 435 * Get frame info of the RenderNode. 436 * 437 * @returns { Frame } - Returns frame info of the RenderNode. 438 * @syscap SystemCapability.ArkUI.ArkUI.Full 439 * @crossplatform 440 * @atomicservice 441 * @since 12 442 */ 443 get frame(): Frame; 444 445 /** 446 * Set pivot of the RenderNode. 447 * 448 * @param { Pivot } pivot - The pivot of the RenderNode. 449 * @syscap SystemCapability.ArkUI.ArkUI.Full 450 * @crossplatform 451 * @since 11 452 */ 453 /** 454 * Set pivot of the RenderNode. 455 * 456 * @param { Pivot } pivot - The pivot of the RenderNode. 457 * @syscap SystemCapability.ArkUI.ArkUI.Full 458 * @crossplatform 459 * @atomicservice 460 * @since 12 461 */ 462 set pivot(pivot: Pivot); 463 464 /** 465 * Get pivot vector of the RenderNode. 466 * 467 * @returns { Pivot } - Returns pivot vector of the RenderNode. 468 * @default Pivot { x: 0.5, y: 0.5 } 469 * @syscap SystemCapability.ArkUI.ArkUI.Full 470 * @crossplatform 471 * @since 11 472 */ 473 /** 474 * Get pivot vector of the RenderNode. 475 * 476 * @returns { Pivot } - Returns pivot vector of the RenderNode. 477 * @syscap SystemCapability.ArkUI.ArkUI.Full 478 * @crossplatform 479 * @atomicservice 480 * @since 12 481 */ 482 get pivot(): Pivot; 483 484 /** 485 * Set scale of the RenderNode. 486 * 487 * @param { Scale } scale - The scale of the RenderNode. 488 * @syscap SystemCapability.ArkUI.ArkUI.Full 489 * @crossplatform 490 * @since 11 491 */ 492 /** 493 * Set scale of the RenderNode. 494 * 495 * @param { Scale } scale - The scale of the RenderNode. 496 * @syscap SystemCapability.ArkUI.ArkUI.Full 497 * @crossplatform 498 * @atomicservice 499 * @since 12 500 */ 501 set scale(scale: Scale); 502 503 /** 504 * Get scale vector of the RenderNode. 505 * 506 * @returns { Scale } - Returns scale vector of the RenderNode. 507 * @default Scale { x: 1, y: 1 } 508 * @syscap SystemCapability.ArkUI.ArkUI.Full 509 * @crossplatform 510 * @since 11 511 */ 512 /** 513 * Get scale vector of the RenderNode. 514 * 515 * @returns { Scale } - Returns scale vector of the RenderNode. 516 * @syscap SystemCapability.ArkUI.ArkUI.Full 517 * @crossplatform 518 * @atomicservice 519 * @since 12 520 */ 521 get scale(): Scale; 522 523 /** 524 * Set translation of the RenderNode. 525 * 526 * @param { Translation } translation - the translate vector of the RenderNode. 527 * @syscap SystemCapability.ArkUI.ArkUI.Full 528 * @crossplatform 529 * @since 11 530 */ 531 /** 532 * Set translation of the RenderNode. 533 * 534 * @param { Translation } translation - the translate vector of the RenderNode. 535 * @syscap SystemCapability.ArkUI.ArkUI.Full 536 * @crossplatform 537 * @atomicservice 538 * @since 12 539 */ 540 set translation(translation: Translation); 541 542 /** 543 * Get translation vector of the RenderNode. 544 * 545 * @returns { Translation } - Returns translation vector of the RenderNode. 546 * @default Translation { x: 0, y: 0 } 547 * @syscap SystemCapability.ArkUI.ArkUI.Full 548 * @crossplatform 549 * @since 11 550 */ 551 /** 552 * Get translation vector of the RenderNode. 553 * 554 * @returns { Translation } - Returns translation vector of the RenderNode. 555 * @syscap SystemCapability.ArkUI.ArkUI.Full 556 * @crossplatform 557 * @atomicservice 558 * @since 12 559 */ 560 get translation(): Translation; 561 562 /** 563 * Set rotation vector of the RenderNode. 564 * 565 * @param { Rotation } rotation - The rotation vector of the RenderNode. 566 * @syscap SystemCapability.ArkUI.ArkUI.Full 567 * @crossplatform 568 * @since 11 569 */ 570 /** 571 * Set rotation vector of the RenderNode. 572 * 573 * @param { Rotation } rotation - The rotation vector of the RenderNode. 574 * @syscap SystemCapability.ArkUI.ArkUI.Full 575 * @crossplatform 576 * @atomicservice 577 * @since 12 578 */ 579 set rotation(rotation: Rotation); 580 581 /** 582 * Get rotation vector of the RenderNode. 583 * 584 * @returns { Rotation } - Returns rotation vector of the RenderNode. 585 * @default Rotation { x: 0, y: 0, z: 0 } 586 * @syscap SystemCapability.ArkUI.ArkUI.Full 587 * @crossplatform 588 * @since 11 589 */ 590 /** 591 * Get rotation vector of the RenderNode. 592 * 593 * @returns { Rotation } - Returns rotation vector of the RenderNode. 594 * @syscap SystemCapability.ArkUI.ArkUI.Full 595 * @crossplatform 596 * @atomicservice 597 * @since 12 598 */ 599 get rotation(): Rotation; 600 601 /** 602 * Set transform info of the RenderNode. 603 * 604 * @param { Matrix4 } transform - the transform info of the RenderNode. 605 * @syscap SystemCapability.ArkUI.ArkUI.Full 606 * @crossplatform 607 * @since 11 608 */ 609 /** 610 * Set transform info of the RenderNode. 611 * 612 * @param { Matrix4 } transform - the transform info of the RenderNode. 613 * @syscap SystemCapability.ArkUI.ArkUI.Full 614 * @crossplatform 615 * @atomicservice 616 * @since 12 617 */ 618 set transform(transform: Matrix4); 619 620 /** 621 * Get transform info of the RenderNode. 622 * 623 * @returns {Matrix4 } - Returns transform info of the RenderNode. 624 * @default Matrix4 [ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 ] 625 * @syscap SystemCapability.ArkUI.ArkUI.Full 626 * @crossplatform 627 * @since 11 628 */ 629 /** 630 * Get transform info of the RenderNode. 631 * 632 * @returns {Matrix4 } - Returns transform info of the RenderNode. 633 * @syscap SystemCapability.ArkUI.ArkUI.Full 634 * @crossplatform 635 * @atomicservice 636 * @since 12 637 */ 638 get transform(): Matrix4; 639 640 /** 641 * Set shadow color of the RenderNode. 642 * 643 * @param { number } color - the shadow color of the RenderNode. Colors are defined as ARGB format represented by number. 644 * @syscap SystemCapability.ArkUI.ArkUI.Full 645 * @crossplatform 646 * @since 11 647 */ 648 /** 649 * Set shadow color of the RenderNode. 650 * 651 * @param { number } color - the shadow color of the RenderNode. Colors are defined as ARGB format represented by number. 652 * @syscap SystemCapability.ArkUI.ArkUI.Full 653 * @crossplatform 654 * @atomicservice 655 * @since 12 656 */ 657 set shadowColor(color: number); 658 659 /** 660 * Get shadow color of the RenderNode. 661 * 662 * @returns { number } - Returns the shadow color of the RenderNode. Colors are defined as ARGB format represented by number. 663 * @default 0X00000000 664 * @syscap SystemCapability.ArkUI.ArkUI.Full 665 * @crossplatform 666 * @since 11 667 */ 668 /** 669 * Get shadow color of the RenderNode. 670 * 671 * @returns { number } - Returns the shadow color of the RenderNode. Colors are defined as ARGB format represented by number. 672 * @syscap SystemCapability.ArkUI.ArkUI.Full 673 * @crossplatform 674 * @atomicservice 675 * @since 12 676 */ 677 get shadowColor(): number; 678 679 /** 680 * Set shadow offset of the RenderNode. 681 * 682 * @param { Offset } offset - the shadow offset of the RenderNode. 683 * @syscap SystemCapability.ArkUI.ArkUI.Full 684 * @crossplatform 685 * @since 11 686 */ 687 /** 688 * Set shadow offset of the RenderNode. 689 * 690 * @param { Offset } offset - the shadow offset of the RenderNode. 691 * @syscap SystemCapability.ArkUI.ArkUI.Full 692 * @crossplatform 693 * @atomicservice 694 * @since 12 695 */ 696 set shadowOffset(offset: Offset); 697 698 /** 699 * Get shadow offset of the RenderNode. 700 * 701 * @returns { Offset } - Returns the shadow offset of the RenderNode. 702 * @default Offset { x: 0, y: 0 } 703 * @syscap SystemCapability.ArkUI.ArkUI.Full 704 * @crossplatform 705 * @since 11 706 */ 707 /** 708 * Get shadow offset of the RenderNode. 709 * 710 * @returns { Offset } - Returns the shadow offset of the RenderNode. 711 * @syscap SystemCapability.ArkUI.ArkUI.Full 712 * @crossplatform 713 * @atomicservice 714 * @since 12 715 */ 716 get shadowOffset(): Offset; 717 718 /** 719 * Set label of the RenderNode. 720 * 721 * @param { string } label - the label of the RenderNode. 722 * @syscap SystemCapability.ArkUI.ArkUI.Full 723 * @crossplatform 724 * @atomicservice 725 * @since 12 726 */ 727 set label(label: string); 728 729 /** 730 * Get label of the RenderNode. 731 * 732 * @returns { string } - Returns the label of the RenderNode. 733 * @syscap SystemCapability.ArkUI.ArkUI.Full 734 * @crossplatform 735 * @atomicservice 736 * @since 12 737 */ 738 get label(): string; 739 740 /** 741 * Set shadow alpha of the RenderNode. 742 * 743 * @param { number } alpha - the shadow alpha of the RenderNode. 744 * @syscap SystemCapability.ArkUI.ArkUI.Full 745 * @crossplatform 746 * @since 11 747 */ 748 /** 749 * Set shadow alpha of the RenderNode. 750 * 751 * @param { number } alpha - the shadow alpha of the RenderNode. 752 * @syscap SystemCapability.ArkUI.ArkUI.Full 753 * @crossplatform 754 * @atomicservice 755 * @since 12 756 */ 757 set shadowAlpha(alpha: number); 758 759 /** 760 * Get shadow alpha of the RenderNode. 761 * 762 * @returns { number } - Returns the shadow alpha of the RenderNode. 763 * @default 0 764 * @syscap SystemCapability.ArkUI.ArkUI.Full 765 * @crossplatform 766 * @since 11 767 */ 768 /** 769 * Get shadow alpha of the RenderNode. 770 * 771 * @returns { number } - Returns the shadow alpha of the RenderNode. 772 * @syscap SystemCapability.ArkUI.ArkUI.Full 773 * @crossplatform 774 * @atomicservice 775 * @since 12 776 */ 777 get shadowAlpha(): number; 778 779 /** 780 * Set shadow elevation of the RenderNode. 781 * 782 * @param { number } elevation - the shadow elevation of the RenderNode. 783 * @syscap SystemCapability.ArkUI.ArkUI.Full 784 * @crossplatform 785 * @since 11 786 */ 787 /** 788 * Set shadow elevation of the RenderNode. 789 * 790 * @param { number } elevation - the shadow elevation of the RenderNode. 791 * @syscap SystemCapability.ArkUI.ArkUI.Full 792 * @crossplatform 793 * @atomicservice 794 * @since 12 795 */ 796 set shadowElevation(elevation: number); 797 798 /** 799 * Get shadow elevation of the RenderNode. 800 * 801 * @returns { number } - Returns the shadow elevation of the RenderNode. 802 * @default 0 803 * @syscap SystemCapability.ArkUI.ArkUI.Full 804 * @crossplatform 805 * @since 11 806 */ 807 /** 808 * Get shadow elevation of the RenderNode. 809 * 810 * @returns { number } - Returns the shadow elevation of the RenderNode. 811 * @syscap SystemCapability.ArkUI.ArkUI.Full 812 * @crossplatform 813 * @atomicservice 814 * @since 12 815 */ 816 get shadowElevation(): number; 817 818 /** 819 * Set shadow radius of the RenderNode. 820 * 821 * @param { number } radius - the shadow radius of the RenderNode. 822 * @syscap SystemCapability.ArkUI.ArkUI.Full 823 * @crossplatform 824 * @since 11 825 */ 826 /** 827 * Set shadow radius of the RenderNode. 828 * 829 * @param { number } radius - the shadow radius of the RenderNode. 830 * @syscap SystemCapability.ArkUI.ArkUI.Full 831 * @crossplatform 832 * @atomicservice 833 * @since 12 834 */ 835 set shadowRadius(radius: number); 836 837 /** 838 * Get shadow radius of the RenderNode. 839 * 840 * @returns { number } - Returns the shadow radius of the RenderNode. 841 * @default 0 842 * @syscap SystemCapability.ArkUI.ArkUI.Full 843 * @crossplatform 844 * @since 11 845 */ 846 /** 847 * Get shadow radius of the RenderNode. 848 * 849 * @returns { number } - Returns the shadow radius of the RenderNode. 850 * @syscap SystemCapability.ArkUI.ArkUI.Full 851 * @crossplatform 852 * @atomicservice 853 * @since 12 854 */ 855 get shadowRadius(): number; 856 857 /** 858 * Set border style of the RenderNode. 859 * 860 * @param { Edges<BorderStyle> } style - the border style of the RenderNode. 861 * @syscap SystemCapability.ArkUI.ArkUI.Full 862 * @crossplatform 863 * @atomicservice 864 * @since 12 865 */ 866 set borderStyle(style: Edges<BorderStyle>); 867 868 /** 869 * Get border style of the RenderNode. 870 * 871 * @returns { Edges<BorderStyle> } - Returns the border style of the RenderNode. 872 * @syscap SystemCapability.ArkUI.ArkUI.Full 873 * @crossplatform 874 * @atomicservice 875 * @since 12 876 */ 877 get borderStyle(): Edges<BorderStyle>; 878 879 /** 880 * Set border width of the RenderNode. 881 * 882 * @param { Edges<number> } width - the border width of the RenderNode. 883 * @syscap SystemCapability.ArkUI.ArkUI.Full 884 * @crossplatform 885 * @atomicservice 886 * @since 12 887 */ 888 set borderWidth(width: Edges<number>); 889 890 /** 891 * Get border width of the RenderNode. 892 * 893 * @returns { Edges<number> } - Returns the border width of the RenderNode. 894 * @default 0 895 * @syscap SystemCapability.ArkUI.ArkUI.Full 896 * @crossplatform 897 * @atomicservice 898 * @since 12 899 */ 900 get borderWidth(): Edges<number>; 901 902 /** 903 * Set border color of the RenderNode. 904 * 905 * @param { Edges<number> } color - the border color of the RenderNode. 906 * @syscap SystemCapability.ArkUI.ArkUI.Full 907 * @crossplatform 908 * @atomicservice 909 * @since 12 910 */ 911 set borderColor(color: Edges<number>); 912 913 /** 914 * Get border color of the RenderNode. 915 * 916 * @returns { Edges<number> } - Returns the border color of the RenderNode. 917 * @default 0XFF000000 918 * @syscap SystemCapability.ArkUI.ArkUI.Full 919 * @crossplatform 920 * @atomicservice 921 * @since 12 922 */ 923 get borderColor(): Edges<number>; 924 925 /** 926 * Set border radius of the RenderNode. 927 * 928 * @param { BorderRadiuses } radius - the border radius of the RenderNode. 929 * @syscap SystemCapability.ArkUI.ArkUI.Full 930 * @crossplatform 931 * @atomicservice 932 * @since 12 933 */ 934 set borderRadius(radius: BorderRadiuses); 935 936 /** 937 * Get border radius of the RenderNode. 938 * 939 * @returns { BorderRadiuses } - Returns the border radius of the RenderNode. 940 * @default 0 941 * @syscap SystemCapability.ArkUI.ArkUI.Full 942 * @crossplatform 943 * @atomicservice 944 * @since 12 945 */ 946 get borderRadius(): BorderRadiuses; 947 948 /** 949 * Set shape mask of the RenderNode. 950 * 951 * @param { ShapeMask } shapeMask - the shape mask of the RenderNode. 952 * @syscap SystemCapability.ArkUI.ArkUI.Full 953 * @crossplatform 954 * @atomicservice 955 * @since 12 956 */ 957 set shapeMask(shapeMask: ShapeMask); 958 959 /** 960 * Get shape mask of the RenderNode. 961 * 962 * @returns { ShapeMask } - Returns the shape mask of the RenderNode. 963 * @syscap SystemCapability.ArkUI.ArkUI.Full 964 * @crossplatform 965 * @atomicservice 966 * @since 12 967 */ 968 get shapeMask(): ShapeMask; 969 970 /** 971 * Set shape clip of the RenderNode. 972 * 973 * @param { ShapeClip } shapeClip - the shape clip of the RenderNode. 974 * @syscap SystemCapability.ArkUI.ArkUI.Full 975 * @crossplatform 976 * @atomicservice 977 * @since 12 978 */ 979 set shapeClip(shapeClip: ShapeClip); 980 981 /** 982 * Get shape clip of the RenderNode. 983 * 984 * @returns { ShapeClip } - Returns the shape clip of the RenderNode. 985 * @syscap SystemCapability.ArkUI.ArkUI.clip 986 * @crossplatform 987 * @atomicservice 988 * @since 12 989 */ 990 get shapeClip(): ShapeClip; 991 992 /** 993 * Mark whether to preferentially draw the node and its children. 994 * 995 * @param { boolean } isNodeGroup - The parameter indicates whether to preferentially draw the node and its children. 996 * @syscap SystemCapability.ArkUI.ArkUI.Full 997 * @crossplatform 998 * @atomicservice 999 * @since 12 1000 */ 1001 set markNodeGroup(isNodeGroup: boolean); 1002 1003 /** 1004 * Get whether to preferentially draw the node and its children. 1005 * 1006 * @returns { boolean } - Return whether to preferentially draw the node and its children. 1007 * @default false 1008 * @syscap SystemCapability.ArkUI.ArkUI.Full 1009 * @crossplatform 1010 * @atomicservice 1011 * @since 12 1012 */ 1013 get markNodeGroup(): boolean; 1014 1015 /** 1016 * Draw Method. Executed when the associated RenderNode is onDraw. 1017 * 1018 * @param { DrawContext } context - The DrawContext will be used when executed draw method. 1019 * @syscap SystemCapability.ArkUI.ArkUI.Full 1020 * @crossplatform 1021 * @since 11 1022 */ 1023 /** 1024 * Draw Method. Executed when the associated RenderNode is onDraw. 1025 * 1026 * @param { DrawContext } context - The DrawContext will be used when executed draw method. 1027 * @syscap SystemCapability.ArkUI.ArkUI.Full 1028 * @crossplatform 1029 * @atomicservice 1030 * @since 12 1031 */ 1032 draw(context: DrawContext): void; 1033 1034 /** 1035 * Invalidate the RenderNode, which will cause a re-render of the RenderNode. 1036 * 1037 * @syscap SystemCapability.ArkUI.ArkUI.Full 1038 * @crossplatform 1039 * @since 11 1040 */ 1041 /** 1042 * Invalidate the RenderNode, which will cause a re-render of the RenderNode. 1043 * 1044 * @syscap SystemCapability.ArkUI.ArkUI.Full 1045 * @crossplatform 1046 * @atomicservice 1047 * @since 12 1048 */ 1049 invalidate(): void; 1050 1051 /** 1052 * Dispose the RenderNode immediately. 1053 * 1054 * @syscap SystemCapability.ArkUI.ArkUI.Full 1055 * @crossplatform 1056 * @atomicservice 1057 * @since 12 1058 */ 1059 dispose(): void; 1060 1061 /** 1062 * Set the length metrics unit of RenderNode. 1063 * 1064 * @param { LengthMetricsUnit } unit - The length metrics unit of RenderNode. 1065 * @syscap SystemCapability.ArkUI.ArkUI.Full 1066 * @crossplatform 1067 * @atomicservice 1068 * @since 12 1069 */ 1070 set lengthMetricsUnit(unit: LengthMetricsUnit); 1071 1072 /** 1073 * Get the length metrics unit of RenderNode. 1074 * 1075 * @returns { LengthMetricsUnit } - Return the length metrics unit of RenderNode. 1076 * @default LengthMetricsUnit.DEFAULT 1077 * @syscap SystemCapability.ArkUI.ArkUI.Full 1078 * @crossplatform 1079 * @atomicservice 1080 * @since 12 1081 */ 1082 get lengthMetricsUnit(): LengthMetricsUnit; 1083} 1084