Secretmapper/react-image-annotation

How does the coordinate format work

Opened this issue · 1 comments

I was wondering regarding the geometry object i was wondering how the x,y,height, width was placed

Considering a rectangle are the height, and width the height of the actual bounding box? In the case, what does x and y represent?

image

I know this is late, but here it is if someone came by.

x, y, width, height are percentages of the rendered image.

actualWidth = (geometry.width / 100) * renderedImg.width

x & y values are the top right point coordinate's percentage of the annotation rectangle selection you created in the browser. x is a % of the actualWidth and y is a percentage of the actualHeight