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/** 22 * Define options used to construct a rectangle. 23 * 24 * @interface RectOptions 25 * @syscap SystemCapability.ArkUI.ArkUI.Full 26 * @crossplatform 27 * @form 28 * @atomicservice 29 * @since 14 30 */ 31declare interface RectOptions { 32 /** 33 * Rectangle width. 34 * 35 * @type { ?(number | string) } 36 * @syscap SystemCapability.ArkUI.ArkUI.Full 37 * @since 7 38 */ 39 /** 40 * Rectangle width. 41 * 42 * @type { ?(number | string) } 43 * @syscap SystemCapability.ArkUI.ArkUI.Full 44 * @form 45 * @since 9 46 */ 47 /** 48 * Rectangle width. 49 * 50 * @type { ?(number | string) } 51 * @syscap SystemCapability.ArkUI.ArkUI.Full 52 * @crossplatform 53 * @form 54 * @since 10 55 */ 56 /** 57 * Rectangle width. 58 * 59 * @type { ?(number | string) } 60 * @syscap SystemCapability.ArkUI.ArkUI.Full 61 * @crossplatform 62 * @form 63 * @atomicservice 64 * @since 11 65 */ 66 width?: number | string; 67 68 /** 69 * Rectangle height. 70 * 71 * @type { ?(number | string) } 72 * @syscap SystemCapability.ArkUI.ArkUI.Full 73 * @since 7 74 */ 75 /** 76 * Rectangle height. 77 * 78 * @type { ?(number | string) } 79 * @syscap SystemCapability.ArkUI.ArkUI.Full 80 * @form 81 * @since 9 82 */ 83 /** 84 * Rectangle height. 85 * 86 * @type { ?(number | string) } 87 * @syscap SystemCapability.ArkUI.ArkUI.Full 88 * @crossplatform 89 * @form 90 * @since 10 91 */ 92 /** 93 * Rectangle height. 94 * 95 * @type { ?(number | string) } 96 * @syscap SystemCapability.ArkUI.ArkUI.Full 97 * @crossplatform 98 * @form 99 * @atomicservice 100 * @since 11 101 */ 102 height?: number | string; 103 104 /** 105 * Corner radius of the rectangle. 106 * 107 * @type { ?(number | string | Array<any>) } 108 * @syscap SystemCapability.ArkUI.ArkUI.Full 109 * @since 7 110 */ 111 /** 112 * Corner radius of the rectangle. 113 * 114 * @type { ?(number | string | Array<any>) } 115 * @syscap SystemCapability.ArkUI.ArkUI.Full 116 * @form 117 * @since 9 118 */ 119 /** 120 * Corner radius of the rectangle. 121 * 122 * @type { ?(number | string | Array<any>) } 123 * @syscap SystemCapability.ArkUI.ArkUI.Full 124 * @crossplatform 125 * @form 126 * @since 10 127 */ 128 /** 129 * Corner radius of the rectangle. 130 * 131 * @type { ?(number | string | Array<any>) } 132 * @syscap SystemCapability.ArkUI.ArkUI.Full 133 * @crossplatform 134 * @form 135 * @atomicservice 136 * @since 11 137 */ 138 radius?: number | string | Array<any>; 139} 140 141/** 142 * Define options used to construct a rectangle with rounded corners. 143 * 144 * @interface RoundedRectOptions 145 * @syscap SystemCapability.ArkUI.ArkUI.Full 146 * @crossplatform 147 * @form 148 * @atomicservice 149 * @since 14 150 */ 151declare interface RoundedRectOptions { 152 /** 153 * Rectangle width. 154 * 155 * @type { ?(number | string) } 156 * @syscap SystemCapability.ArkUI.ArkUI.Full 157 * @since 7 158 */ 159 /** 160 * Rectangle width. 161 * 162 * @type { ?(number | string) } 163 * @syscap SystemCapability.ArkUI.ArkUI.Full 164 * @form 165 * @since 9 166 */ 167 /** 168 * Rectangle width. 169 * 170 * @type { ?(number | string) } 171 * @syscap SystemCapability.ArkUI.ArkUI.Full 172 * @crossplatform 173 * @form 174 * @since 10 175 */ 176 /** 177 * Rectangle width. 178 * 179 * @type { ?(number | string) } 180 * @syscap SystemCapability.ArkUI.ArkUI.Full 181 * @crossplatform 182 * @form 183 * @atomicservice 184 * @since 11 185 */ 186 width?: number | string; 187 188 /** 189 * Rectangle height. 190 * 191 * @type { ?(number | string) } 192 * @syscap SystemCapability.ArkUI.ArkUI.Full 193 * @since 7 194 */ 195 /** 196 * Rectangle height. 197 * 198 * @type { ?(number | string) } 199 * @syscap SystemCapability.ArkUI.ArkUI.Full 200 * @form 201 * @since 9 202 */ 203 /** 204 * Rectangle height. 205 * 206 * @type { ?(number | string) } 207 * @syscap SystemCapability.ArkUI.ArkUI.Full 208 * @crossplatform 209 * @form 210 * @since 10 211 */ 212 /** 213 * Rectangle height. 214 * 215 * @type { ?(number | string) } 216 * @syscap SystemCapability.ArkUI.ArkUI.Full 217 * @crossplatform 218 * @form 219 * @atomicservice 220 * @since 11 221 */ 222 height?: number | string; 223 224 /** 225 * Width of the corner radius. 226 * 227 * @type { ?(number | string) } 228 * @syscap SystemCapability.ArkUI.ArkUI.Full 229 * @since 7 230 */ 231 /** 232 * Width of the corner radius. 233 * 234 * @type { ?(number | string) } 235 * @syscap SystemCapability.ArkUI.ArkUI.Full 236 * @form 237 * @since 9 238 */ 239 /** 240 * Width of the corner radius. 241 * 242 * @type { ?(number | string) } 243 * @syscap SystemCapability.ArkUI.ArkUI.Full 244 * @crossplatform 245 * @form 246 * @since 10 247 */ 248 /** 249 * Width of the corner radius. 250 * 251 * @type { ?(number | string) } 252 * @syscap SystemCapability.ArkUI.ArkUI.Full 253 * @crossplatform 254 * @form 255 * @atomicservice 256 * @since 11 257 */ 258 radiusWidth?: number | string; 259 260 /** 261 * Height of the corner radius. 262 * 263 * @type { ?(number | string) } 264 * @syscap SystemCapability.ArkUI.ArkUI.Full 265 * @since 7 266 */ 267 /** 268 * Height of the corner radius. 269 * 270 * @type { ?(number | string) } 271 * @syscap SystemCapability.ArkUI.ArkUI.Full 272 * @form 273 * @since 9 274 */ 275 /** 276 * Height of the corner radius. 277 * 278 * @type { ?(number | string) } 279 * @syscap SystemCapability.ArkUI.ArkUI.Full 280 * @crossplatform 281 * @form 282 * @since 10 283 */ 284 /** 285 * Height of the corner radius. 286 * 287 * @type { ?(number | string) } 288 * @syscap SystemCapability.ArkUI.ArkUI.Full 289 * @crossplatform 290 * @form 291 * @atomicservice 292 * @since 11 293 */ 294 radiusHeight?: number | string; 295} 296 297/** 298 * Provides an interface for drawing rectangles. 299 * 300 * @interface RectInterface 301 * @syscap SystemCapability.ArkUI.ArkUI.Full 302 * @since 7 303 */ 304/** 305 * Provides an interface for drawing rectangles. 306 * 307 * @interface RectInterface 308 * @syscap SystemCapability.ArkUI.ArkUI.Full 309 * @form 310 * @since 9 311 */ 312/** 313 * Provides an interface for drawing rectangles. 314 * 315 * @interface RectInterface 316 * @syscap SystemCapability.ArkUI.ArkUI.Full 317 * @crossplatform 318 * @form 319 * @since 10 320 */ 321/** 322 * Provides an interface for drawing rectangles. 323 * 324 * @interface RectInterface 325 * @syscap SystemCapability.ArkUI.ArkUI.Full 326 * @crossplatform 327 * @form 328 * @atomicservice 329 * @since 11 330 */ 331interface RectInterface { 332 /** 333 * Use new function to create Rect. 334 * 335 * @param { object } value 336 * @returns { RectAttribute } 337 * @syscap SystemCapability.ArkUI.ArkUI.Full 338 * @since 7 339 */ 340 /** 341 * Use new function to create Rect. 342 * 343 * @param { object } value 344 * @returns { RectAttribute } 345 * @syscap SystemCapability.ArkUI.ArkUI.Full 346 * @form 347 * @since 9 348 */ 349 /** 350 * Use new function to create Rect. 351 * 352 * @param { object } value 353 * @returns { RectAttribute } 354 * @syscap SystemCapability.ArkUI.ArkUI.Full 355 * @crossplatform 356 * @form 357 * @since 10 358 */ 359 /** 360 * Use new function to create Rect. 361 * 362 * @param { object } value 363 * @returns { RectAttribute } 364 * @syscap SystemCapability.ArkUI.ArkUI.Full 365 * @crossplatform 366 * @form 367 * @atomicservice 368 * @since 11 369 */ 370 /** 371 * Use new function to create Rect. 372 * 373 * @param { RectOptions | RoundedRectOptions } [options] - Rect options 374 * @returns { RectAttribute } 375 * @syscap SystemCapability.ArkUI.ArkUI.Full 376 * @crossplatform 377 * @form 378 * @atomicservice 379 * @since 14 380 */ 381 new ( 382 options?: RectOptions | RoundedRectOptions, 383 ): RectAttribute; 384 385 /** 386 * Called when a rectangle is created. 387 * 388 * @param { {width?: number | string;height?: number | string;radius?: number | string | Array<any>;} | 389 * {width?: number | string;height?: number | string;radiusWidth?: number | string;radiusHeight?: number | string;} } value 390 * @returns { RectAttribute } 391 * @syscap SystemCapability.ArkUI.ArkUI.Full 392 * @since 7 393 */ 394 /** 395 * Called when a rectangle is created. 396 * 397 * @param { {width?: number | string;height?: number | string;radius?: number | string | Array<any>;} | 398 * {width?: number | string;height?: number | string;radiusWidth?: number | string;radiusHeight?: number | string;} } value 399 * @returns { RectAttribute } 400 * @syscap SystemCapability.ArkUI.ArkUI.Full 401 * @form 402 * @since 9 403 */ 404 /** 405 * Called when a rectangle is created. 406 * 407 * @param { {width?: number | string;height?: number | string;radius?: number | string | Array<any>;} | 408 * {width?: number | string;height?: number | string;radiusWidth?: number | string;radiusHeight?: number | string;} } value 409 * @returns { RectAttribute } 410 * @syscap SystemCapability.ArkUI.ArkUI.Full 411 * @crossplatform 412 * @form 413 * @since 10 414 */ 415 /** 416 * Called when a rectangle is created. 417 * 418 * @param { {width?: number | string;height?: number | string;radius?: number | string | Array<any>;} | 419 * {width?: number | string;height?: number | string;radiusWidth?: number | string;radiusHeight?: number | string;} } value 420 * @returns { RectAttribute } 421 * @syscap SystemCapability.ArkUI.ArkUI.Full 422 * @crossplatform 423 * @form 424 * @atomicservice 425 * @since 11 426 */ 427 /** 428 * Called when a rectangle is created. 429 * 430 * @param { RectOptions | RoundedRectOptions } [options] - Rect options 431 * @returns { RectAttribute } 432 * @syscap SystemCapability.ArkUI.ArkUI.Full 433 * @crossplatform 434 * @form 435 * @atomicservice 436 * @since 14 437 */ 438 ( 439 options?: RectOptions | RoundedRectOptions, 440 ): RectAttribute; 441} 442 443/** 444 * rect attribute declaration. 445 * 446 * @extends CommonShapeMethod<RectAttribute> 447 * @syscap SystemCapability.ArkUI.ArkUI.Full 448 * @since 7 449 */ 450/** 451 * rect attribute declaration. 452 * 453 * @extends CommonShapeMethod<RectAttribute> 454 * @syscap SystemCapability.ArkUI.ArkUI.Full 455 * @form 456 * @since 9 457 */ 458/** 459 * rect attribute declaration. 460 * 461 * @extends CommonShapeMethod<RectAttribute> 462 * @syscap SystemCapability.ArkUI.ArkUI.Full 463 * @crossplatform 464 * @form 465 * @since 10 466 */ 467/** 468 * rect attribute declaration. 469 * 470 * @extends CommonShapeMethod<RectAttribute> 471 * @syscap SystemCapability.ArkUI.ArkUI.Full 472 * @crossplatform 473 * @form 474 * @atomicservice 475 * @since 11 476 */ 477declare class RectAttribute extends CommonShapeMethod<RectAttribute> { 478 /** 479 * Called when the fillet width is set. 480 * 481 * @param { number | string } value 482 * @returns { RectAttribute } 483 * @syscap SystemCapability.ArkUI.ArkUI.Full 484 * @since 7 485 */ 486 /** 487 * Called when the fillet width is set. 488 * 489 * @param { number | string } value 490 * @returns { RectAttribute } 491 * @syscap SystemCapability.ArkUI.ArkUI.Full 492 * @form 493 * @since 9 494 */ 495 /** 496 * Called when the fillet width is set. 497 * 498 * @param { number | string } value 499 * @returns { RectAttribute } 500 * @syscap SystemCapability.ArkUI.ArkUI.Full 501 * @crossplatform 502 * @form 503 * @since 10 504 */ 505 /** 506 * Called when the fillet width is set. 507 * 508 * @param { number | string } value 509 * @returns { RectAttribute } 510 * @syscap SystemCapability.ArkUI.ArkUI.Full 511 * @crossplatform 512 * @form 513 * @atomicservice 514 * @since 11 515 */ 516 radiusWidth(value: number | string): RectAttribute; 517 518 /** 519 * Called when the fillet height is set. 520 * 521 * @param { number | string } value 522 * @returns { RectAttribute } 523 * @syscap SystemCapability.ArkUI.ArkUI.Full 524 * @since 7 525 */ 526 /** 527 * Called when the fillet height is set. 528 * 529 * @param { number | string } value 530 * @returns { RectAttribute } 531 * @syscap SystemCapability.ArkUI.ArkUI.Full 532 * @form 533 * @since 9 534 */ 535 /** 536 * Called when the fillet height is set. 537 * 538 * @param { number | string } value 539 * @returns { RectAttribute } 540 * @syscap SystemCapability.ArkUI.ArkUI.Full 541 * @crossplatform 542 * @form 543 * @since 10 544 */ 545 /** 546 * Called when the fillet height is set. 547 * 548 * @param { number | string } value 549 * @returns { RectAttribute } 550 * @syscap SystemCapability.ArkUI.ArkUI.Full 551 * @crossplatform 552 * @form 553 * @atomicservice 554 * @since 11 555 */ 556 radiusHeight(value: number | string): RectAttribute; 557 558 /** 559 * Called when the fillet size is set. 560 * 561 * @param { number | string | Array<any> } value 562 * @returns { RectAttribute } 563 * @syscap SystemCapability.ArkUI.ArkUI.Full 564 * @since 7 565 */ 566 /** 567 * Called when the fillet size is set. 568 * 569 * @param { number | string | Array<any> } value 570 * @returns { RectAttribute } 571 * @syscap SystemCapability.ArkUI.ArkUI.Full 572 * @form 573 * @since 9 574 */ 575 /** 576 * Called when the fillet size is set. 577 * 578 * @param { number | string | Array<any> } value 579 * @returns { RectAttribute } 580 * @syscap SystemCapability.ArkUI.ArkUI.Full 581 * @crossplatform 582 * @form 583 * @since 10 584 */ 585 /** 586 * Called when the fillet size is set. 587 * 588 * @param { number | string | Array<any> } value 589 * @returns { RectAttribute } 590 * @syscap SystemCapability.ArkUI.ArkUI.Full 591 * @crossplatform 592 * @form 593 * @atomicservice 594 * @since 11 595 */ 596 radius(value: number | string | Array<any>): RectAttribute; 597} 598 599/** 600 * Defines Rect Component. 601 * 602 * @syscap SystemCapability.ArkUI.ArkUI.Full 603 * @form 604 * @since 9 605 */ 606/** 607 * Defines Rect Component. 608 * 609 * @syscap SystemCapability.ArkUI.ArkUI.Full 610 * @crossplatform 611 * @form 612 * @since 10 613 */ 614/** 615 * Defines Rect Component. 616 * 617 * @syscap SystemCapability.ArkUI.ArkUI.Full 618 * @crossplatform 619 * @form 620 * @atomicservice 621 * @since 11 622 */ 623declare const Rect: RectInterface; 624 625/** 626 * Rect attribute. 627 * 628 * @syscap SystemCapability.ArkUI.ArkUI.Full 629 * @since 7 630 * @deprecated since 9 631 */ 632declare const RectInStance: RectAttribute; 633 634/** 635 * Rect attribute. 636 * 637 * @syscap SystemCapability.ArkUI.ArkUI.Full 638 * @form 639 * @since 9 640 */ 641/** 642 * @syscap SystemCapability.ArkUI.ArkUI.Full 643 * @crossplatform 644 * @form 645 * @since 10 646 */ 647/** 648 * @syscap SystemCapability.ArkUI.ArkUI.Full 649 * @crossplatform 650 * @form 651 * @atomicservice 652 * @since 11 653 */ 654declare const RectInstance: RectAttribute; 655