Package com.helger.pdflayout.spec
Class SizeSpec
java.lang.Object
com.helger.pdflayout.spec.SizeSpec
- All Implemented Interfaces:
Serializable
@Immutable
@MustImplementEqualsAndHashcode
public class SizeSpec
extends Object
implements Serializable
This class defines a size.
- Author:
- Philip Helger
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SizeSpeccreate(org.apache.pdfbox.pdmodel.common.PDRectangle aRect) static SizeSpeccreateMM(float fWidth, float fHeight) booleanorg.apache.pdfbox.pdmodel.common.PDRectanglefinal floatfinal floatgetWidth()inthashCode()static SizeSpecheight(float fHeight) minus(float fWidth, float fHeight) plus(float fWidth, float fHeight) toString()static SizeSpecwidth(float fWidth) withHeight(float fHeight) withWidth(float fWidth)
-
Field Details
-
DEFAULT_FLOAT
public static final float DEFAULT_FLOAT- See Also:
-
SIZE0
-
SIZE_MAX
-
-
Constructor Details
-
SizeSpec
Constructor- Parameters:
fWidth- Width. Must be ≥ 0.fHeight- Height. Must be ≥ 0.
-
-
Method Details
-
getWidth
- Returns:
- Width. Always ≥ 0.
-
getHeight
- Returns:
- Height. Always ≥ 0.
-
getAsRectangle
-
plus
-
plus
-
minus
-
minus
-
withWidth
-
withHeight
-
equals
-
hashCode
public int hashCode() -
toString
-
create
-
createMM
-
width
-
height
-