Struct SizeF
SizeF structure
Stores an ordered pair of floating-point numbers, typically the width and height of a rectangle.
public struct SizeF : IEquatable<SizeF>
Constructors
Name | Description |
---|
SizeF(PointF) | Initializes a new instance of the SizeF struct. |
SizeF(SizeF) | Initializes a new instance of the SizeF struct. |
SizeF(float, float) | Initializes a new instance of the SizeF structure from the specified dimensions. |
Properties
Name | Description |
---|
Height { get; set; } | Gets or sets the vertical component of this SizeF structure. |
IsEmpty { get; } | Gets a value indicating whether this SizeF structure has zero width and height. |
Width { get; set; } | Gets or sets the horizontal component of this SizeF structure. |
Methods
Name | Description |
---|
static Add(SizeF, SizeF) | Adds the width and height of one SizeF structure to the width and height of another SizeF structure. |
static Subtract(SizeF, SizeF) | Subtracts the width and height of one SizeF structure from the width and height of another SizeF structure. |
override Equals(object) | Tests to see whether the specified object is a SizeF structure with the same dimensions as this SizeF structure. |
Equals(SizeF) | Tests whether other SizeF structure has the same size of this SizeF structure. |
override GetHashCode() | Returns a hash code for this SizeF structure. |
ToPointF() | Converts a SizeF structure to a PointF structure. |
ToSize() | Converts a SizeF structure to a Size structure. |
override ToString() | Converts the attributes of this SizeF to a human readable string. |
operator + | Adds the width and height of one SizeF structure to the width and height of another SizeF structure. |
operator / | Divides SizeF by a Single producing SizeF . |
operator == | Tests whether two SizeF structures are equal. |
explicit operator | Converts the specified SizeF to a PointF . |
operator != | Tests whether two SizeF structures are different. |
operator * | Multiplies SizeF by a Single producing SizeF . (2 operators) |
operator - | Subtracts the width and height of one SizeF structure from the width and height of another SizeF structure. |
Fields
Name | Description |
---|
static readonly Empty | Gets a SizeF structure that has a Height and Width value of 0. |
See Also