https://bugs.documentfoundation.org/show_bug.cgi?id=90027
--- Comment #13 from Vincent Boudry <[email protected]> --- (In reply to Stéphane Guillou (stragu) from comment #12) > (In reply to Heiko Tietze from comment #11) > > (In reply to Stéphane Guillou (stragu) from comment #10) > > > - Total path length = 8 cm > > > > My point was that we actually show all information and I wonder if the > > simple math is worth all the effort. > > > > But no objection to a statistics dialog similar to Writer. > > It's simple maths for a 1 × 1 square but not for (groups of) more complex > shapes. > And we show some information for the selection rectangle, not for the > objects. It is rather simple for regular "non self-intersecting" forms, see e.g.: https://www.wikihow.com/Calculate-the-Area-of-a-Polygon, based on https://www.mathopenref.com/polygonregulararea.html and https://www.mathsisfun.com/geometry/area-irregular-polygons.html in the later there is even a interactive tool to calculate this: https://www.mathsisfun.com/geometry/area-polygon-drawing.html. For self-intersecting polygons, this is more tricky. I guess the easiest is to split them in two separate polygons. This is properly handled for the drawing of filled polygons (see attachment). Beyond precise calculations, there are also a very nice way of calculating on integer coordinates, covering all cases: https://en.wikipedia.org/wiki/Pick's_theorem that could be used if the coordinates are quantized with a reasonable large step. -- You are receiving this mail because: You are the assignee for the bug.
