Search Results for

Show / Hide Table of Contents

# Struct PointF

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

##### Implements

System.IEquatable<PointF>

##### Inherited Members

System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)

###### Namespace: Terminal.Gui

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

##### Syntax

    public struct PointF : IEquatable<PointF>

### Constructors

#### PointF(Single, Single)

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

##### Declaration

    public PointF(float x, float y)

##### Parameters

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

### Fields

#### Empty

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

##### Declaration

    public static readonly PointF Empty

##### Field Value

Type | Description
--- | ---
PointF |

### Properties

#### IsEmpty

Gets a value indicating whether this PointF is empty.

##### Declaration

    [Browsable(false)]
    public bool IsEmpty { get; }

##### Property Value

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

#### X

Gets the x-coordinate of this PointF.

##### Declaration

    public float X { get; set; }

##### Property Value

Type | Description
--- | ---
System.Single |

#### Y

Gets the y-coordinate of this PointF.

##### Declaration

    public float Y { get; set; }

##### Property Value

Type | Description
--- | ---
System.Single |

### Methods

#### Add(PointF, Size)

Translates a PointF by a given Size .

##### Declaration

    public static PointF Add(PointF pt, Size sz)

##### Parameters

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

##### Returns

Type | Description
--- | ---
PointF |

#### Add(PointF, SizeF)

Translates a PointF by a given SizeF .

##### Declaration

    public static PointF Add(PointF pt, SizeF sz)

##### Parameters

Type | Name | Description
--- | --- | ---
PointF | pt |
SizeF | sz |

##### Returns

Type | Description
--- | ---
PointF |

#### Equals(Object)

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

##### Declaration

    public override bool Equals(object obj)

##### Parameters

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

##### Returns

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

##### Overrides

System.ValueType.Equals(System.Object)

#### Equals(PointF)

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

##### Declaration

    public bool Equals(PointF other)

##### Parameters

Type | Name | Description
--- | --- | ---
PointF | other |

##### Returns

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

#### GetHashCode()

Generates a hashcode from the X and Y components

##### Declaration

    public override int GetHashCode()

##### Returns

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

##### Overrides

System.ValueType.GetHashCode()

#### Subtract(PointF, Size)

Translates a PointF by the negative of a given Size .

##### Declaration

    public static PointF Subtract(PointF pt, Size sz)

##### Parameters

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

##### Returns

Type | Description
--- | ---
PointF |

#### Subtract(PointF, SizeF)

Translates a PointF by the negative of a given SizeF .

##### Declaration

    public static PointF Subtract(PointF pt, SizeF sz)

##### Parameters

Type | Name | Description
--- | --- | ---
PointF | pt |
SizeF | sz |

##### Returns

Type | Description
--- | ---
PointF |

#### ToString()

Returns a string including the X and Y values

##### Declaration

    public override string ToString()

##### Returns

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

##### Overrides

System.ValueType.ToString()

### Operators

#### Addition(PointF, Size)

Translates a PointF by a given Size .

##### Declaration

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

##### Parameters

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

##### Returns

Type | Description
--- | ---
PointF |

#### Addition(PointF, SizeF)

Translates a PointF by a given SizeF .

##### Declaration

    public static PointF operator +(PointF pt, SizeF sz)

##### Parameters

Type | Name | Description
--- | --- | ---
PointF | pt |
SizeF | sz |

##### Returns

Type | Description
--- | ---
PointF |

#### Equality(PointF, PointF)

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

##### Declaration

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

##### Parameters

Type | Name | Description
--- | --- | ---
PointF | left |
PointF | right |

##### Returns

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

#### Inequality(PointF, PointF)

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

##### Declaration

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

##### Parameters

Type | Name | Description
--- | --- | ---
PointF | left |
PointF | right |

##### Returns

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

#### Subtraction(PointF, Size)

Translates a PointF by the negative of a given Size .

##### Declaration

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

##### Parameters

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

##### Returns

Type | Description
--- | ---
PointF |

#### Subtraction(PointF, SizeF)

Translates a PointF by the negative of a given SizeF .

##### Declaration

    public static PointF operator -(PointF pt, SizeF sz)

##### Parameters

Type | Name | Description
--- | --- | ---
PointF | pt |
SizeF | sz |

##### Returns

Type | Description
--- | ---
PointF |

### Implements

System.IEquatable<T>