Size

Overview

Size is a class in Aspose.Slides FOSS for Java.

Represents a 2D size with integer dimensions.

Properties

NameTypeAccessDescription
widthintReadGets the width.
heightintReadGets the height.
emptybooleanReadReturns {@code true} if both dimensions are zero.
EMPTYSizeReadEmpty size with dimensions (0, 0).

Methods

SignatureDescription
Size(width: int, height: int)Initializes a new instance of Size with the specified dimensions.
Size()Initializes a new instance of Size with dimensions (0, 0).
getWidth()intGets the width.
setWidth(width: int)Sets the width.
getHeight()intGets the height.
setHeight(height: int)Sets the height.
isEmpty()booleanReturns {@code true} if both dimensions are zero.
add(a: Size, b: Size)SizeAdds two sizes component-wise.
subtract(a: Size, b: Size)SizeSubtracts one size from another component-wise.
equals(obj: Object)booleanChecks whether the given object is a Size with equal dimensions
hashCode()intComputes a hash code based on width and height
toString()String

See Also