SvgPathProperties 1.1.2

dotnet add package SvgPathProperties --version 1.1.2
NuGet\Install-Package SvgPathProperties -Version 1.1.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SvgPathProperties" Version="1.1.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SvgPathProperties --version 1.1.2
#r "nuget: SvgPathProperties, 1.1.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SvgPathProperties as a Cake Addin
#addin nuget:?package=SvgPathProperties&version=1.1.2

// Install SvgPathProperties as a Cake Tool
#tool nuget:?package=SvgPathProperties&version=1.1.2

SvgPathProperties

Pure C# SVG Path parser and calculations.

NuGet Package Version Download
SvgPathProperties NuGet Nuget

Features

  • Parse SVG into class commands (Segments)
  • Calculate the total length of a path (equivalent to getTotalLength)
  • Get point at length (equivalent to getPointAtLength)
  • Calculate bbox of a path (equivalent to getBBox)
  • Fluent API to build a path
  • Generate string path from the added commands

Usage

var properties = new SvgPath("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>
var bbox = properties.GetBBox(); // Rect

new SvgPath("M 15 10 L 35 10")
    .AddVerticalLineTo(15)
    .AddHorizontalLineTo(40)
    .AddCubicBezierCurve(50, 5, 60, 15, 50, 25)
    .AddSmoothCubicBezierCurve(40, 20, 35, 30)
    .AddQuadraticBezierCurve(25, 40, 15, 30)
    .AddSmoothQuadraticBezierCurve(5, 15)
    .AddArc(1, 1, 0, false, false, 5, 5, unarc: true)
    .AddClosePath()
    .ToString();

// M 15 10 L 35 10
// L 35 15
// L 40 15
// C 50 5 60 15 50 25
// C 40 35 40 20 35 30
// Q 25 40 15 30
// Q 5 20 5 15
// C 7.761423749153967 15 10 12.761423749153966 10 10
// C 10 7.238576250846034 7.761423749153967 5 5 5
// Z

Credits

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on SvgPathProperties:

Package Downloads
Z.Blazor.Diagrams.Core

A fully customizable and extensible all-purpose diagrams library for Blazor

MyNihongo.KanjiVG.Animation The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Create animated KanjiVG

AIStudio.Wpf.DiagramDesigner

一个Wpf的Diagram控件基础库

AyBorg.Diagrams

Specialized Blazor Diagrams for AyBorg

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on SvgPathProperties:

Repository Stars
Blazor-Diagrams/Blazor.Diagrams
A fully customizable and extensible all-purpose diagrams library for Blazor
Version Downloads Last updated
1.1.2 100,969 9/6/2022
1.1.1 1,768 8/23/2022
1.1.0 410 8/23/2022
1.0.0 556,231 1/28/2021