Struct Size
Represents the size of an image.
public readonly struct Size : IEquatable<Size>
- Implements
- Extension Methods
Remarks
Initializes a new instance of the Size struct.
Constructors
Size(float, float)
Represents the size of an image.
public Size(float width, float height)
Parameters
Remarks
Initializes a new instance of the Size struct.
Properties
AspectRatio
Gets the aspect ratio (width / height).
public float AspectRatio { get; }
Property Value
Height
Gets the height.
public float Height { get; }
Property Value
Width
Gets the width.
public float Width { get; }
Property Value
Methods
Equals(Size)
public bool Equals(Size other)
Parameters
other
Size
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(in Size, in Size)
Implements the operator op_Equality.
public static bool operator ==(in Size left, in Size right)
Parameters
Returns
- bool
The result of the operator.
operator !=(in Size, in Size)
Implements the operator op_Inequality.
public static bool operator !=(in Size left, in Size right)
Parameters
Returns
- bool
The result of the operator.