react-image-annotation icon indicating copy to clipboard operation
react-image-annotation copied to clipboard

How does the coordinate format work

Open KristofferTolboll2 opened this issue 5 years ago • 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

KristofferTolboll2 avatar Mar 12 '20 14:03 KristofferTolboll2

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

M-Bekheet avatar Jul 21 '22 06:07 M-Bekheet