Search Results for

Show / Hide Table of Contents

# Class Point

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

##### Inheritance

System.Object
Point

###### Namespace: Terminal.Gui

###### Assembly: Terminal.Gui.dll

##### Syntax

    public sealed class Point : ValueType

### Constructors

#### Point(Int32, Int32)

Point Constructor

##### Declaration

    public Point(int x, int y)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | x |
System.Int32 | y |

#### Point(Size)

Point Constructor

##### Declaration

    public Point(Size sz)

##### Parameters

Type | Name | Description
--- | --- | ---
Size | sz |

### Fields

#### Empty

Empty Shared Field

##### Declaration

    public static readonly Point Empty

##### Field Value

Type | Description
--- | ---
Point |

#### X

Gets or sets the x-coordinate of this Point.

##### Declaration

    public int X

##### Field Value

Type | Description
--- | ---
System.Int32 |

#### Y

Gets or sets the y-coordinate of this Point.

##### Declaration

    public int Y

##### Field Value

Type | Description
--- | ---
System.Int32 |

### Properties

#### IsEmpty

IsEmpty Property

##### Declaration

    public bool IsEmpty { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

### Methods

#### Add(Point, Size)

Adds the specified Size to the specified Point.

##### Declaration

    public static Point Add(Point pt, Size sz)

##### Parameters

Type | Name | Description
--- | --- | ---
Point | pt | The Point to add.
Size | sz | The Size to add.

##### Returns

Type | Description
--- | ---
Point | The Point that is the result of the addition operation.

#### Equals(Object)

Equals Method

##### Declaration

    public override bool Equals(object obj)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Object | obj |

##### Returns

Type | Description
--- | ---
System.Boolean |

#### GetHashCode()

GetHashCode Method

##### Declaration

    public override int GetHashCode()

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Offset(Int32, Int32)

Offset Method

##### Declaration

    public void Offset(int dx, int dy)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | dx |
System.Int32 | dy |

#### Offset(Point)

Translates this Point by the specified Point.

##### Declaration

    public void Offset(Point p)

##### Parameters

Type | Name | Description
--- | --- | ---
Point | p | The Point used offset this Point.

#### Subtract(Point, Size)

Returns the result of subtracting specified Size from the specified Point.

##### Declaration

    public static Point Subtract(Point pt, Size sz)

##### Parameters

Type | Name | Description
--- | --- | ---
Point | pt | The Point to be subtracted from.
Size | sz | The Size to subtract from the Point.

##### Returns

Type | Description
--- | ---
Point | The Point that is the result of the subtraction operation.

#### ToString()

ToString Method

##### Declaration

    public override string ToString()

##### Returns

Type | Description
--- | ---
System.String |

### Operators

#### Addition(Point, Size)

Addition Operator

##### Declaration

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

##### Parameters

Type | Name | Description
--- | --- | ---
Point | pt |
Size | sz |

##### Returns

Type | Description
--- | ---
Point |

#### Equality(Point, Point)

Equality Operator

##### Declaration

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

##### Parameters

Type | Name | Description
--- | --- | ---
Point | left |
Point | right |

##### Returns

Type | Description
--- | ---
System.Boolean |

#### Explicit(Point to Size)

Point to Size Conversion

##### Declaration

    public static explicit operator Size(Point p)

##### Parameters

Type | Name | Description
--- | --- | ---
Point | p |

##### Returns

Type | Description
--- | ---
Size |

#### Inequality(Point, Point)

Inequality Operator

##### Declaration

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

##### Parameters

Type | Name | Description
--- | --- | ---
Point | left |
Point | right |

##### Returns

Type | Description
--- | ---
System.Boolean |

#### Subtraction(Point, Size)

Subtraction Operator

##### Declaration

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

##### Parameters

Type | Name | Description
--- | --- | ---
Point | pt |
Size | sz |

##### Returns

Type | Description
--- | ---
Point |