Class BezierPathBuilder

Class BezierPathBuilder

Namespace: Aspose.Svg.ImageVectorization
Assembly: Aspose.SVG.dll (25.5.0)

The Aspose.Svg.ImageVectorization.BezierPathBuilder class is responsible for constructing a Bezier path from a given set of points. It approximates a trace of points with a Bezier curve, optimizing the number of segments to closely match the original trace while minimizing complexity.

[ComVisible(true)]
public class BezierPathBuilder : IPathBuilder

Inheritance

object BezierPathBuilder

Implements

IPathBuilder

Inherited Members

object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Constructors

BezierPathBuilder()

Initializes a new instance of the Aspose.Svg.ImageVectorization.BezierPathBuilder class.

public BezierPathBuilder()

Properties

ErrorThreshold

Gets or sets the error threshold. This parameter defines maximum deviation of points to fitted curve. By default it is 30.

public float ErrorThreshold { get; set; }

Property Value

float

MaxIterations

Gets or sets the error threshold. This parameter defines number of iteration for least-squares approximation method. By default it is 30.

public int MaxIterations { get; set; }

Property Value

int

TraceSmoother

Gets or sets the trace smoother.

public IImageTraceSmoother TraceSmoother { get; set; }

Property Value

IImageTraceSmoother

Methods

Build(IEnumerable<pointf>)

Builds an optimized Bezier path from a sequence of trace points. The method approximates the given trace with a Bezier curve, using a combination of line and curve segments. It aims to minimize the number of segments while ensuring the path closely fits the original trace.

public string Build(IEnumerable<pointf> trace)

Parameters

trace IEnumerable < PointF &gt;

The sequence of points that define the trace to be approximated.

Returns

string

A string representing the SVG path data. This data consists of a series of commands and coordinates that define the Bezier path, closely approximating the input trace with minimized complexity. </pointf>

 English