Class GeometryPath
Builds an ordered custom geometry path using point-based coordinates.
Inherited Members
Namespace: DRIT.Presentation.Drawing
Assembly: DRIT.Presentation.dll
Syntax
public sealed class GeometryPath
Properties
CoordinateHeight
Gets the height of the custom path coordinate space in points.
Declaration
public double CoordinateHeight { get; }
Property Value
| Type | Description |
|---|---|
| double |
CoordinateWidth
Gets the width of the custom path coordinate space in points.
Declaration
public double CoordinateWidth { get; }
Property Value
| Type | Description |
|---|---|
| double |
Count
Gets the number of path segments.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| int |
Segments
Gets the live read-only list of path segments in drawing order.
Declaration
public IReadOnlyList<GeometryPathSegment> Segments { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<GeometryPathSegment> |
Methods
ArcTo(double, double, double, double)
Adds an arc segment from the current pen position using the specified radii and angles. Angles are in degrees; clockwise sweep is positive.
Declaration
public GeometryPath ArcTo(double widthRadius, double heightRadius, double startAngle, double sweepAngle)
Parameters
| Type | Name | Description |
|---|---|---|
| double | widthRadius | Width radius of the ellipse, in points. |
| double | heightRadius | Height radius of the ellipse, in points. |
| double | startAngle | Start angle in degrees. |
| double | sweepAngle | Sweep angle in degrees (clockwise positive). |
Returns
| Type | Description |
|---|---|
| GeometryPath |
CloseFigure()
Closes the current path figure.
Declaration
public GeometryPath CloseFigure()
Returns
| Type | Description |
|---|---|
| GeometryPath | This path for fluent construction. |
CubicBezierTo(double, double, double, double, double, double)
Adds a cubic Bezier segment to the path.
Declaration
public GeometryPath CubicBezierTo(double control1X, double control1Y, double control2X, double control2Y, double x, double y)
Parameters
| Type | Name | Description |
|---|---|---|
| double | control1X | |
| double | control1Y | |
| double | control2X | |
| double | control2Y | |
| double | x | |
| double | y |
Returns
| Type | Description |
|---|---|
| GeometryPath |
LineTo(double, double)
Adds a line segment to the specified point.
Declaration
public GeometryPath LineTo(double x, double y)
Parameters
| Type | Name | Description |
|---|---|---|
| double | x | The X coordinate in points. |
| double | y | The Y coordinate in points. |
Returns
| Type | Description |
|---|---|
| GeometryPath | This path for fluent construction. |
LineTo(double, double, int)
Adds or inserts a line segment at the specified index.
Declaration
public GeometryPath LineTo(double x, double y, int insertionIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| double | x | The X coordinate in points. |
| double | y | The Y coordinate in points. |
| int | insertionIndex | The zero-based insertion index; invalid values append. |
Returns
| Type | Description |
|---|---|
| GeometryPath | This path for fluent construction. |
MoveTo(double, double)
Moves the current point without drawing.
Declaration
public GeometryPath MoveTo(double x, double y)
Parameters
| Type | Name | Description |
|---|---|---|
| double | x | The X coordinate in points. |
| double | y | The Y coordinate in points. |
Returns
| Type | Description |
|---|---|
| GeometryPath | This path for fluent construction. |
QuadraticBezierTo(double, double, double, double)
Adds a quadratic Bezier segment to the path.
Declaration
public GeometryPath QuadraticBezierTo(double controlX, double controlY, double x, double y)
Parameters
| Type | Name | Description |
|---|---|---|
| double | controlX | |
| double | controlY | |
| double | x | |
| double | y |
Returns
| Type | Description |
|---|---|
| GeometryPath |
RemoveAt(int)
Removes the segment at the specified zero-based index.
Declaration
public void RemoveAt(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The segment index to remove. |