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