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