RectCrop
RectCrop是Gesti内的框选矩形组件,它简单地实现了框选操作(类似裁剪但不是裁剪),并通过它的value获取被框选矩形数据。
Example
Properties(属性)
| 属性 | 类型 | 描述 |
|---|
| value | RectCropValue | 获取矩形框包裹参数 |
Methods(方法)
| 方法 | 类型 | 描述 |
|---|
| constructor | (option: RectCropOption) | 构造函数,参数 |
| setMaskColor | (maskColor: string) => void | 设置蒙版颜色 |
| setLineDashColor | (lineDashColor: string) => void | 设置线条颜色 |
| setCount | (count: number) => void | 设置线条等份数量 |
RectCropOption
| 属性 | 类型 | 描述 |
|---|
| width | number | 矩形框的宽度 |
| height | number | 矩形框的高度 |
| maskColor | string | 蒙版颜色 |
| lineDashColor | string | 线条颜色 |
| count | number | 线条等份数量 |
| lineDash | Iterable | 线条虚线样式 |
| lineWidth | number | 线条宽度 |
RectCropValue
| 属性 | 类型 | 描述 |
|---|
| sx | number | 横坐标起始位置 |
| sy | number | 纵坐标起始位置 |
| width | number | 宽度 |
| height | number | 高度 |