Documentation

Wrap extends AbstractAlignment
in package

Pdf page text wrap class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2023 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
4.2.0

Table of Contents

LEFT  = 'LEFT'
Alignment constants
RIGHT  = 'RIGHT'
$alignment  : string
Text alignment
$box  : array<string|int, mixed>
Wrap box boundary
$leading  : int
Text leading
$leftX  : int
Left X boundary
$rightX  : int
Right X boundary
__construct()  : mixed
Constructor
createLeft()  : Wrap
Create LEFT alignment object
createRight()  : Wrap
Create RIGHT alignment object
getAlignment()  : string
Get alignment
getBox()  : array<string|int, mixed>
Get the wrap box boundary
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
isLeft()  : bool
Is LEFT alignment
isRight()  : bool
Is RIGHT alignment
setAlignment()  : AbstractAlignment
Set alignment
setBox()  : Wrap
Set the wrap box boundary
setBoxCoordinates()  : Wrap
Set the wrap box boundary by coordinates
setLeading()  : AbstractAlignment
Set the leading
setLeftX()  : AbstractAlignment
Set the left X boundary
setRightX()  : AbstractAlignment
Set the right X boundary

Constants

Properties

$box

Wrap box boundary

protected array<string|int, mixed> $box = ['left' => 0, 'right' => 0, 'top' => 0, 'bottom' => 0]

Methods

__construct()

Constructor

public __construct([string $alignment = self::LEFT ], int $leftX, int $rightX[, array<string|int, mixed> $box = [] ], int $leading) : mixed

Instantiate a PDF text wrap object.

Parameters
$alignment : string = self::LEFT
$leftX : int
$rightX : int
$box : array<string|int, mixed> = []
$leading : int
Return values
mixed

createLeft()

Create LEFT alignment object

public static createLeft(int $leftX, int $rightX[, array<string|int, mixed> $box = [] ], int $leading) : Wrap
Parameters
$leftX : int
$rightX : int
$box : array<string|int, mixed> = []
$leading : int
Return values
Wrap

createRight()

Create RIGHT alignment object

public static createRight(int $leftX, int $rightX[, array<string|int, mixed> $box = [] ], int $leading) : Wrap
Parameters
$leftX : int
$rightX : int
$box : array<string|int, mixed> = []
$leading : int
Return values
Wrap

getAlignment()

Get alignment

public getAlignment() : string
Return values
string

getBox()

Get the wrap box boundary

public getBox() : array<string|int, mixed>
Return values
array<string|int, mixed>

getLeading()

Get the leading

public getLeading() : int
Return values
int

getStrings()

Get strings

public getStrings(Text $text, Font $font, int $startY) : array<string|int, mixed>
Parameters
$text : Text
$font : Font
$startY : int
Return values
array<string|int, mixed>

isRight()

Is RIGHT alignment

public isRight() : bool
Return values
bool

setBox()

Set the wrap box boundary

public setBox(array<string|int, mixed> $box) : Wrap
Parameters
$box : array<string|int, mixed>
Tags
throws
InvalidArgumentException
Return values
Wrap

setBoxCoordinates()

Set the wrap box boundary by coordinates

public setBoxCoordinates(int $left, int $right, int $top, int $bottom) : Wrap
Parameters
$left : int
$right : int
$top : int
$bottom : int
Return values
Wrap

Search results