Size

Inheritance: java.lang.Object, com.aspose.ms.System.ValueType, com.aspose.ms.lang.Struct

public class Size extends Struct<Size>

Represents size.

Constructors

ConstructorDescription
Size()
Size(Point point)Initializes a new instance of the Aspose.Imaging.Size structure from the specified Aspose.Imaging.Point .
Size(int width, int height)Initializes a new instance of the Aspose.Imaging.Size structure from the specified dimensions.

Methods

MethodDescription
Clone()
CloneTo(T arg0)
CloneTo(Size that)
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.
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.
equals(Object obj)Tests to see whether the specified object is a Aspose.Imaging.Size with the same dimensions as this Aspose.Imaging.Size .
getClass()
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.
getHeight()Gets or sets the vertical component of this Aspose.Imaging.Size .
getWidth()Gets or sets the horizontal component of this Aspose.Imaging.Size .
hashCode()Returns a hash code for this Aspose.Imaging.Size structure.
isEmpty()Gets a value indicating whether this Aspose.Imaging.Size has width and height of 0.
isEquals(Size obj1, Size obj2)
notify()
notifyAll()
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.
op_Equality(Size size1, Size size2)Tests whether two Aspose.Imaging.Size structures are equal.
op_Inequality(Size size1, Size size2)Tests whether two Aspose.Imaging.Size structures are different.
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.
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.
setHeight(int value)Gets or sets the vertical component of this Aspose.Imaging.Size .
setWidth(int value)Gets or sets the horizontal component of this Aspose.Imaging.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.
toString()Creates a human-readable string that represents this Aspose.Imaging.Size .
to_Point(Size size)Converts the specified Aspose.Imaging.Size to a Aspose.Imaging.Point .
to_SizeF(Size size)Converts the specified Aspose.Imaging.Size to a Aspose.Imaging.SizeF .
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.
wait()
wait(long arg0)
wait(long arg0, int arg1)

Size()

public Size()

Size(Point point)

public Size(Point point)

Initializes a new instance of the Aspose.Imaging.Size structure from the specified Aspose.Imaging.Point .

Parameters:

ParameterTypeDescription
pointPointThe Aspose.Imaging.Point from which to initialize this Aspose.Imaging.Size .

Size(int width, int height)

public Size(int width, int height)

Initializes a new instance of the Aspose.Imaging.Size structure from the specified dimensions.

Parameters:

ParameterTypeDescription
widthintThe width component of the new Aspose.Imaging.Size .
heightintThe height component of the new Aspose.Imaging.Size .

Clone()

public Size Clone()

Returns: Size

CloneTo(T arg0)

public abstract void CloneTo(T arg0)

Parameters:

ParameterTypeDescription
arg0T

CloneTo(Size that)

public void CloneTo(Size that)

Parameters:

ParameterTypeDescription
thatSize

add(Size size1, Size size2)

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.

Parameters:

ParameterTypeDescription
size1SizeThe first Aspose.Imaging.Size to add.
size2SizeThe second Aspose.Imaging.Size to add.

Returns: Size - A Aspose.Imaging.Size structure that is the result of the addition operation.

ceiling(SizeF size)

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.

Parameters:

ParameterTypeDescription
sizeSizeFThe Aspose.Imaging.SizeF structure to convert.

Returns: Size - The Aspose.Imaging.Size structure this method converts to.

equals(Object obj)

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 .

Parameters:

ParameterTypeDescription
objjava.lang.ObjectThe System.Object to test.

Returns: boolean - True if obj is a Aspose.Imaging.Size and has the same width and height as this Aspose.Imaging.Size ; otherwise, false.

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getEmpty()

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.

Returns: Size

getHeight()

public int getHeight()

Gets or sets the vertical component of this Aspose.Imaging.Size .

Returns: int

getWidth()

public int getWidth()

Gets or sets the horizontal component of this Aspose.Imaging.Size .

Returns: int

hashCode()

public int hashCode()

Returns a hash code for this Aspose.Imaging.Size structure.

