SetaPDF_Core_Canvas_Text A canvas helper class for text operators

File: /SetaPDF/Core/Canvas/Text.php

Class hierarchy

Summary

Constants

RENDERING_MODE_CLIP

Rendering mode

RENDERING_MODE_FILL

Rendering mode

RENDERING_MODE_FILL_AND_CLIP

Rendering mode

RENDERING_MODE_FILL_AND_STROKE

Rendering mode

RENDERING_MODE_FILL_STROKE_AND_CLIP

RENDERING_MODE_INVISIBLE

Rendering mode

RENDERING_MODE_STROKE

Rendering mode

RENDERING_MODE_STROKE_AND_CLIP

Rendering mode


Properties

$_canvas

The origin canvas object


Methods

__construct()

The constructor.

Parameters
$canvas : SetaPDF_Core_Canvas
 

addCurrentTransformationMatrix()

public $this SetaPDF_Core_Canvas_StandardOperators::addCurrentTransformationMatrix ( float|int $a, float|int $b, float|int $c, float|int $d, float|int $e, float|int $f )

Proxy method for adding a transformation matrix on the canvas.

Parameters
$a : float|int
 
$b : float|int
 
$c : float|int
 
$d : float|int
 
$e : float|int
 
$f : float|int
 
See

begin()

Begin a text object.

beginText()

cleanUp()

Release objects to free memory and cycled references.

After calling this method the instance of this object is unusable!

draw()

Get the draw helper.

end()

End a text object.

endText()

moveToNextLine()

public SetaPDF_Core_Canvas_Text SetaPDF_Core_Canvas_Text::moveToNextLine ( float $x, float $y [, boolean $setLeading = false ] )

Move to the next line.

Parameters
$x : float
 
$y : float
 
$setLeading : boolean
 

moveToNextLineAndShowText()

public SetaPDF_Core_Canvas_Text SetaPDF_Core_Canvas_Text::moveToNextLineAndShowText ( string|string[] $text [, float $wordSpacing = null [, float $charSpacing = null ]] )

Move to the next line and show text.

Parameters
$text : string|string[]
 
$wordSpacing : float
 
$charSpacing : float
 

moveToStartOfNextLine()

Move to the start of the next line.

path()

Get the path helper.

restoreGraphicState()

Proxy method for restoring the graphic state on the canvas.

See

rotate()

public $this SetaPDF_Core_Canvas_StandardOperators::rotate ( int|float $x, int|float $y, int|float $angle )

Proxy method for rotating the transformation matrix on the canvas.

Parameters
$x : int|float

X-coordinate of rotation point

$y : int|float

Y-coordinate of rotation point

$angle : int|float

Angle to rotate in degrees

See

saveGraphicState()

Proxy method for saving the graphic state on the canvas.

See

scale()

public $this SetaPDF_Core_Canvas_StandardOperators::scale ( int|float $scaleX, int|float $scaleY )

Proxy method for scaling the transformation matrix on the canvas.

Parameters
$scaleX : int|float

Scale factor on X

$scaleY : int|float

Scale factor on Y

See

setCharSpacing()

public SetaPDF_Core_Canvas_Text SetaPDF_Core_Canvas_Text::setCharSpacing ( [ float $charSpacing = 0.0 ] )

Alias for setCharacterSpacing()

Parameters
$charSpacing : float
 
See

setCharacterSpacing()

Set the char spacing.

Parameters
$charSpacing : float
 

setColor()

public $this SetaPDF_Core_Canvas_StandardOperators::setColor ( SetaPDF_Core_DataStructure_Color|int[]|int|string $color [, boolean $stroking = true ] )

Proxy method for setting the color on the canvas.

Parameters
$color : SetaPDF_Core_DataStructure_Color|int[]|int|string
 
$stroking : boolean
 
See

setFont()

public SetaPDF_Core_Canvas_Text SetaPDF_Core_Canvas_Text::setFont ( string $name [, float $size = 12.0 ] )

Set the font.

Parameters
$name : string
 
$size : float
 
Exceptions

Throws InvalidArgumentException

setGraphicState()

Proxy method for setting a graphic state on the canvas.

Parameters
$graphicState : SetaPDF_Core_Resource_ExtGState
 
See

setLeading()

public SetaPDF_Core_Canvas_Text SetaPDF_Core_Canvas_Text::setLeading ( [ float $leading = 0.0 ] )

Set the leading.

Parameters
$leading : float
 

setNonStrokingColor()

Proxy method for setting the non-stroking color on the canvas.

Parameters
$color : SetaPDF_Core_DataStructure_Color|int[]|int|string
 
See

setRenderingMode()

public SetaPDF_Core_Canvas_Text SetaPDF_Core_Canvas_Text::setRenderingMode ( [ integer $renderingMode = 0 ] )

Set the rendering mode.

The available rendering modes are also available through class constants such as SetaPDF_Core_Canvas_Text::RENDERING_MODE_CLIP.

Parameters
$renderingMode : integer
 
See
  • PDF reference 32000-1:2008 9.3.6 Text Rendering Mode

setRise()

Set text rise.

Parameters
$rise : float
 

setScaling()

public SetaPDF_Core_Canvas_Text SetaPDF_Core_Canvas_Text::setScaling ( [ float $scaling = 100.0 ] )

Set the horizontal scaling.

Parameters
$scaling : float
 

setStrokingColor()

Proxy method for setting the stroking color on the canvas.

Parameters
$color : SetaPDF_Core_DataStructure_Color|int[]|int|string
 
See

setTextMatrix()

public SetaPDF_Core_Canvas_Text SetaPDF_Core_Canvas_Text::setTextMatrix ( float $a, float $b, float $c, float $d, float $e, float $f )

Set the text matrix.

Parameters
$a : float
 
$b : float
 
$c : float
 
$d : float
 
$e : float
 
$f : float
 

setTextRise()

public SetaPDF_Core_Canvas_Text SetaPDF_Core_Canvas_Text::setTextRise ( [ float $textRise = 0.0 ] )

Alias for setRise()

Parameters
$textRise : float
 
See

setWordSpacing()

public SetaPDF_Core_Canvas_Text SetaPDF_Core_Canvas_Text::setWordSpacing ( [ float $wordSpacing = 0.0 ] )

Set the word spacing.

Parameters
$wordSpacing : float
 

showText()

Show text.

Parameters
$text : string|string[]
 

showTextStrings()

Shows text strings.

Parameters
$textStrings : array|string
 

skew()

public $this SetaPDF_Core_Canvas_StandardOperators::skew ( int|float $angleX, int|float $angleY [, int|float $x = 0 [, int|float $y = 0 ]] )

Proxy method for skewing the transformation matrix on the canvas.

Parameters
$angleX : int|float

Angle to x-axis in degrees

$angleY : int|float

Angle to y-axis in degrees

$x : int|float

Points to stretch on x-axis

$y : int|float

Point to stretch on y-axis

See

text()

Get the text helper.

translate()

public $this SetaPDF_Core_Canvas_StandardOperators::translate ( int|float $shiftX, int|float $shiftY )

Proxy method for moving the transformation matrix on the canvas.

Parameters
$shiftX : int|float

Points to move on x-axis

$shiftY : int|float

Points to move on y-axis

See