Package com.itextpdf.layout.properties
Class BackgroundPosition
java.lang.Object
com.itextpdf.layout.properties.BackgroundPosition
Class to hold background-position property.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
A specialized enum containing positions in x-dimension (horizontal positions).static enum
A specialized enum containing positions in y-dimension (vertical positions). -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
calculatePositionValues
(float fullWidth, float fullHeight, UnitValue outXValue, UnitValue outYValue) Converts all percentage and enum values to point equivalent.boolean
Gets horizontal position.Gets vertical position.Gets horizontal shift.Gets vertical shift.int
hashCode()
setPositionX
(BackgroundPosition.PositionX xPosition) Sets horizontal position.setPositionY
(BackgroundPosition.PositionY yPosition) Sets vertical position.Sets horizontal shift.Sets vertical shift.
-
Constructor Details
-
BackgroundPosition
public BackgroundPosition()Creates a newBackgroundPosition
instance. Fills it with default values.
-
-
Method Details
-
calculatePositionValues
public void calculatePositionValues(float fullWidth, float fullHeight, UnitValue outXValue, UnitValue outYValue) Converts all percentage and enum values to point equivalent. -
getPositionX
Gets horizontal position.- Returns:
- position in x-dimension
-
setPositionX
Sets horizontal position.- Parameters:
-
xPosition
- position in x-dimension - Returns:
-
BackgroundPosition
-
getPositionY
Gets vertical position.- Returns:
- position in y-dimension
-
setPositionY
Sets vertical position.- Parameters:
-
yPosition
- position in y-dimension - Returns:
-
BackgroundPosition
-
getXShift
Gets horizontal shift.- Returns:
- shift in x-dimension from left
-
setXShift
Sets horizontal shift.- Parameters:
-
xShift
- shift in x-dimension from left - Returns:
-
BackgroundPosition
-
getYShift
Gets vertical shift.- Returns:
- shift in y-dimension from top
-
setYShift
Sets vertical shift.- Parameters:
-
yShift
- shift in y-dimension - Returns:
-
BackgroundPosition
-
equals
-
hashCode
public int hashCode()
-