Alignment
extends AbstractAlignment
in package
Pdf page text alignment class
Tags
Table of Contents
- CENTER = 'CENTER'
- Alignment constants
- LEFT = 'LEFT'
- Alignment constants
- RIGHT = 'RIGHT'
- $alignment : string
- Text alignment
- $leading : int
- Text leading
- $leftX : int
- Left X boundary
- $rightX : int
- Right X boundary
- __construct() : mixed
- Constructor
- createCenter() : Alignment
- Create CENTER alignment object
- createLeft() : Alignment
- Create LEFT alignment object
- createRight() : Alignment
- Create RIGHT alignment object
- getAlignment() : string
- Get alignment
- getLeading() : int
- Get the leading
- getLeftX() : int
- Get the left X
- getRightX() : int
- Get the right X
- getStrings() : array<string|int, mixed>
- Get strings
- hasLeading() : bool
- Has leading
- hasLeftX() : bool
- Has left X
- hasRightX() : bool
- Has right X
- isCenter() : bool
- Is CENTER alignment
- isLeft() : bool
- Is LEFT alignment
- isRight() : bool
- Is RIGHT alignment
- setAlignment() : AbstractAlignment
- Set alignment
- setLeading() : AbstractAlignment
- Set the leading
- setLeftX() : AbstractAlignment
- Set the left X boundary
- setRightX() : AbstractAlignment
- Set the right X boundary
Constants
CENTER
Alignment constants
public
mixed
CENTER
= 'CENTER'
LEFT
Alignment constants
public
mixed
LEFT
= 'LEFT'
RIGHT
public
mixed
RIGHT
= 'RIGHT'
Properties
$alignment
Text alignment
protected
string
$alignment
= self::LEFT
$leading
Text leading
protected
int
$leading
= 0
$leftX
Left X boundary
protected
int
$leftX
= 0
$rightX
Right X boundary
protected
int
$rightX
= 0
Methods
__construct()
Constructor
public
__construct([string $alignment = self::LEFT ], int $leftX, int $rightX, int $leading) : mixed
Instantiate a PDF text alignment object.
Parameters
- $alignment : string = self::LEFT
- $leftX : int
- $rightX : int
- $leading : int
Return values
mixed —createCenter()
Create CENTER alignment object
public
static createCenter(int $leftX, int $rightX, int $leading) : Alignment
Parameters
- $leftX : int
- $rightX : int
- $leading : int
Return values
Alignment —createLeft()
Create LEFT alignment object
public
static createLeft(int $leftX, int $rightX, int $leading) : Alignment
Parameters
- $leftX : int
- $rightX : int
- $leading : int
Return values
Alignment —createRight()
Create RIGHT alignment object
public
static createRight(int $leftX, int $rightX, int $leading) : Alignment
Parameters
- $leftX : int
- $rightX : int
- $leading : int
Return values
Alignment —getAlignment()
Get alignment
public
getAlignment() : string
Return values
string —getLeading()
Get the leading
public
getLeading() : int
Return values
int —getLeftX()
Get the left X
public
getLeftX() : int
Return values
int —getRightX()
Get the right X
public
getRightX() : int
Return values
int —getStrings()
Get strings
public
getStrings(Text $text, Font $font, int $startY) : array<string|int, mixed>
Parameters
Return values
array<string|int, mixed> —hasLeading()
Has leading
public
hasLeading() : bool
Return values
bool —hasLeftX()
Has left X
public
hasLeftX() : bool
Return values
bool —hasRightX()
Has right X
public
hasRightX() : bool
Return values
bool —isCenter()
Is CENTER alignment
public
isCenter() : bool
Return values
bool —isLeft()
Is LEFT alignment
public
isLeft() : bool
Return values
bool —isRight()
Is RIGHT alignment
public
isRight() : bool
Return values
bool —setAlignment()
Set alignment
public
setAlignment(string $alignment) : AbstractAlignment
Parameters
- $alignment : string
Return values
AbstractAlignment —setLeading()
Set the leading
public
setLeading(int $leading) : AbstractAlignment
Parameters
- $leading : int
Return values
AbstractAlignment —setLeftX()
Set the left X boundary
public
setLeftX(int $x) : AbstractAlignment
Parameters
- $x : int
Return values
AbstractAlignment —setRightX()
Set the right X boundary
public
setRightX(int $x) : AbstractAlignment
Parameters
- $x : int