@abidibo/react-cam-roi 0.2.4 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -30,6 +30,7 @@ npm install @abidibo/react-cam-roi
30
30
  ```ts
31
31
  import { RoiEditor, UiProvider, Types } from '@abidibo/react-cam-roi'
32
32
  import { Typography, IconButton, Delete } from '@mui/material'
33
+ import '@abidibo/react-cam-roi/dist/index.esm.css' // !Important you must include the css
33
34
 
34
35
  const MyComponent: React.FC = () => {
35
36
  const themMode = 'light'
@@ -93,6 +94,17 @@ export type OutputShapePolygon = {
93
94
  color: string
94
95
  }
95
96
 
97
+ export type OutputRectCoords = {
98
+ points: { x: number; y: number }[]
99
+ }
100
+
101
+ export type OutputPolylineCoords = {
102
+ points: { x: number; y: number }[]
103
+ }
104
+
105
+ export type OutputPolygonCoords = {
106
+ points: { x: number; y: number }[]
107
+ }
96
108
 
97
109
  export interface OutputParameter {
98
110
  codename: string
@@ -104,7 +116,8 @@ export interface OutputRoi {
104
116
  type: ShapeType
105
117
  name: string
106
118
  role: string
107
- shape: OutputShapeRect | OutputShapePolyline | OutputShapePolygon
119
+ shape: OutputShapeRect | OutputShapePolyline | OutputShapePolygon // fabric obj coords
120
+ coords: OutputRectCoords | OutputPolylineCoords | OutputPolygonCoords // canvas coords
108
121
  }
109
122
  export interface Output {
110
123
  parameters: OutputParameter[]