Size Struct
Definition
Represents the size of a rectangular region with an ordered pair of width and height.
Implements
Syntax
[Serializable]
public struct Size : IEquatable<Size>
Constructors
Size(Point) | Initializes a new instance of the Size class from the specified Point. |
Size(Size) | Initializes a new instance of the Size class from the specified existing Size. |
Size(Double) | Initializes a new instance of the Size struct. |
Size(Double, Double) | Initializes a new instance of the Size class from the specified dimensions. |
Size(Vector2) | Initializes a new instance of the Size struct from the specified System.Numerics.Vector2. |
Fields
Default | Gets Size with width and height equal to -1. |
Empty | Gets Size with zero width and height. |
NaN | Gets Size with width and height equal to (System.Double.NaN, System.Double.NaN). |
Properties
Height | Represents the vertical component of this Size. |
IsEmpty | Tests whether this Size has zero width and height. |
Width | Represents the horizontal component of this Size. |
Methods
Add(Size, Size) | Performs vector addition of two Size objects. |
AnyIsNaN(Size) | Determines whether the specified value has width or height equal to System.Double.NaN. |
ApplyMax(Size) | Gets size with applied maximal limitations. |
ApplyMin(Size) | Gets size with applied minimal limitations. |
ApplyMinMax(Size, Size) | Gets size with applied minimal and maximal limitations. |
Equals(Size) | Indicates whether the current object is equal to another object of the same type. |
Equals(Object) | Tests to see whether the specified object is a Size with the same dimensions as this Size. |
GetHashCode() | Serves as the default hash function. |
GetHeights(Size[]) | Returns an array filled with heights of the specified Size values. |
GetWidths(Size[]) | Returns an array filled with widths of the specified Size values. |
IsNaN(Size) | Determines whether the specified value is (NaN, NaN). |
Max(Size, Size) | Gets maximal width and height from the two specified Size values. |
MaxWidthHeight(Size[]) | Returns the larger of the specified Size values. |
Parse(String) | Parse - returns an instance converted from the provided string using the culture "en-US" string with Size data |
Subtract(Size, Size) | |
ToPointF() | |
ToSize() | |
ToString() | Creates a human-readable string that represents this Size. |
Operators
Addition(Size, Size) | Performs vector addition of two Size objects. |
Division(Size, Double) | |
Equality(Size, Size) | Tests whether two Size objects are identical. |
Explicit(Size to Point) | |
Explicit(Vector2 to Size) | Converts the specified System.Numerics.Vector2 to a Size. |
Implicit(Double to Size) | Initializes Size with equal width and hegiht. |
Implicit(Int32 to Size) | Initializes Size with equal width and hegiht. |
Inequality(Size, Size) | Tests whether two Size objects are different. |
Multiply(Size, Double) | |
Multiply(Double, Size) | |
Subtraction(Size, Size) |