Calculate the length and area of โ€‹โ€‹SVG shapes with transforms

I am working on a .NET project. I need to calculate the length and area of โ€‹โ€‹shapes in an SVG file.

There are two difficulties:

a) Bezier curves - it seems that the formula is not trivial

and

b) transforms - before performing the calculation, I must apply all the transformations

Can anyone recommend a library that performs geometric calculations in SVG files? Can anyone recommend code that applies transforms to SVG files and returns the source values โ€‹โ€‹for each point in each form?

+3
source share
2 answers

For Bezier curves, you can calculate the length by converting the curve into line segments. You can use the algorithm defined by DeCastelJau. algorithm as

+1

- SVG - "SVG-Edit", ( )

, SVG-Edit , , , .

0

All Articles