편집

다음을 통해 공유


SKPath Class

Definition

A compound geometric path.

public class SKPath : SkiaSharp.SKObject
Inheritance

Remarks

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

Constructors

SKPath()

Creates an empty path.

SKPath(SKPath)

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

Properties

Bounds

Gets the bounds of the path's points. If the path contains zero points/verbs, this will return the empty rectangle.

Convexity
Obsolete.

Gets or sets the path's convexity.

FillType

Gets or sets the path's fill type.

Handle

Gets or sets the handle to the underlying native object.

(Inherited from SKObject)
IgnorePublicDispose

Gets or sets a value indicating whether the call the public Dispose() should be no-op.

(Inherited from SKNativeObject)
IsConcave

Gets a value indicating whether the path is concave.

IsConvex

Gets a value indicating whether the path is convex.

IsDisposed

Gets or sets a value indicating whether the object has already been disposed.

(Inherited from SKNativeObject)
IsEmpty

Gets a value indicating whether or not the path is empty (contains no lines or curves).

IsLine

Gets a value indicating whether the path is a single, straight line.

IsOval

Gets a value indicating whether the path is a single oval or circle.

IsRect

Gets a value indicating whether the path is a single rectangle.

IsRoundRect

Gets a value indicating whether the path is a single, round rectangle.

Item[Int32]

Gets the point at the specified index.

LastPoint

Return the last point on the path. If no points have been added, (0, 0) is returned.

OwnsHandle

Gets a value indicating whether this object should destroy the underlying native object.

(Inherited from SKObject)
PointCount

Gets the number of points on the path.

Points

Gets all the points in the path.

SegmentMasks

Gets a set of flags indicating if the path contains one or more segments of that type.

TightBounds

Gets the "tight" bounds of the path. Unlike Bounds, the control points of curves are excluded.

VerbCount

Gets the number of verbs in the path.

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, Single, Single, SKPathAddMode)

Extends the current path with the path elements from another path offset by (dx, dy), using the specified extension mode.

AddPath(SKPath, 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, SKPathAddMode)

Extends the current path with the path elements from another path, 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, UInt32)

Adds a closed rectangle contour to the path.

AddRect(SKRect, SKPathDirection)

Adds a closed rectangle contour to the path.

AddRoundedRect(SKRect, Single, Single, SKPathDirection)
Obsolete.

Adds a closed rectangle with rounded corners to the current path.

AddRoundRect(SKRect, Single, Single, SKPathDirection)

Adds a closed rectangle with rounded corners to the current path.

AddRoundRect(SKRoundRect, SKPathDirection, UInt32)

Adds a closed rectangle with rounded corners to the current path.

AddRoundRect(SKRoundRect, SKPathDirection)

Adds a closed rectangle with rounded corners to the current path.

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.

ArcTo(SKPoint, Single, SKPathArcSize, SKPathDirection, SKPoint)

Appends an elliptical arc from the current point in the format used by SVG.

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.

Close()

Closes the current contour.

ComputeTightBounds()

Computes a bounds that is conservatively "snug" around the path.

ConicTo(Single, Single, Single, Single, Single)

Add a conic path from the last point.

ConicTo(SKPoint, SKPoint, Single)

Add a conic path from the last point.

Contains(Single, Single)

Returns true if the point (x, y) is contained by the path, taking into account the FillType.

ConvertConicToQuads(SKPoint, SKPoint, SKPoint, Single, Int32)

Chop a conic into a number of quads.

ConvertConicToQuads(SKPoint, SKPoint, SKPoint, Single, SKPoint[], Int32)

Chop a conic into a number of quads.

ConvertConicToQuads(SKPoint, SKPoint, SKPoint, Single, SKPoint[], Int32)

Chop a conic into a number of quads.

CreateIterator(Boolean)

Creates an iterator object to scan the all of the segments (lines, quadratics, cubics) of each contours in a path.

CreateRawIterator()

Creates a raw iterator object to scan the all of the segments (lines, quadratics, cubics) of each contours in a path.

CubicTo(Single, Single, Single, Single, Single, Single)

Adds a cubic bezier from the last point.

CubicTo(SKPoint, SKPoint, SKPoint)

Adds a cubic bezier from the last point.

Dispose()

Releases all resources used by this SKNativeObject.

(Inherited from SKNativeObject)
Dispose(Boolean)

Releases the unmanaged resources used by the SKPath and optionally releases the managed resources.

DisposeInternal()

