Struct Size
Namespace: Aspose.Page.Drawing
Assembly: Aspose.Page.dll (25.1.2)
Stores an ordered pair of integers, typically the width and height of a rectangle.
public struct Size
Inherited Members
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
Size(int, int)
Initializes a new instance of the Aspose.Page.Drawing.Size class from the specified dimensions.
public Size(int width, int height)
Parameters
width
int
The width component of the new Aspose.Page.Drawing.Size.
height
int
The height component of the new Aspose.Page.Drawing.Size.
Fields
Empty
Gets a Aspose.Page.Drawing.Size structure that has a Aspose.Page.Drawing.Size.Height and Aspose.Page.Drawing.Size.Width value of 0.
public static readonly Size Empty
Field Value
Properties
Height
Gets or sets the vertical component of this Aspose.Page.Drawing.Size.
public int Height { get; set; }
Property Value
IsEmpty
Tests whether this Aspose.Page.Drawing.Size has width and height of 0.
public bool IsEmpty { get; }
Property Value
Width
Gets or sets the horizontal component of this Aspose.Page.Drawing.Size.
public int Width { get; set; }
Property Value
Methods
Clone()
Clones this Aspose.Page.Drawing.Size.
public object Clone()
Returns
Equals(object)
Tests to see whether the specified object is a Aspose.Page.Drawing.Size with the same dimensions as this Aspose.Page.Drawing.Size.
public bool Equals(object obj)
Parameters
obj
object
The System.Object to test.
Returns
true if obj
is a Aspose.Page.Drawing.Size and has the same width and height as this Aspose.Page.Drawing.Size; otherwise, false.
GetHashCode()
Returns a hash code for this Aspose.Page.Drawing.Size structure.
public int GetHashCode()
Returns
An integer value that specifies a hash value for this Aspose.Page.Drawing.Size structure.
ToString()
Creates a human-readable string that represents this Aspose.Page.Drawing.Size.
public string ToString()
Returns
A string that represents this Aspose.Page.Drawing.Size.
Operators
operator ==(Size, Size)
Tests whether two Aspose.Page.Drawing.Size structures are equal.
public static bool operator ==(Size left, Size right)
Parameters
left
Size
The Aspose.Page.Drawing.Size structure on the left side of the equality operator.
right
Size
The Aspose.Page.Drawing.Size structure on the right of the equality operator.
Returns
true if left
and right
have equal width and height; otherwise, false.
operator !=(Size, Size)
Tests whether two Aspose.Page.Drawing.Size structures are different.
public static bool operator !=(Size sz1, Size sz2)
Parameters
sz1
Size
The Aspose.Page.Drawing.Size structure on the left of the inequality operator.
sz2
Size
The Aspose.Page.Drawing.Size structure on the right of the inequality operator.
Returns
true if sz1
and sz2
differ either in width or height; false if sz1
and sz2
are equal.