Class SizeF
Represents the size of a rectangular region with an ordered pair of width and height.
Inheritance
System.Object
SizeF
Assembly: Terminal.Gui.dll
Syntax
public sealed class SizeF : ValueType
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
Parameters
Type |
Name |
Description |
PointF |
pt |
|
SizeF(SizeF)
Initializes a new instance of the
SizeF class from the specified
existing
SizeF.
Declaration
Parameters
Type |
Name |
Description |
SizeF |
size |
|
Fields
Empty
Initializes a new instance of the
SizeF class.
Declaration
public static readonly SizeF Empty
Field Value
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
public 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
Returns
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 |
|
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 |
|
Subtract(SizeF, SizeF)
Declaration
public static SizeF Subtract(SizeF sz1, SizeF sz2)
Parameters
Returns
ToString()
Creates a human-readable string that represents this
SizeF.
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Operators
Addition(SizeF, SizeF)
Performs vector addition of two
SizeF objects.
Declaration
public static SizeF operator +(SizeF sz1, SizeF sz2)
Parameters
Returns
Division(SizeF, Single)
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
Equality(SizeF, SizeF)
Tests whether two
SizeF objects are identical.
Declaration
public static bool operator ==(SizeF sz1, SizeF sz2)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Explicit(SizeF to PointF)
Declaration
public static explicit operator PointF(SizeF size)
Parameters
Type |
Name |
Description |
SizeF |
size |
|
Returns
Inequality(SizeF, SizeF)
Tests whether two
SizeF objects are different.
Declaration
public static bool operator !=(SizeF sz1, SizeF sz2)
Parameters
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
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
Subtraction(SizeF, SizeF)
Declaration
public static SizeF operator -(SizeF sz1, SizeF sz2)
Parameters
Returns
Implements
System.IEquatable<>