Struct XSize
Represents a pair of floating-point numbers, typically the width and height of a graphical object.
public struct XSize : IFormattable
- Implements
- Inherited Members
Constructors
XSize(double, double)
Initializes a new instance of the XSize class with the specified values.
public XSize(double width, double height)
Parameters
Properties
Empty
Returns an empty size, i.e. a size with a width or height less than 0.
public static XSize Empty { get; }
Property Value
Height
Gets or sets the height.
public double Height { get; set; }
Property Value
IsEmpty
Gets a value indicating whether this instance is empty.
public bool IsEmpty { get; }
Property Value
Width
Gets or sets the width.
public double Width { get; set; }
Property Value
Methods
Equals(XSize)
Indicates whether this instance and a specified size are equal.
public bool Equals(XSize value)
Parameters
value
XSize
Returns
Equals(XSize, XSize)
Indicates whether these two instances are equal.
public static bool Equals(XSize size1, XSize size2)
Parameters
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? o)
Parameters
o
object
Returns
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
Parse(string)
Parses the size from a string.
public static XSize Parse(string source)
Parameters
source
string
Returns
ToString()
Converts this XSize to a human readable string.
public override string ToString()
Returns
ToString(IFormatProvider)
Converts this XSize to a human readable string.
public string ToString(IFormatProvider provider)
Parameters
provider
IFormatProvider
Returns
ToXPoint()
Converts this XSize to an XPoint.
public XPoint ToXPoint()
Returns
ToXVector()
Converts this XSize to an XVector.
public XVector ToXVector()
Returns
Operators
operator ==(XSize, XSize)
Determines whether two size objects are equal.
public static bool operator ==(XSize size1, XSize size2)
Parameters
Returns
explicit operator XPoint(XSize)
Performs an explicit conversion from XSize to XPoint.
public static explicit operator XPoint(XSize size)
Parameters
size
XSize
Returns
explicit operator XVector(XSize)
Performs an explicit conversion from XSize to XVector.
public static explicit operator XVector(XSize size)
Parameters
size
XSize
Returns
operator !=(XSize, XSize)
Determines whether two size objects are not equal.
public static bool operator !=(XSize size1, XSize size2)