Table of Contents

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 float

container width to calculate percentage.

fullHeight float

container height to calculate percentage.

outXValue UnitValue

UnitValue to store processed xPosition.

outYValue UnitValue

UnitValue 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.PositionX

position in x-dimension

Returns

BackgroundPosition

BackgroundPosition

SetPositionY(PositionY)

Sets vertical position.

public virtual BackgroundPosition SetPositionY(BackgroundPosition.PositionY yPosition)

Parameters

yPosition BackgroundPosition.PositionY

position in y-dimension

Returns

BackgroundPosition

BackgroundPosition

SetXShift(UnitValue)

Sets horizontal shift.

public virtual BackgroundPosition SetXShift(UnitValue xShift)

Parameters

xShift UnitValue

shift in x-dimension from left

Returns

BackgroundPosition

BackgroundPosition

SetYShift(UnitValue)

Sets vertical shift.

public virtual BackgroundPosition SetYShift(UnitValue yShift)

Parameters

yShift UnitValue

shift in y-dimension

Returns

BackgroundPosition

BackgroundPosition