Table of Contents

Interface IGeometryContext

Namespace
Avalonia.Platform
Assembly
Avalonia.Base.dll

Describes a geometry using drawing commands.

public interface IGeometryContext : IDisposable
Inherited Members

Methods

ArcTo(Point, Size, double, bool, SweepDirection)

Draws an arc to the specified point.

void ArcTo(Point point, Size size, double rotationAngle, bool isLargeArc, SweepDirection sweepDirection)

Parameters

point Point

The destination point.

size Size

The radii of an oval whose perimeter is used to draw the angle.

rotationAngle double

The rotation angle (in radians) of the oval that specifies the curve.

isLargeArc bool

true to draw the arc greater than 180 degrees; otherwise, false.

sweepDirection SweepDirection

A value that indicates whether the arc is drawn in the Clockwise or Counterclockwise direction.

BeginFigure(Point, bool)

Begins a new figure.

void BeginFigure(Point startPoint, bool isFilled = true)

Parameters

startPoint Point

The starting point for the figure.

isFilled bool

Whether the figure is filled.

CubicBezierTo(Point, Point, Point)

Draws a Bezier curve to the specified point.

void CubicBezierTo(Point controlPoint1, Point controlPoint2, Point endPoint)

Parameters

controlPoint1 Point

The first control point used to specify the shape of the curve.

controlPoint2 Point

The second control point used to specify the shape of the curve.

endPoint Point

The destination point for the end of the curve.

EndFigure(bool)

Ends the figure started by BeginFigure(Point, bool).

void EndFigure(bool isClosed)

Parameters

isClosed bool

Whether the figure is closed.

LineTo(Point)

Draws a line to the specified point.

void LineTo(Point endPoint)

Parameters

endPoint Point

The destination point.

QuadraticBezierTo(Point, Point)

Draws a quadratic Bezier curve to the specified point

void QuadraticBezierTo(Point controlPoint, Point endPoint)

Parameters

controlPoint Point
endPoint Point

DestinationPoint

SetFillRule(FillRule)

Sets path's winding rule (default is EvenOdd). You should call this method before any calls to BeginFigure.

void SetFillRule(FillRule fillRule)

Parameters

fillRule FillRule