Triggers a dispose, ignoring the value of IgnorePublicDispose.

(Inherited from SKNativeObject)
DisposeManaged()

Implemented by derived SKObject types to destroy any managed objects.

(Inherited from SKObject)
DisposeNative()

Implemented by derived SKObject types to destroy any native objects.

DisposeNative()

Implemented by derived SKObject types to destroy any native objects.

(Inherited from SKObject)
DisposeUnownedManaged() (Inherited from SKObject)
GetBounds(SKRect)

Returns the bounds of the path's points.

GetLine()

Returns the two points of the path.

GetOvalBounds()

Returns the oval bounds of the path.

GetPoint(Int32)

Returns the point at the specified index.

GetPoints(Int32)

Returns a subset of points in the path. Up to max points are copied.

GetPoints(SKPoint[], Int32)

Returns a subset of points in the path. Up to max points are copied.

GetRect()

Returns the rectangle of the path.

GetRect(Boolean, SKPathDirection)

Returns the rectangle of the path.

GetRoundRect()

Returns the round rectangle of the path.

GetTightBounds(SKRect)

Gets the "tight" bounds of the path. Unlike GetBounds(SKRect), the control points of curves are excluded.

LineTo(Single, Single)

Add a line from the last point to the specified point (x, y).

LineTo(SKPoint)

Add a line from the last point to the specified point (x, y).

MoveTo(Single, Single)

Set the beginning of the next contour to the point.

MoveTo(SKPoint)

Set the beginning of the next contour to the point.

Offset(Single, Single)

Offset the path by the specified distance.

Offset(SKPoint)

Set the beginning of the next contour to the point.

Op(SKPath, SKPathOp, SKPath)

Compute the result of a logical operation on two paths.

Op(SKPath, SKPathOp)

Compute the result of a logical operation on two paths.

ParseSvgPathData(String)

Creates a path based on the SVG path data string.

QuadTo(Single, Single, Single, Single)

Add a quadratic bezier from the last point.

QuadTo(SKPoint, SKPoint)

Add a quadratic bezier from the last point.

RArcTo(Single, Single, Single, SKPathArcSize, SKPathDirection, Single, Single)

The same as ArcTo(Single, Single, Single, SKPathArcSize, SKPathDirection, Single, Single), but the coordinates are considered relative to the last point on this contour.

RArcTo(SKPoint, Single, SKPathArcSize, SKPathDirection, SKPoint)

The same as ArcTo(SKPoint, Single, SKPathArcSize, SKPathDirection, SKPoint), but the coordinates are considered relative to the last point on this contour.

RConicTo(Single, Single, Single, Single, Single)

Same as ConicTo(Single, Single, Single, Single, Single) but the coordinates are considered relative to the last point on this contour.

RConicTo(SKPoint, SKPoint, Single)

Same as ConicTo(SKPoint, SKPoint, Single) but the coordinates are considered relative to the last point on this contour.

RCubicTo(Single, Single, Single, Single, Single, Single)

Same as CubicTo(Single, Single, Single, Single, Single, Single) but the coordinates are considered relative to the last point on this contour.

RCubicTo(SKPoint, SKPoint, SKPoint)

Same as CubicTo(SKPoint, SKPoint, SKPoint) 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(Single, Single)

Same as LineTo(Single, Single) but the coordinates are considered relative to the last point on this contour.

RLineTo(SKPoint)

Same as LineTo(SKPoint) but the coordinates are considered relative to the last point on this contour.

RMoveTo(Single, Single)

Same as MoveTo(Single, Single) but the coordinates are considered relative to the last point on this contour.

RMoveTo(SKPoint)

Same as MoveTo(SKPoint) but the coordinates are considered relative to the last point on this contour.

RQuadTo(Single, Single, Single, Single)

Same as QuadTo(Single, Single, Single, Single) but the coordinates are considered relative to the last point on this contour.

RQuadTo(SKPoint, SKPoint)

Same as QuadTo(SKPoint, SKPoint) but the coordinates are considered relative to the last point on this contour.

Simplify()

Return a simplified copy of the current path.

Simplify(SKPath)

Simplifies the current path.

ToSvgPathData()

Returns a SVG path data representation of the current path.

ToWinding()
ToWinding(SKPath)
Transform(SKMatrix, SKPath)

Applies a transformation matrix to the all the elements in the path.

Transform(SKMatrix)

Applies a transformation matrix to the all the elements in the path.

Applies to