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-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

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

version
5.2.0

Table of Contents

Constants

LEFT  = 'LEFT'
Alignment constants
RIGHT  = 'RIGHT'

Properties

$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

Methods

__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 = 0 ][, int $rightX = 0 ][, array<string|int, mixed> $box = [] ][, int $leading = 0 ]) : mixed

Instantiate a PDF text wrap object.

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

createLeft()

Create LEFT alignment object

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

createRight()

Create RIGHT alignment object

public static createRight([int $leftX = 0 ][, int $rightX = 0 ][, array<string|int, mixed> $box = [] ][, int $leading = 0 ]) : Wrap
Parameters
$leftX : int = 0
$rightX : int = 0
$box : array<string|int, mixed> = []
$leading : int = 0
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>

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>

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

        
On this page

Search results