Skip to content

Pure C# SVG path functions (getTotalLength() and getPointAtLength())

License

Notifications You must be signed in to change notification settings

diogo-strube/SvgPathProperties

 
 

Repository files navigation

SvgPathProperties

Pure C# SVG path functions (getTotalLength() and getPointAtLength()). This was mainly created to save some JS Calls in Blazor, but it's a .netstandard 2 library so you can use it anywhere.

This is a port (code & unit tests) of the JavaScript version: https://github.com/rveciana/svg-path-properties

NuGet Package Version Download
SvgPathProperties NuGet Nuget

Usage

var properties = new SVGPathProperties("M0,100 Q50,-50 100,100 T200,100");
var length = properties.GetTotalLength(); // double
var point = properties.GetPointAtLength(200); // Point
var tangent = properties.GetTangentAtLength(200); // Point
var allProperties = properties.GetPropertiesAtLength(200); // PointProperties
var parts = properties.GetParts(); // List<PartProperties>

About

Pure C# SVG path functions (getTotalLength() and getPointAtLength())

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%