Home > SCH_PrimitiveRectangle > modify
SCH_PrimitiveRectangle.modify() method
修改矩形
Signature
typescript
modify(primitiveId: string | ISCH_PrimitiveRectangle, 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 |
---|---|---|
primitiveId | string | ISCH_PrimitiveRectangle | 图元 ID |
topLeftX | number | (Optional) 左上点 X |
topLeftY | number | (Optional) 左上点 Y |
width | number | (Optional) 宽 |
height | number | (Optional) 高 |
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>
矩形图元对象