1/* 2 * Copyright (c) 2021 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 * Provides an interface for drawing rectangles. 18 * @since 7 19 */ 20interface RectInterface { 21 /** 22 * Use new function to create Rect. 23 * @since 7 24 */ 25 new ( 26 value?: 27 { 28 width?: number | string; 29 height?: number | string; 30 radius?: number | string | Array<any>; 31 } 32 | { 33 width?: number | string; 34 height?: number | string; 35 radiusWidth?: number | string; 36 radiusHeight?: number | string; 37 }, 38 ): RectAttribute; 39 40 /** 41 * Called when a rectangle is created. 42 * @since 7 43 */ 44 ( 45 value?: 46 { 47 width?: number | string; 48 height?: number | string; 49 radius?: number | string | Array<any>; 50 } 51 | { 52 width?: number | string; 53 height?: number | string; 54 radiusWidth?: number | string; 55 radiusHeight?: number | string; 56 }, 57 ): RectAttribute; 58} 59 60/** 61 * @since 7 62 */ 63declare class RectAttribute extends CommonShapeMethod<RectAttribute> { 64 /** 65 * Called when the fillet width is set. 66 * @since 7 67 */ 68 radiusWidth(value: number | string): RectAttribute; 69 70 /** 71 * Called when the fillet height is set. 72 * @since 7 73 */ 74 radiusHeight(value: number | string): RectAttribute; 75 76 /** 77 * Called when the fillet size is set. 78 * @since 7 79 */ 80 radius(value: number | string | Array<any>): RectAttribute; 81} 82 83declare const Rect: RectInterface; 84declare const RectInStance: RectAttribute; 85