public class Size extends com.aspose.ms.lang.Struct<Size>
Represents size.
Constructor and Description |
---|
Size() |
Size(int width,
int height)
Initializes a new instance of the
Aspose.Imaging.Size structure from the specified dimensions. |
Size(Point point)
Initializes a new instance of the
Aspose.Imaging.Size structure from the specified Aspose.Imaging.Point . |
Modifier and Type | Method and Description |
---|---|
static Size |
add(Size size1,
Size size2)
Adds the width and height of one
Aspose.Imaging.Size structure to the width and height of another Aspose.Imaging.Size structure. |
static Size |
ceiling(SizeF size)
Converts the specified
Aspose.Imaging.SizeF structure to a Aspose.Imaging.Size structure by rounding the values of the Aspose.Imaging.Size structure to the next higher integer values. |
Size |
Clone() |
void |
CloneTo(Size that) |
boolean |
equals(Object obj)
Tests to see whether the specified object is a
Aspose.Imaging.Size with the same dimensions as this Aspose.Imaging.Size . |
static Size |
getEmpty()
Gets a new instance of the
Aspose.Imaging.Size structure that has Aspose.Imaging.Size.Width and Aspose.Imaging.Size.Height values set to zero. |
int |
getHeight()
Gets or sets the vertical component of this
Aspose.Imaging.Size . |
int |
getWidth()
Gets or sets the horizontal component of this
Aspose.Imaging.Size . |
int |
hashCode()
Returns a hash code for this
Aspose.Imaging.Size structure. |
boolean |
isEmpty()
Gets a value indicating whether this
Aspose.Imaging.Size has width and height of 0. |
static boolean |
isEquals(Size obj1,
Size obj2) |
static Size |
op_Addition(Size size1,
Size size2)
Adds the width and height of one
Aspose.Imaging.Size structure to the width and height of another Aspose.Imaging.Size structure. |
static boolean |
op_Equality(Size size1,
Size size2)
Tests whether two
Aspose.Imaging.Size structures are equal. |
static boolean |
op_Inequality(Size size1,
Size size2)
Tests whether two
Aspose.Imaging.Size structures are different. |
static Size |
op_Subtraction(Size size1,
Size size2)
Subtracts the width and height of one
Aspose.Imaging.Size structure from the width and height of another Aspose.Imaging.Size structure. |
static Size |
round(SizeF size)
Converts the specified
Aspose.Imaging.SizeF structure to a Aspose.Imaging.Size structure by rounding the values of the Aspose.Imaging.SizeF structure to the nearest integer values. |
void |
setHeight(int value)
Gets or sets the vertical component of this
Aspose.Imaging.Size . |
void |
setWidth(int value)
Gets or sets the horizontal component of this
Aspose.Imaging.Size . |
static Size |
subtract(Size size1,
Size size2)
Subtracts the width and height of one
Aspose.Imaging.Size structure from the width and height of another Aspose.Imaging.Size structure. |
static Point |
to_Point(Size size)
Converts the specified
Aspose.Imaging.Size to a Aspose.Imaging.Point . |
static SizeF |
to_SizeF(Size size)
Converts the specified
Aspose.Imaging.Size to a Aspose.Imaging.SizeF . |
String |
toString()
Creates a human-readable string that represents this
Aspose.Imaging.Size . |
static Size |
truncate(SizeF size)
Converts the specified
Aspose.Imaging.SizeF structure to a Aspose.Imaging.Size structure by truncating the values of the Aspose.Imaging.SizeF structure to the next lower integer values. |
public Size()
public Size(Point point)
Initializes a new instance of the Aspose.Imaging.Size
structure from the specified Aspose.Imaging.Point
.
point
- The Aspose.Imaging.Point
from which to initialize this Aspose.Imaging.Size
.public Size(int width, int height)
Initializes a new instance of the Aspose.Imaging.Size
structure from the specified dimensions.
width
- The width component of the new Aspose.Imaging.Size
.height
- The height component of the new Aspose.Imaging.Size
.public static Size getEmpty()
Gets a new instance of the Aspose.Imaging.Size
structure that has Aspose.Imaging.Size.Width
and Aspose.Imaging.Size.Height
values set to zero.
public boolean isEmpty()
Gets a value indicating whether this Aspose.Imaging.Size
has width and height of 0.
public int getWidth()
Gets or sets the horizontal component of this Aspose.Imaging.Size
.
public void setWidth(int value)
Gets or sets the horizontal component of this Aspose.Imaging.Size
.
public int getHeight()
Gets or sets the vertical component of this Aspose.Imaging.Size
.
public void setHeight(int value)
Gets or sets the vertical component of this Aspose.Imaging.Size
.
public static SizeF to_SizeF(Size size)
Converts the specified Aspose.Imaging.Size
to a Aspose.Imaging.SizeF
.
size
- The Aspose.Imaging.Size
to convert.Aspose.Imaging.SizeF
structure to which this operator converts.public static Size op_Addition(Size size1, Size size2)
Adds the width and height of one Aspose.Imaging.Size
structure to the width and height of another Aspose.Imaging.Size
structure.
size1
- The first Aspose.Imaging.Size
to add.size2
- The second Aspose.Imaging.Size
to add.Aspose.Imaging.Size
structure that is the result of the addition operation.public static Size op_Subtraction(Size size1, Size size2)
Subtracts the width and height of one Aspose.Imaging.Size
structure from the width and height of another Aspose.Imaging.Size
structure.
size1
- The Aspose.Imaging.Size
structure on the left side of the subtraction operator.size2
- The Aspose.Imaging.Size
structure on the right side of the subtraction operator.Aspose.Imaging.Size
structure that is the result of the subtraction operation.public static boolean op_Equality(Size size1, Size size2)
Tests whether two Aspose.Imaging.Size
structures are equal.
size1
- The Aspose.Imaging.Size
structure on the left side of the equality operator.size2
- The Aspose.Imaging.Size
structure on the right of the equality operator.size1
and size2
have equal width and height; otherwise, false.public static boolean op_Inequality(Size size1, Size size2)
Tests whether two Aspose.Imaging.Size
structures are different.
size1
- The Aspose.Imaging.Size
structure on the left of the inequality operator.size2
- The Aspose.Imaging.Size
structure on the right of the inequality operator.size1
and size2
differ either in width or height; false if size1
and size2
are equal.public static Point to_Point(Size size)
Converts the specified Aspose.Imaging.Size
to a Aspose.Imaging.Point
.
size
- The Aspose.Imaging.Size
to convert.Aspose.Imaging.Point
structure to which this operator converts.public static Size add(Size size1, Size size2)
Adds the width and height of one Aspose.Imaging.Size
structure to the width and height of another Aspose.Imaging.Size
structure.
size1
- The first Aspose.Imaging.Size
to add.size2
- The second Aspose.Imaging.Size
to add.Aspose.Imaging.Size
structure that is the result of the addition operation.public static Size ceiling(SizeF size)
Converts the specified Aspose.Imaging.SizeF
structure to a Aspose.Imaging.Size
structure by rounding the values of the Aspose.Imaging.Size
structure to the next higher integer values.
size
- The Aspose.Imaging.SizeF
structure to convert.Aspose.Imaging.Size
structure this method converts to.public static Size subtract(Size size1, Size size2)
Subtracts the width and height of one Aspose.Imaging.Size
structure from the width and height of another Aspose.Imaging.Size
structure.
size1
- The Aspose.Imaging.Size
structure on the left side of the subtraction operator.size2
- The Aspose.Imaging.Size
structure on the right side of the subtraction operator.Aspose.Imaging.Size
that is a result of the subtraction operation.public static Size truncate(SizeF size)
Converts the specified Aspose.Imaging.SizeF
structure to a Aspose.Imaging.Size
structure by truncating the values of the Aspose.Imaging.SizeF
structure to the next lower integer values.
size
- The Aspose.Imaging.SizeF
structure to convert.Aspose.Imaging.Size
structure this method converts to.public static Size round(SizeF size)
Converts the specified Aspose.Imaging.SizeF
structure to a Aspose.Imaging.Size
structure by rounding the values of the Aspose.Imaging.SizeF
structure to the nearest integer values.
size
- The Aspose.Imaging.SizeF
structure to convert.Aspose.Imaging.Size
structure this method converts to.public boolean equals(Object obj)
Tests to see whether the specified object is a Aspose.Imaging.Size
with the same dimensions as this Aspose.Imaging.Size
.
public int hashCode()
Returns a hash code for this Aspose.Imaging.Size
structure.
public String toString()
Creates a human-readable string that represents this Aspose.Imaging.Size
.
public void CloneTo(Size that)
CloneTo
in class com.aspose.ms.System.ValueType<Size>