SizeF

Overview

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

Represents a 2D size with float dimensions.

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