title: How to calculate the area of an SVG path c#
body: <p>If anyone can help with calculating the area of an SVG path I would be very grateful.</p>
  
  <p>I have a function to get the total length which works really well.</p>
  
  <p>I've seen a javascript method that converts the path in to a polygon:</p>
  
  <p><a href="http://phrogz.net/SVG/convert_path_to_polygon.xhtml" rel="nofollow">http://phrogz.net/SVG/convert_path_to_polygon.xhtml</a></p>
  
  <p>Converting this to c# would be a good route as I have a function that gets the area of a polygon to a sufficient accuracy.</p>
  
  <p>Regards</p>
  
  <p>If there's any doubt as to what's being asked here......</p>
  
  <p>If you know anything about the SVG file format, you'll know that SVG Path shapes are defined by a bunch of coordinates like this:</p>
  
  <pre><code>d="M195.303,64.357 c6.57-6.684,11.9-15.514,10.057-25.154 c-3.689-19.298-27.854-13.204-27.309-0.549 c-0.545-12.655-23.619-18.749-27.309,0.549                c-1.844,9.651,3.502,18.401,10.082,25.087 c1.697-4.813,5.713-8.03,11.482-9.451 c-2.797,1.531-3.809,4.396-3.809,7.812 c0,4.983,4.58,8.4,9.553,8.4s9.553-3.417,9.553-8.4c0-3.416-1.012-6.28-3.807-7.812C189.584,56.263,193.613,59.52,195.303,64.357 z"
  </code></pre>
  
  <p>c and C define bezier curves</p>
  
  <p>(would have posted the image)</p>
  
  <p>What I am asking is how to calculate the area for such a shape using the coordinates/curve points.</p>
  
  <p>The solution using IronPython and the Inkscape function works really well.</p>