Class BackgroundPosition
- Namespace
- iText.Layout.Properties
- Assembly
- itext.layout.dll
Class to hold background-position property.
public class BackgroundPosition
- Inheritance
-
BackgroundPosition
- Inherited Members
Constructors
BackgroundPosition()
Creates a new BackgroundPosition instance.
public BackgroundPosition()
Remarks
Creates a new BackgroundPosition instance. Fills it with default values.
Methods
CalculatePositionValues(float, float, UnitValue, UnitValue)
Converts all percentage and enum values to point equivalent.
public virtual void CalculatePositionValues(float fullWidth, float fullHeight, UnitValue outXValue, UnitValue outYValue)
Parameters
fullWidth
floatcontainer width to calculate percentage.
fullHeight
floatcontainer height to calculate percentage.
outXValue
UnitValueUnitValue to store processed xPosition.
outYValue
UnitValueUnitValue to store processed yPosition.
Equals(object)
public override bool Equals(object o)
Parameters
o
object
Returns
- bool
true if every field equals. False otherwise.
GetHashCode()
public override int GetHashCode()
Returns
- int
object's hashCode.
GetPositionX()
Gets horizontal position.
public virtual BackgroundPosition.PositionX GetPositionX()
Returns
- BackgroundPosition.PositionX
position in x-dimension
GetPositionY()
Gets vertical position.
public virtual BackgroundPosition.PositionY GetPositionY()
Returns
- BackgroundPosition.PositionY
position in y-dimension
GetXShift()
Gets horizontal shift.
public virtual UnitValue GetXShift()
Returns
- UnitValue
shift in x-dimension from left
GetYShift()
Gets vertical shift.
public virtual UnitValue GetYShift()
Returns
- UnitValue
shift in y-dimension from top
SetPositionX(PositionX)
Sets horizontal position.
public virtual BackgroundPosition SetPositionX(BackgroundPosition.PositionX xPosition)
Parameters
xPosition
BackgroundPosition.PositionXposition in x-dimension
Returns
SetPositionY(PositionY)
Sets vertical position.
public virtual BackgroundPosition SetPositionY(BackgroundPosition.PositionY yPosition)
Parameters
yPosition
BackgroundPosition.PositionYposition in y-dimension
Returns
SetXShift(UnitValue)
Sets horizontal shift.
public virtual BackgroundPosition SetXShift(UnitValue xShift)
Parameters
xShift
UnitValueshift in x-dimension from left
Returns
SetYShift(UnitValue)
Sets vertical shift.
public virtual BackgroundPosition SetYShift(UnitValue yShift)
Parameters
yShift
UnitValueshift in y-dimension