Returns: int - An integer value that specifies a hash value for this Aspose.Imaging.Size structure.

isEmpty()

public boolean isEmpty()

Gets a value indicating whether this Aspose.Imaging.Size has width and height of 0.

Returns: boolean

isEquals(Size obj1, Size obj2)

public static boolean isEquals(Size obj1, Size obj2)

Parameters:

ParameterTypeDescription
obj1Size
obj2Size

Returns: boolean

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

op_Addition(Size size1, Size size2)

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.

Parameters:

ParameterTypeDescription
size1SizeThe first Aspose.Imaging.Size to add.
size2SizeThe second Aspose.Imaging.Size to add.

Returns: Size - A Aspose.Imaging.Size structure that is the result of the addition operation.

op_Equality(Size size1, Size size2)

public static boolean op_Equality(Size size1, Size size2)

Tests whether two Aspose.Imaging.Size structures are equal.

Parameters:

ParameterTypeDescription
size1SizeThe Aspose.Imaging.Size structure on the left side of the equality operator.
size2SizeThe Aspose.Imaging.Size structure on the right of the equality operator.

Returns: boolean - True if size1 and size2 have equal width and height; otherwise, false.

op_Inequality(Size size1, Size size2)

public static boolean op_Inequality(Size size1, Size size2)

Tests whether two Aspose.Imaging.Size structures are different.

Parameters:

ParameterTypeDescription
size1SizeThe Aspose.Imaging.Size structure on the left of the inequality operator.
size2SizeThe Aspose.Imaging.Size structure on the right of the inequality operator.

Returns: boolean - True if size1 and size2 differ either in width or height; false if size1 and size2 are equal.

op_Subtraction(Size size1, Size size2)

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.

Parameters:

ParameterTypeDescription
size1SizeThe Aspose.Imaging.Size structure on the left side of the subtraction operator.
size2SizeThe Aspose.Imaging.Size structure on the right side of the subtraction operator.

Returns: Size - A Aspose.Imaging.Size structure that is the result of the subtraction operation.

round(SizeF size)

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.

Parameters:

ParameterTypeDescription
sizeSizeFThe Aspose.Imaging.SizeF structure to convert.

Returns: Size - The Aspose.Imaging.Size structure this method converts to.

setHeight(int value)

public void setHeight(int value)

Gets or sets the vertical component of this Aspose.Imaging.Size .

Parameters:

ParameterTypeDescription
valueint

setWidth(int value)

public void setWidth(int value)

Gets or sets the horizontal component of this Aspose.Imaging.Size .

Parameters:

ParameterTypeDescription
valueint

subtract(Size size1, Size size2)

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.

Parameters:

ParameterTypeDescription
size1SizeThe Aspose.Imaging.Size structure on the left side of the subtraction operator.
size2SizeThe Aspose.Imaging.Size structure on the right side of the subtraction operator.

Returns: Size - The Aspose.Imaging.Size that is a result of the subtraction operation.

toString()

public String toString()

Creates a human-readable string that represents this Aspose.Imaging.Size .

Returns: java.lang.String - A string that represents this Aspose.Imaging.Size .

to_Point(Size size)

public static Point to_Point(Size size)

Converts the specified Aspose.Imaging.Size to a Aspose.Imaging.Point .

Parameters:

ParameterTypeDescription
sizeSizeThe Aspose.Imaging.Size to convert.

Returns: Point - The Aspose.Imaging.Point structure to which this operator converts.

to_SizeF(Size size)

public static SizeF to_SizeF(Size size)

Converts the specified Aspose.Imaging.Size to a Aspose.Imaging.SizeF .

Parameters:

ParameterTypeDescription
sizeSizeThe Aspose.Imaging.Size to convert.

Returns: SizeF - The Aspose.Imaging.SizeF structure to which this operator converts.

truncate(SizeF size)

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.

Parameters:

ParameterTypeDescription
sizeSizeFThe Aspose.Imaging.SizeF structure to convert.

Returns: Size - The Aspose.Imaging.Size structure this method converts to.

wait()

public final void wait()

wait(long arg0)

public final void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int