Skip to content

daltonks/Spillman.SkiaSharp.PathFitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Spillman.SkiaSharp.PathFitter

NuGet BitmapToVector

Recreation of the Path.simplify() method from paper.js for SkiaSharp

Example

// Calculate CubicBezierSegments from SKPoints
var points = new [] { new SKPoint(0, 1), new SKPoint (2, 3), new SKPoint(4, 5) };
var isClosed = false;
var error = 2.5;

var pathFitter = new PathFitter(points, isClosed);
var segments = pathFitter.Fit(error);

// Apply CubicBezierSegments to an SKPath
var path = new SKPath();
path.AddCubicSegments(segments, isClosed);

// Extract CubicBezierSegments from an SKPath
segments = path.GetCubicSegments();

About

SkiaSharp-based port of the Path.simplify() method from paper.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages