Show / Hide Table of Contents

# Struct Point

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

###### Namespace: Terminal

###### Assembly: Terminal.dll

##### Syntax

    public struct Point

### Constructors

#### Point(Size)

Point Constructor

##### Declaration

    public Point (Terminal.Size sz);

##### Parameters

Type | Name | Description
--- | --- | ---
Size | sz | To be added.

##### Remarks

Creates a Point from a Size value.

#### Point(Int32, Int32)

Point Constructor

##### Declaration

    public Point (int x, int y);

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | x | To be added.
System.Int32 | y | To be added.

##### Remarks

Creates a Point from a specified x,y coordinate pair.

### Fields

#### Empty

Empty Shared Field

##### Declaration

    public static readonly Terminal.Point Empty;

##### Field Value

Type | Description
--- | ---
Point | To be added.

##### Remarks

An uninitialized Point Structure.

#### X

Gets or sets the x-coordinate of this Point.

##### Declaration

    public int X;

##### Field Value

Type | Description
--- | ---
System.Int32 | To be added.

#### Y

Gets or sets the y-coordinate of this Point.

##### Declaration

    public int Y;

##### Field Value

Type | Description
--- | ---
System.Int32 | To be added.

### Properties

#### IsEmpty

IsEmpty Property

##### Declaration

    public bool IsEmpty { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean | To be added.

##### Remarks

Indicates if both X and Y are zero.

### Methods

#### Add(Point, Size)

Adds the specified Size to the specified Point.

##### Declaration

    public static Terminal.Point Add (Terminal.Point pt, Terminal.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 | To be added.

##### Returns

Type | Description
--- | ---
System.Boolean | To be added.

##### Remarks

Checks equivalence of this Point and another object.

#### GetHashCode()

GetHashCode Method

##### Declaration

    public override int GetHashCode ();

##### Returns

Type | Description
--- | ---
System.Int32 | To be added.

##### Remarks

Calculates a hashing value.

#### Offset(Int32, Int32)

Offset Method

##### Declaration

    public void Offset (int dx, int dy);

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | dx | To be added.
System.Int32 | dy | To be added.

##### Remarks

Moves the Point a specified distance.

#### Offset(Point)

Translates this Point by the specified Point.

##### Declaration

    public void Offset (Terminal.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 Terminal.Point Subtract (Terminal.Point pt, Terminal.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 | To be added.

##### Remarks

Formats the Point as a string in coordinate notation.

### Operators

#### op_Addition(Point, Size)

Addition Operator

##### Declaration

    public static Terminal.Point op_Addition (Terminal.Point pt, Terminal.Size sz);

##### Parameters

Type | Name | Description
--- | --- | ---
Point | pt | To be added.
Size | sz | To be added.

##### Returns

Type | Description
--- | ---
Point | To be added.

##### Remarks

Translates a Point using the Width and Height properties of the given Size.

#### op_Equality(Point, Point)

Equality Operator

##### Declaration

    public static bool op_Equality (Terminal.Point left, Terminal.Point right);

##### Parameters

Type | Name | Description
--- | --- | ---
Point | left | To be added.
Point | right | To be added.

##### Returns

Type | Description
--- | ---
System.Boolean | To be added.

##### Remarks

Compares two Point objects. The return value is based on the equivalence of the X and Y properties of the two points.

#### op_Explicit(Point to Size)

Point to Size Conversion

##### Declaration

    public static Terminal.Size op_Explicit (Terminal.Point p);

##### Parameters

Type | Name | Description
--- | --- | ---
Point | p | To be added.

##### Returns

Type | Description
--- | ---
Size | To be added.

##### Remarks

Returns a Size based on the Coordinates of a given Point. Requires explicit cast.

#### op_Inequality(Point, Point)

Inequality Operator

##### Declaration

    public static bool op_Inequality (Terminal.Point left, Terminal.Point right);

##### Parameters

Type | Name | Description
--- | --- | ---
Point | left | To be added.
Point | right | To be added.

##### Returns

Type | Description
--- | ---
System.Boolean | To be added.

##### Remarks

Compares two Point objects. The return value is based on the equivalence of the X and Y properties of the two points.

#### op_Subtraction(Point, Size)

Subtraction Operator

##### Declaration

    public static Terminal.Point op_Subtraction (Terminal.Point pt, Terminal.Size sz);

##### Parameters

Type | Name | Description
--- | --- | ---
Point | pt | To be added.
Size | sz | To be added.

##### Returns

Type | Description
--- | ---
Point | To be added.

##### Remarks

Translates a Point using the negation of the Width and Height properties of the given Size.