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