Replies: 3 comments
-
I think if I limit that elments can be only in Bounding Box area, then it would be easier to count the size. |
Beta Was this translation helpful? Give feedback.
-
Measuring the area geometrically is going to be a difficult task, particularly if you're having to account for multiple objects overlapping each other. The way I would approach it would be to render an off-screen canvas with a white background, then draw a black rectangle in the size and orientation of each object. Then just do a loop of each pixel in your canvas counting the the ratio of black pixels to white pixels. Not the most elegant solution but I'd guess it would be accurate enough to use for price calculation. |
Beta Was this translation helpful? Give feedback.
-
Some ideas what you can search for: |
Beta Was this translation helpful? Give feedback.
-
Hi.
I need to count % percentage of all objects inside bounding box.
With element coordinates it difficult, because object can be rotates. And so on..
Any ideas how to do that? O any person who can help/develop?
I use: WordPress Fancy Product Designer plugin, which uses Fabric.js
I need pricing by used area in Bounding Box.
Beta Was this translation helpful? Give feedback.
All reactions