Characteristic Locus
Inherited Members object.Equals(object, object) object.GetType() object.ReferenceEquals(object, object)
Namespace Meadow.Foundation.Graphics
Assembly MicroGraphics.dll

Syntax

public struct Point

Constructors

Point(int, int)

Create a new Point struct

Declaration
public Point(int x = 0, int y = 0)

Parameters

Type Name Description
int x

The x value

int y

The y value

Properties

Empty

Get an empty / zero Point

Declaration
public static Point Empty { get; }

Property Value

Type Description
Point

IsEmpty

Is the point empty or 0

Declaration
public bool IsEmpty { get; }

Property Value

Type Description
bool

X

The X value

Declaration
public int X { readonly get; set; }

Property Value

Type Description
int

Y

The Y value

Declaration
public int Y { readonly get; set; }

Property Value

Type Description
int

Methods

Equals(object)

Indicates whether this instance is equal to the specified object

Declaration
public override bool Equals(object obj)

Parameters

Type Name Description
object obj

The object instance to compare to

Returns

Type Description
bool

True if both instances are equal otherwise false

Overrides

From(Size)

Create a Point from a size

Declaration
public static Point From(Size size)

Parameters

Type Name Description
Size size

The size

Returns

Type Description
Point

A new Point who's x value is the width and y value is the height

GetHashCode()

Returns the hash code for this instance

Declaration
public override int GetHashCode()

Returns

Type Description
int

An int that represents the hash code for this instance

Overrides

Offset(Point)

Offset the point

Declaration
public void Offset(Point point)

Parameters

Type Name Description
Point point

A Point containing the amount to offset

Offset(int, int)

Offset the point

Declaration
public void Offset(int x, int y)

Parameters

Type Name Description
int x

The x amount to offset

int y

The y amount to offset

ToString()

Get a string representation of the point

Declaration
public override string ToString()

Returns

Type Description
string

The x and y values as a string

Overrides

Operators

operator +(Point, Point)

Translates the specified Point by the specified amount for both x and y

Declaration
public static Point operator +(Point point, Point amount)

Parameters

Type Name Description
Point point

The Point instance to translate

Point amount

The amount to translate

Returns

Type Description
Point

A new Point instance translated by size

operator ==(Point, Point)

Compares two instances for equality

Declaration
public static bool operator ==(Point left, Point right)

Parameters

Type Name Description
Point left

The first instance

Point right

The second instance

Returns

Type Description
bool

True if left is equal to right otherwise false

operator !=(Point, Point)

Compares two instances for inequality

Declaration
public static bool operator !=(Point left, Point right)

Parameters

Type Name Description
Point left

The first instance

Point right

The second instance

Returns

Type Description
bool

True if left is not equal to right otherwise false

operator -(Point, Point)

Translates the specified Point by the negative of the specified Size.

Declaration
public static Point operator -(Point point, Point amount)

Parameters

Type Name Description
Point point

The Point instance to translate

Point amount

Point amount to subtract

Returns

Type Description
Point

A new Point instance translated by size