Table of Contents

Struct Point

Namespace
nanoFramework.UI
Assembly
nanoFramework.Graphics.Core.dll

A point data structure to represent a position on a plane.

[Obsolete("Switch to System.Drawing.Point", false)]
public struct Point
Inherited Members

Constructors

Point(int, int)

Initializes a new instance of the Point struct.

public Point(int x, int y)

Parameters

x int

The X position.

y int

The Y position.

Fields

Zero

The start point (X = 0, Y = 0).

public static Point Zero

Field Value

Point

Properties

X

Gets the X position for this point.

public readonly int X { get; }

Property Value

int

Y

Gets the Y position for this point.

public readonly int Y { get; }

Property Value

int

Methods

Equals(object)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

Operators

operator +(Point, Point)

Sums the X and Y values of the specified points.

public static Point operator +(Point point, Point other)

Parameters

point Point

The first point.

other Point

The other point.

Returns

Point

A new Point with the sum of X and Y values of the specified points.

operator ==(Point, Point)

Checks if the specified points are equivalent based on their X and Y values.

public static bool operator ==(Point point, Point other)

Parameters

point Point

The first to Point to check.

other Point

The other Point to check.

Returns

bool

True if both instances are the same position.

operator !=(Point, Point)

Checks if the specified points are equivalent based on their X and Y values.

public static bool operator !=(Point point, Point other)

Parameters

point Point

The first to Point to check.

other Point

The other Point to check.

Returns

bool

True if one Point refers to a different position than the other.

operator -(Point, Point)

Deducts the X and Y values of the specified points.

public static Point operator -(Point point, Point other)

Parameters

point Point

The first point.

other Point

The other point.

Returns

Point

A new Point with the deduction of X and Y values of the specified points.