Skip to main content

Class GraphicsPath

Represents a 2D graphics path

Assembly: MicroGraphics.dll
View Source
Declaration
public class GraphicsPath

Properties

LastPoint

The last point added to the path

View Source
Declaration
public Point LastPoint { get; }

PointCount

The number of points in the path

View Source
Declaration
public int PointCount { get; }

Points

The collection of points

View Source
Declaration
public Point[] Points { get; }

VerbCount

The number of verbs/actions used

View Source
Declaration
public int VerbCount { get; }

Bounds

A rect that defines the full bounds of the path

View Source
Declaration
public Rect Bounds { get; }

Methods

Reset()

Reset the path

View Source
Declaration
public void Reset()

MoveTo(int, int)

Add a new point to the path

View Source
Declaration
public void MoveTo(int x, int y)
Parameters
TypeNameDescription
System.Int32xThe x position
System.Int32yThe y position

MoveTo(Point)

Add a new point to the path

View Source
Declaration
public void MoveTo(Point point)
Parameters
TypeNameDescription
Meadow.Foundation.Graphics.PointpointThe point position

RelativeMoveTo(int, int)

Add a new relative point to the path

View Source
Declaration
public void RelativeMoveTo(int x, int y)
Parameters
TypeNameDescription
System.Int32xThe relative x position
System.Int32yThe relative y position

RelativeMoveTo(Point)

Add a new relative point to the path

View Source
Declaration
public void RelativeMoveTo(Point point)
Parameters
TypeNameDescription
Meadow.Foundation.Graphics.PointpointThe relative point position

LineTo(int, int)

Add a line to the path

View Source
Declaration
public void LineTo(int x, int y)
Parameters
TypeNameDescription
System.Int32xThe x line end location
System.Int32yThe y line end location

LineTo(Point)

Add a line to the path

View Source
Declaration
public void LineTo(Point point)
Parameters
TypeNameDescription
Meadow.Foundation.Graphics.PointpointThe point line end location

RelativeLineTo(int, int)

Add a line to the path

View Source
Declaration
public void RelativeLineTo(int x, int y)
Parameters
TypeNameDescription
System.Int32xThe relative x line end location
System.Int32yThe relative y line end location

RelativeLineTo(Point)

Add a line to the path

View Source
Declaration
public void RelativeLineTo(Point point)
Parameters
TypeNameDescription
Meadow.Foundation.Graphics.PointpointThe relative point line end location

AddPolyLine(Point[])

Add an array of lines to the path

View Source
Declaration
public void AddPolyLine(Point[] points)
Parameters
TypeNameDescription
Meadow.Foundation.Graphics.Point[]pointsThe points defining the lines to add

AddPath(GraphicsPath)

Add an existing path to the end of the path

View Source
Declaration
public void AddPath(GraphicsPath path)
Parameters
TypeNameDescription
Meadow.Foundation.Graphics.GraphicsPathpathThe path to add

AddPathReverse(GraphicsPath)

Add an existing path to the end of the path in reverse order

View Source
Declaration
public void AddPathReverse(GraphicsPath path)
Parameters
TypeNameDescription
Meadow.Foundation.Graphics.GraphicsPathpathThe path to add

Scale(float, float)

Scales the path by the specified factors in the X and Y directions.

View Source
Declaration
public void Scale(float scaleX, float scaleY)
Parameters
TypeNameDescription
System.SinglescaleXThe scale factor in the X direction.
System.SinglescaleYThe scale factor in the Y direction.

Translate(float, float)

Translates the path by the specified amounts in the X and Y directions.

View Source
Declaration
public void Translate(float dx, float dy)
Parameters
TypeNameDescription
System.SingledxThe amount to translate in the X direction.
System.SingledyThe amount to translate in the Y direction.

Rotate(Angle)

Rotates the path by the specified angle.

View Source
Declaration
public void Rotate(Angle angle)
Parameters
TypeNameDescription
Meadow.Units.AngleangleThe angle to rotate the path, in degrees.

IsPointOnPath(Point, float)

Determines if a point lies on the path within a specified tolerance.

View Source
Declaration
public bool IsPointOnPath(Point point, float tolerance = 0.5)
Returns

System.Boolean: True if the point is on the path; otherwise, false.

Parameters
TypeNameDescription
Meadow.Foundation.Graphics.PointpointThe point to check.
System.SingletoleranceThe tolerance within which the point is considered to be on the path.

Clip(Rect)

Clips the path to a specified rectangular area.

View Source
Declaration
public void Clip(Rect clipRect)
Parameters
TypeNameDescription
Meadow.Foundation.Graphics.RectclipRectThe rectangle to which the path will be clipped.

Close()

Close the path

View Source
Declaration
public void Close()