SKPathMeasure.GetSegment Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| GetSegment(Single, Single, SKPathBuilder, Boolean) |
Copies a segment of the path contour, between the specified distances, into the specified path builder. |
| GetSegment(Single, Single, Boolean) |
Returns a new path containing the intervening segment(s) between the start and stop distances. |
| GetSegment(Single, Single, SKPath, Boolean) |
Obsolete.
Extracts a contour segment of the path between two distances and appends it to the destination path. |
GetSegment(Single, Single, SKPathBuilder, Boolean)
Copies a segment of the path contour, between the specified distances, into the specified path builder.
public bool GetSegment(float start, float stop, SkiaSharp.SKPathBuilder dst, bool startWithMoveTo);
Parameters
- start
- Single
The starting distance along the contour for the segment.
- stop
- Single
The ending distance along the contour for the segment.
- dst
- SKPathBuilder
The SKPathBuilder to receive the extracted path segment.
- startWithMoveTo
- Boolean
true to start the segment with a move-to command; otherwise, false.
Returns
true if a valid segment was extracted; otherwise, false.
Applies to
GetSegment(Single, Single, Boolean)
Returns a new path containing the intervening segment(s) between the start and stop distances.
public SkiaSharp.SKPath GetSegment(float start, float stop, bool startWithMoveTo);
Parameters
- start
- Single
The starting offset of the segment.
- stop
- Single
The end offset of the segment.
- startWithMoveTo
- Boolean
If true, begin the path segment with a MoveTo(SKPoint).
Returns
A new path containing the segment, or null if the segment is zero-length.
Remarks
The start and stop parameters are pinned to 0..Length.
Applies to
GetSegment(Single, Single, SKPath, Boolean)
Caution
Use the SKPathBuilder overload instead.
Extracts a contour segment of the path between two distances and appends it to the destination path.
[System.Obsolete("Use the SKPathBuilder overload instead.")]
public bool GetSegment(float start, float stop, SkiaSharp.SKPath dst, bool startWithMoveTo);
Parameters
- start
- Single
The distance along the path at which the segment begins.
- stop
- Single
The distance along the path at which the segment ends.
- startWithMoveTo
- Boolean
true to prepend a move-to verb at the start position of the segment; otherwise, false.
Returns
true if the segment was successfully extracted; otherwise, false.
- Attributes