Home > SCH_PrimitiveRectangle > create
SCH_PrimitiveRectangle.create() method
创建矩形
Signature
typescript
create(topLeftX: number, topLeftY: number, width: number, height: number, cornerRadius?: number, rotation?: number, color?: string | null, fillColor?: string | null, lineWidth?: number | null, lineType?: number | null): Promise<ISCH_PrimitiveRectangle | undefined>;
1
Parameters
Parameter | Type | Description |
---|---|---|
topLeftX | number | 左上点 X |
topLeftY | number | 左上点 Y |
width | number | 宽 |
height | number | 高 |
cornerRadius | number | (Optional) 圆角半径 |
rotation | number | (Optional) 旋转角度,绕左上点旋转,可选 |
color | string | null | (Optional) 颜色, |
fillColor | string | null | (Optional) 填充颜色, |
lineWidth | number | null | (Optional) 线宽,范围 |
lineType | number | null | (Optional) 线型, |
Returns
Promise<ISCH_PrimitiveRectangle | undefined>
矩形图元对象