Table of Contents

Struct Point

Namespace
System.Drawing
Assembly
nanoFramework.Graphics.Core.dll

Represents an ordered pair of x and y coordinates that define a point in a two-dimensional plane.

public struct Point
Inherited Members

Constructors

Point(Size)

Initializes a new instance of the Point class from a Size .

public Point(Size sz)

Parameters

sz Size

Point(int)

Initializes a new instance of the Point class using coordinates specified by an integer value.

public Point(int dw)

Parameters

dw int

Point(int, int)

Initializes a new instance of the Point class with the specified coordinates.

public Point(int x, int y)

Parameters

x int
y int

Fields

Empty

Creates a new instance of the Point class with member data left uninitialized.

public static readonly Point Empty

Field Value

Point

Properties

IsEmpty

Gets a value indicating whether this Point is empty.

public readonly bool IsEmpty { get; }

Property Value

bool

X

Gets the x-coordinate of this Point.

public int X { readonly get; set; }

Property Value

int

Y

Gets the y-coordinate of this Point.

public int Y { readonly get; set; }

Property Value

int

Methods

Add(Point, Size)

Translates a Point by a given Size .

public static Point Add(Point pt, Size sz)

Parameters

pt Point
sz Size

Returns

Point

Equals(Point)

Specifies whether this Point contains the same coordinates as the specified Point

public readonly bool Equals(Point other)

Parameters

other Point

Returns

bool

Equals(object?)

Specifies whether this Point contains the same coordinates as the specified object.

public override readonly bool Equals(object? other)

Parameters

other object

Returns

bool

GetHashCode()

Returns a hash code.

public override readonly int GetHashCode()

Returns

int

Offset(Point)

Translates this Point by the specified amount.

public void Offset(Point p)

Parameters

p Point

Offset(int, int)

Translates this Point by the specified amount.

public void Offset(int dx, int dy)

Parameters

dx int
dy int

Subtract(Point, Size)

Translates a Point by the negative of a given Size .

public static Point Subtract(Point pt, Size sz)

Parameters

pt Point
sz Size

Returns

Point

ToString()

Converts this Point to a human readable string.

public override readonly string ToString()

Returns

string

Operators

operator +(Point, Size)

Translates a Point by a given Size .

public static Point operator +(Point pt, Size sz)

Parameters

pt Point
sz Size

Returns

Point

operator ==(Point, Point)

Compares two Point objects. The result specifies whether the values of the X and Y properties of the two Point objects are equal.

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

Parameters

left Point
right Point

Returns

bool

explicit operator Size(Point)

Creates a Size with the coordinates of the specified Point .

public static explicit operator Size(Point p)

Parameters

p Point

Returns

Size

operator !=(Point, Point)

Compares two Point objects. The result specifies whether the values of the X or Y properties of the two Point objects are unequal.

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

Parameters

left Point
right Point

Returns

bool

operator -(Point, Size)

Translates a Point by the negative of a given Size .

public static Point operator -(Point pt, Size sz)

Parameters

pt Point
sz Size

Returns

Point