IGeometryContext Interface
Definition
Describes a geometry using drawing commands.
public interface IGeometryContext
Methods
| Name | Description |
|---|---|
| ArcTo | Draws an arc to the specified point. |
| BeginFigure | Begins a new figure. |
| CubicBezierTo | Draws a Bezier curve to the specified point. |
| EndFigure | Ends the figure started by Avalonia.Platform.IGeometryContext.BeginFigure(Avalonia.Point,bool). |
| LineTo | Draws a line to the specified point. |
| QuadraticBezierTo | Draws a quadratic Bezier curve to the specified point. |
| SetFillRule | Sets path's winding rule (default is EvenOdd). You should call this method before any calls to BeginFigure. |
ArcTo Method
Draws an arc to the specified point.
public void ArcTo(Avalonia.Point point, Avalonia.Size size, double rotationAngle, bool isLargeArc, Avalonia.Media.SweepDirection sweepDirection, bool isStroked)
Parameters
point Avalonia.Point
The destination point where the arc ends.
size Avalonia.Size
The radii of an ellipse whose path is used to draw the arc.
rotationAngle double
The rotation angle (in degrees) of the ellipse that specifies the path of the arc; positive values are clockwise. This will rotate the entire arc relative to the X-axis and is not commonly used.
isLargeArc bool
Specifies whether the arc should follow the longer path around an ellipse rather than the shorter one.
true to draw the arc greater than 180 degrees; otherwise, false.
sweepDirection Avalonia.Media.SweepDirection
A value that indicates whether the arc is drawn in the Clockwise or Counterclockwise direction.
isStroked bool
Whether the segment is stroked.
BeginFigure Method
Begins a new figure.
public void BeginFigure(Avalonia.Point startPoint, bool isFilled)
Parameters
startPoint Avalonia.Point
The starting point for the figure.
isFilled bool
Whether the figure is filled.
CubicBezierTo Method
Draws a Bezier curve to the specified point.
public void CubicBezierTo(Avalonia.Point controlPoint1, Avalonia.Point controlPoint2, Avalonia.Point endPoint, bool isStroked)
Parameters
controlPoint1 Avalonia.Point
The first control point used to specify the shape of the curve.
controlPoint2 Avalonia.Point
The second control point used to specify the shape of the curve.
endPoint Avalonia.Point
The destination point for the end of the curve.
isStroked bool
Whether the segment is stroked.
EndFigure Method
Ends the figure started by Avalonia.Platform.IGeometryContext.BeginFigure(Avalonia.Point,bool).
public void EndFigure(bool isClosed)
Parameters
isClosed bool
Whether the figure is closed.
LineTo Method
Draws a line to the specified point.
public void LineTo(Avalonia.Point point, bool isStroked)
Parameters
point Avalonia.Point
The destination point.
isStroked bool
Whether the segment is stroked.
QuadraticBezierTo Method
Draws a quadratic Bezier curve to the specified point.
public void QuadraticBezierTo(Avalonia.Point controlPoint, Avalonia.Point endPoint, bool isStroked)
Parameters
controlPoint Avalonia.Point
The control point used to specify the shape of the curve.
endPoint Avalonia.Point
The destination point for the end of the curve.
isStroked bool
Whether the segment is stroked.
SetFillRule Method
Sets path's winding rule (default is EvenOdd). You should call this method before any calls to BeginFigure.
public void SetFillRule(Avalonia.Media.FillRule fillRule)
Parameters
fillRule Avalonia.Media.FillRule