[]
Structure specifing a size with float Width and Height.
public struct Size2F : IEquatable<Size2F>
Initializes a new instance of the Size2F struct.
public Size2F(Size2D sz)
sz
Size2DInitializes a new instance of the Size2F struct.
public Size2F(Size2L sz)
sz
Size2LInitializes a new instance of the Size2F struct.
public Size2F(SizeF sz)
sz
SizeFInitializes a new instance of the Size2F struct.
public Size2F(float width, float height)
An empty size.
public static readonly Size2F Empty
The vertical component of this Size2F structure.
public float Height
A size with infinite Width and Height.
public static readonly Size2F Infinite
The size of the Size2F type, in bytes.
public const int SizeInBytes = 8
The horizontal component of this Size2F structure.
public float Width
Determines if all components of Size2F are equal to zero.
public bool IsEmpty { get; }
Adds the width and height of one Size2F structure to the width and height of another Size2F structure.
public static Size2F Add(Size2F sz1, Size2F sz2)
Indicates whether this instance and a specified object are equal.
public bool Equals(Size2F other)
other
Size2FIndicates whether this instance and a specified object are equal.
public override bool Equals(object obj)
obj
objectReturns a hash code for this instance.
public override int GetHashCode()
Returns a Size2L with rounded width and height.
public Size2L Round()
Scales the width and height by the specified scaleFactor.
public static Size2F Scale(Size2F sz, float scaleFactor)
Scales the width and height by the specified scaleX and scaleY.
public static Size2F Scale(Size2F sz, float scaleX, float scaleY)
Scales the width and height by the specified scaleFactor.
public void Scale(float scaleFactor)
scaleFactor
floatScales the width and height by the specified scaleX and scaleY.
public void Scale(float scaleX, float scaleY)
Subtracts the width and height of one Size2F structure from the width and height of another Size2F structure.
public static Size2F Subtract(Size2F sz1, Size2F sz2)
public Size2D ToSize2D()
public SizeF ToSizeF()
Returns a string that represents the current object.
public override string ToString()
Returns a Size2L with truncated width and height.
public Size2L Truncate()
Determines if the specified values are equal.
public static bool operator ==(Size2F left, Size2F right)
public static explicit operator Vector2(Size2F value)
value
Size2Fpublic static explicit operator SizeF(Size2F value)
value
Size2Fpublic static explicit operator Size2F(Vector2 v)
v
Vector2public static explicit operator Size2F(SizeF sz)
sz
SizeFDetermines if the specified values are not equal.
public static bool operator !=(Size2F left, Size2F right)