SkiaSharp.SKPath Class

A compound geometric path.

See Also: SKPath

Syntax

public class SKPath : SKObject

Remarks

A path encapsulates compound (multiple contour) geometric paths consisting of straight line segments, quadratic curves, and cubic curves.

Requirements

Namespace: SkiaSharp
Assembly: SkiaSharp (in SkiaSharp.dll)
Assembly Versions: 1.0.0.0, 1.49.0.0, 1.52.0.0, 1.53.0.0, 1.54.0.0, 1.54.0.0, 1.55.0.0, 1.56.0.0, 1.57.0.0, 1.58.0.0, 1.59.0.0

The members of SkiaSharp.SKPath are listed below.

See Also: SKObject

Public Constructors

Creates an empty path.
Creates a path by making a copy of an existing path

Public Properties

[read-only]
BoundsSKRect. Gets the bounds of the path's points. If the path contains zero points/verbs, this will return the empty rectangle.
ConvexitySKPathConvexity. Gets or sets the path's convexity.
FillTypeSKPathFillType. Gets or sets the path's fill type.
[read-only]
IsConcaveBoolean. Gets a value indicating whether the path is concave.
[read-only]
IsConvexBoolean. Gets a value indicating whether the path is convex.
[read-only]
IsEmptyBoolean. Gets a value indicating whether or not the path is empty (contains no lines or curves).
[read-only]
default property
Item(Int32)SKPoint. Gets the point at the specified index.
[read-only]
LastPointSKPoint. Return the last point on the path. If no points have been added, (0, 0) is returned.
[read-only]
PointCountInt32. Gets the number of points on the path.
[read-only]
PointsSKPoint[]. Gets all the points in the path.
[read-only]
SegmentMasksSKPathSegmentMask. Gets a set of flags indicating if the path contains one or more segments of that type.
[read-only]
TightBoundsSKRect. Gets the “tight” bounds of the path. Unlike SKPath.Bounds, the control points of curves are excluded.
[read-only]
VerbCountInt32. Gets the number of verbs in the path.

Public Methods

