SizeF

Overview

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

Represents a 2D size with float dimensions.

This class provides 12 methods for working with SizeF objects in Java programs. Available methods include: SizeF, add, equals, getHeight, getWidth, hashCode, isEmpty, setHeight, setWidth, toSize, toString. All public members are accessible to any Java application after installing the Aspose.Slides FOSS for Java package. Properties: EMPTY, empty, height, width.

Properties

NameTypeAccessDescription
widthfloatReadGets the width.
heightfloatReadGets the height.
emptybooleanReadReturns {@code true} if both dimensions are zero.
EMPTYSizeFReadEmpty size with dimensions (0, 0).

Methods

SignatureDescription
SizeF(width: float, height: float)Initializes a new instance of SizeF with the specified dimensions.
SizeF()Initializes a new instance of SizeF with dimensions (0, 0).
getWidth()floatGets the width.
setWidth(width: float)Sets the width.
getHeight()floatGets the height.
setHeight(height: float)Sets the height.
isEmpty()booleanReturns {@code true} if both dimensions are zero.
add(a: SizeF, b: SizeF)SizeFAdds two sizes component-wise.
toSize()SizeConverts this SizeF to a Size by truncating to integer dimensions.
equals(obj: Object)boolean
hashCode()intReturns a hash code based on the size’s dimensions
toString()String

See Also