Browse our Products

Aspose.SVG for .NET 22.9 Release Notes

Major Features

As per the regular monthly update process of all APIs being offered by Aspose, we are honored to announce the September release of Aspose.SVG for .NET:

We have

  • improved the algorithms of the Image Vectorization by adding a new approach to fitting Bezier curves, and also added a new feature for “stenciling” vectorized images;

  • added support for representing SVG graphic elements as a collection of path segments;

  • extended GlyphInfo structure with a new StringRepresentation  property.

Public API changes:

Added APIs:

BezierPathBuilder class

The BezierPathBuilder class is responsible for building path segments SVGPathSeg from list of the trace points. This path builder is based on using least-squares method to find Bezier control points for trace of points.

public class BezierPathBuilder : IPathBuilder
Constructors
NameDescription
BezierPathBuilder()Initializes a new instance of the BezierPathBuilder class.
Properties
NameDescription
ErrorThreshold { get; set; }Gets or sets the error threshold. This parameter defines maximum deviation of points to fitted curve. By default it is 30.
MaxIterations { get; set; }Gets or sets the error threshold. This parameter defines number of iteration for least-squares approximation method. By default it is 30.
TraceSmoother { get; set; }Gets or sets the trace smoother.
Methods
NameDescription
Build(IEnumerable<PointF>, SVGPathElement)Builds path segments from the list of the trace points.

SplinePathBuilder class

The SplinePathBuilder class is responsible for building path segments SVGPathSeg from list of the trace points. This path builder is based on applying a Catmull-Roma spline to a set of smoothed and reduced path points..

public class SplinePathBuilder : IPathBuilder
Constructors
NameDescription
SplinePathBuilder()Initializes a new instance of the SplinePathBuilder class.
SplinePathBuilder(float)Initializes a new instance of the SplinePathBuilder class.
SplinePathBuilder(IImageTraceSmoother, IImageTraceSimplifier, float)Initializes a new instance of the SplinePathBuilder class.
Properties
NameDescription
Tension { get; set; }The value of the tensions affects how sharply the curve bends at the (interpolated) control points. It must be in the range from 0 to 1. Any higher or lower values will be aligned with the minimum and maximum values of this range, accordingly.
TraceSimplifier { get; set; }Gets or sets the trace simplifier.
TraceSmoother { get; set; }Gets or sets the trace smoother.
Methods
NameDescription
Build(IEnumerable<PointF>, SVGPathElement)Builds path segments from the list of the trace points.

StencilConfiguration class

The StencilConfiguration class defines a configuration of stencil effect options.

public class StencilConfiguration
Constructors
NameDescription
StencilConfiguration()Initializes a new instance of the StencilConfiguration class.
Properties
NameDescription
Color { get; set; }Gets or sets the color for rendering stencil lines for the MonoColor type.
Type { get; set; }Gets or sets the StencilType.

StencilType enumeration

The StencilType enum defines stencil types.

public enum StencilType
Values
NameValueDescription
None0No any stencil effect applies.
MonoColor1Only one color is used for rendering stencil lines.
Auto2The colors for rendering stencil lines detects automatically.

ImageVectorizerConfiguration class

Properties
NameDescription
BackgroundColor { get; set; }Gets or sets background color. Default value is transparent white.
LineWidth { get; set; }Gets or sets the line width. The value of this parameter is affected by the graphics scale. Default value is 1.
Stencil { get; set; }Gets or sets stencil effect configuration. By default, no stencil effect is applied.

SVGGeometryElement class

Methods
NameDescription
GetEquivalentPath()Retruns a new instance instance of the SVGPathSegList represents SVGGeometryElement as path segments.

GlyphInfo structure

Properties

NameDescription
StringRepresentation { get; }Gets the string representation of this glyph.

Removed APIs:

ImageVectorizerConfiguration class

Properties
NameDescription
TraceSimplifier { get; set; }Gets or sets the trace simplifier.
TraceSmoother { get; set; }Gets or sets the trace smoother.