Search Results for

Show / Hide Table of Contents

# Struct SizeF

Represents the size of a rectangular region with an ordered pair of width and height.

##### Implements

System.IEquatable<SizeF>

##### 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 SizeF : IEquatable<SizeF>

### Constructors

#### SizeF(Single, Single)

Initializes a new instance of the SizeF class from the specified dimensions.

##### Declaration

    public SizeF(float width, float height)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Single | width |
System.Single | height |

#### SizeF(PointF)

Initializes a new instance of the SizeF class from the specified PointF.

##### Declaration

    public SizeF(PointF pt)

##### Parameters

Type | Name | Description
--- | --- | ---
PointF | pt |

#### SizeF(SizeF)

Initializes a new instance of the SizeF class from the specified existing SizeF.

##### Declaration

    public SizeF(SizeF size)

##### Parameters

Type | Name | Description
--- | --- | ---
SizeF | size |

### Fields

#### Empty

Initializes a new instance of the SizeF class.

##### Declaration

    public static readonly SizeF Empty

##### Field Value

Type | Description
--- | ---
SizeF |

### Properties

#### Height

Represents the vertical component of this SizeF.

##### Declaration

    public float Height { get; set; }

##### Property Value

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

#### IsEmpty

Tests whether this SizeF has zero width and height.

##### Declaration

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

##### Property Value

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

#### Width

Represents the horizontal component of this SizeF.

##### Declaration

    public float Width { get; set; }

##### Property Value

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

### Methods

#### Add(SizeF, SizeF)

Performs vector addition of two SizeF objects.

##### Declaration

    public static SizeF Add(SizeF sz1, SizeF sz2)

##### Parameters

Type | Name | Description
--- | --- | ---
SizeF | sz1 |
SizeF | sz2 |

##### Returns

Type | Description
--- | ---
SizeF |

#### Equals(Object)

Tests to see whether the specified object is a SizeF with the same dimensions as this SizeF.

##### 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(SizeF)

Tests whether two SizeF objects are identical.

##### Declaration

    public bool Equals(SizeF other)

##### Parameters

Type | Name | Description
--- | --- | ---
SizeF | other |

##### Returns

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

#### GetHashCode()

Generates a hashcode from the width and height

##### Declaration

    public override int GetHashCode()

##### Returns

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

##### Overrides

System.ValueType.GetHashCode()

#### Subtract(SizeF, SizeF)

Contracts a SizeF by another SizeF.

##### Declaration

    public static SizeF Subtract(SizeF sz1, SizeF sz2)

##### Parameters

Type | Name | Description
--- | --- | ---
SizeF | sz1 |
SizeF | sz2 |

##### Returns

Type | Description
--- | ---
SizeF |

#### ToString()

Creates a human-readable string that represents this SizeF.

##### Declaration

    public override string ToString()

##### Returns

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

##### Overrides

System.ValueType.ToString()

### Operators

#### Addition(SizeF, SizeF)

Performs vector addition of two SizeF objects.

##### Declaration

    public static SizeF operator +(SizeF sz1, SizeF sz2)

##### Parameters

Type | Name | Description
--- | --- | ---
SizeF | sz1 |
SizeF | sz2 |

##### Returns

Type | Description
--- | ---
SizeF |

#### Division(SizeF, Single)

Divides SizeF by a System.Single producing SizeF.

##### Declaration

    public static SizeF operator /(SizeF left, float right)

##### Parameters

Type | Name | Description
--- | --- | ---
SizeF | left | Dividend of type SizeF.
System.Single | right | Divisor of type System.Int32.

##### Returns

Type | Description
--- | ---
SizeF | Result of type SizeF.

#### Equality(SizeF, SizeF)

Tests whether two SizeF objects are identical.

##### Declaration

    public static bool operator ==(SizeF sz1, SizeF sz2)

##### Parameters

Type | Name | Description
--- | --- | ---
SizeF | sz1 |
SizeF | sz2 |

##### Returns

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

#### Explicit(SizeF to PointF)

Converts the specified SizeF to a PointF.

##### Declaration

    public static explicit operator PointF(SizeF size)

##### Parameters

Type | Name | Description
--- | --- | ---
SizeF | size |

##### Returns

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

#### Inequality(SizeF, SizeF)

Tests whether two SizeF objects are different.

##### Declaration

    public static bool operator !=(SizeF sz1, SizeF sz2)

##### Parameters

Type | Name | Description
--- | --- | ---
SizeF | sz1 |
SizeF | sz2 |

##### Returns

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

#### Multiply(Single, SizeF)

Multiplies SizeF by a System.Single producing SizeF.

##### Declaration

    public static SizeF operator *(float left, SizeF right)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Single | left | Multiplier of type System.Single.
SizeF | right | Multiplicand of type SizeF.

##### Returns

Type | Description
--- | ---
SizeF | Product of type SizeF.

#### Multiply(SizeF, Single)

Multiplies SizeF by a System.Single producing SizeF.

##### Declaration

    public static SizeF operator *(SizeF left, float right)

##### Parameters

Type | Name | Description
--- | --- | ---
SizeF | left | Multiplicand of type SizeF.
System.Single | right | Multiplier of type System.Single.

##### Returns

Type | Description
--- | ---
SizeF | Product of type SizeF.

#### Subtraction(SizeF, SizeF)

Contracts a SizeF by another SizeF

##### Declaration

    public static SizeF operator -(SizeF sz1, SizeF sz2)

##### Parameters

Type | Name | Description
--- | --- | ---
SizeF | sz1 |
SizeF | sz2 |

##### Returns

Type | Description
--- | ---
SizeF |

### Implements

System.IEquatable<T>