AddArc(SKRect, Single, Single)
Adds the specified arc to the path as a new contour.
AddCircle(Single, Single, Single, SKPathDirection)
Adds a closed circle contour to the path.
AddOval(SKRect, SKPathDirection)
Adds a closed oval contour to the path.
AddPath(SKPath, SKPath+AddMode)
Extends the current path with the path elements from another path, using the specified extension mode.
AddPath(SKPath, SKPathAddMode)
Extends the current path with the path elements from another path, using the specified extension mode.
AddPath(SKPath, ref SKMatrix, SKPath+AddMode)
Extends the current path with the path elements from another path, by applying the specified transformation matrix, using the specified extension mode.
AddPath(SKPath, ref SKMatrix, SKPathAddMode)
Extends the current path with the path elements from another path, by applying the specified transformation matrix, using the specified extension mode.
AddPath(SKPath, Single, Single, SKPath+AddMode)
Extends the current path with the path elements from another path offset by (dxdy), using the specified extension mode.
AddPath(SKPath, Single, Single, SKPathAddMode)
Extends the current path with the path elements from another path offset by (dxdy), using the specified extension mode.
AddPathReverse(SKPath)
Extends the current path with the path elements from another path in reverse order.
AddPoly(SKPoint[], Boolean)
Adds a new contour made of just lines.
AddRect(SKRect, SKPathDirection)
Adds a closed rectangle contour to the path.
AddRect(SKRect, SKPathDirection, UInt32)
Adds a closed rectangle contour to the path.
AddRoundedRect(SKRect, Single, Single, SKPathDirection)
Adds a closed rectangle with rounded corners to the current path.
ArcTo(SKPoint, SKPoint, Single)
Appends a line and arc to the current path.
ArcTo(SKRect, Single, Single, Boolean)
Appends the specified arc to the path.
ArcTo(SKPoint, Single, SKPathArcSize, SKPathDirection, SKPoint)
Appends an elliptical arc from the current point in the format used by SVG.
ArcTo(Single, Single, Single, Single, Single)
Appends a line and arc to the current path.
ArcTo(Single, Single, Single, SKPathArcSize, SKPathDirection, Single, Single)
Appends an elliptical arc from the current point in the format used by SVG.
Close()
Closes the current contour.
ComputeTightBounds() : SKRect
Computes a bounds that is conservatively "snug" around the path.
ConicTo(SKPoint, SKPoint, Single)
Add a conic path from the last point.
ConicTo(Single, Single, Single, Single, Single)
Add a conic path from the last point.
Contains(Single, Single) : Boolean
Returns true if the point (x, y) is contained by the path, taking into account the SKPath.FillType.
static
ConvertConicToQuads(SKPoint, SKPoint, SKPoint, Single, Int32) : SKPoint[]
Chop a conic into a number of quads.
static
ConvertConicToQuads(SKPoint, SKPoint, SKPoint, Single, out SKPoint[], Int32) : Int32
Chop a conic into a number of quads.
static
ConvertConicToQuads(SKPoint, SKPoint, SKPoint, Single, SKPoint[], Int32) : Int32
Chop a conic into a number of quads.
CreateIterator(Boolean) : SKPath+Iterator
Creates an iterator object to scan the all of the segments (lines, quadratics, cubics) of each contours in a path.
CreateRawIterator() : SKPath+RawIterator
Creates a raw iterator object to scan the all of the segments (lines, quadratics, cubics) of each contours in a path.
CubicTo(SKPoint, SKPoint, SKPoint)
Adds a cubic bezier from the last point.
CubicTo(Single, Single, Single, Single, Single, Single)
Adds a cubic bezier from the last point.
GetBounds(out SKRect) : Boolean
Returns the bounds of the path's points.
GetPoint(Int32) : SKPoint
Returns the point at the specified index.
GetPoints(Int32) : SKPoint[]
Returns a subset of points in the path. Up to max points are copied.
GetPoints(SKPoint[], Int32) : Int32
Returns a subset of points in the path. Up to max points are copied.
GetTightBounds(out SKRect) : Boolean
Gets the “tight” bounds of the path. Unlike SKPath.GetBounds, the control points of curves are excluded.
LineTo(SKPoint)
Add a line from the last point to the specified point (x, y).
LineTo(Single, Single)
Add a line from the last point to the specified point (x, y).
MoveTo(SKPoint)
Set the beginning of the next contour to the point.
MoveTo(Single, Single)
Set the beginning of the next contour to the point.
Offset(SKPoint)
Set the beginning of the next contour to the point.
Offset(Single, Single)
Offset the path by the specifid distance.
Op(SKPath, SKPathOp) : SKPath
Compute the result of a logical operation on two paths.
Op(SKPath, SKPathOp, SKPath) : Boolean
Compute the result of a logical operation on two paths.
static
ParseSvgPathData(String) : SKPath
Creates a path based on the SVG path data string.
QuadTo(SKPoint, SKPoint)
Add a quadratic bezier from the last point.
QuadTo(Single, Single, Single, Single)
Add a quadratic bezier from the last point.
RArcTo(SKPoint, Single, SKPathArcSize, SKPathDirection, SKPoint)
The same as SKPath.ArcTo, but the coordinates are considered relative to the last point on this contour.
RArcTo(Single, Single, Single, SKPathArcSize, SKPathDirection, Single, Single)
The same as SKPath.ArcTo, but the coordinates are considered relative to the last point on this contour.
RConicTo(SKPoint, SKPoint, Single)
Same as SKPath.ConicTo but the coordinates are considered relative to the last point on this contour.
RConicTo(Single, Single, Single, Single, Single)
Same as SKPath.ConicTo but the coordinates are considered relative to the last point on this contour.
RCubicTo(SKPoint, SKPoint, SKPoint)
Same as SKPath.CubicTo but the coordinates are considered relative to the last point on this contour.
RCubicTo(Single, Single, Single, Single, Single, Single)
Same as SKPath.CubicTo but the coordinates are considered relative to the last point on this contour.
Reset()
Clear any lines and curves from the path, making it empty.
Rewind()
Clear any lines and curves from the path, making it empty.
RLineTo(SKPoint)
Same as SKPath.LineTo but the coordinates are considered relative to the last point on this contour.
RLineTo(Single, Single)
Same as SKPath.LineTo but the coordinates are considered relative to the last point on this contour.
RMoveTo(SKPoint)
Same as SKPath.MoveTo but the coordinates are considered relative to the last point on this contour.
RMoveTo(Single, Single)
Same as SKPath.MoveTo but the coordinates are considered relative to the last point on this contour.
RQuadTo(SKPoint, SKPoint)
Same as SKPath.QuadTo but the coordinates are considered relative to the last point on this contour.
RQuadTo(Single, Single, Single, Single)
Same as SKPath.QuadTo but the coordinates are considered relative to the last point on this contour.
Simplify() : SKPath
Return a simplified copy of the current path.
Simplify(SKPath) : Boolean
Simplifies the current path.
ToSvgPathData() : String
Returns a SVG path data representation of the current path.
Transform(SKMatrix)
Applies a transformation matrix to the all the elements in the path.

Protected Methods

override
Dispose(Boolean)