SetaPDF_Core_Canvas_Path A canvas helper class for path operators

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

Class hierarchy

Summary

Constants

LINE_CAP_BUTT

Line cap style

LINE_CAP_PROJECTING_SQUARE

Line cap style

LINE_CAP_ROUND

Line cap style

LINE_JOIN_BEVEL

Line join type

LINE_JOIN_MITER

Line join type

LINE_JOIN_ROUND

Line join type


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

cleanUp()

Release objects to free memory and cycled references.

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

clip()

Clip the current path.

clipEvenOdd()

Clip the current path using even-odd rule.

close()

public $this SetaPDF_Core_Canvas_Path::close ( void )

Close the current subpath by appending a straight line segment from the current point to the starting point of the subpath.

closeAndStroke()

Close and stroke the path.

closeFillAndStroke()

Close, fill and stroke the path.

closeFillAndStrokeEvenOdd()

Close, fill and stroke the path using even-odd rule.

curveTo()

public SetaPDF_Core_Canvas_Path SetaPDF_Core_Canvas_Path::curveTo ( float $x1, float $y1, float $x2, float $y2 [, float|string|null $x3 = null [, float|null $y3 = null ]] )

Append a cubic Bézier curve to the current path.

Parameters
$x1 : float
 
$y1 : float
 
$x2 : float
 
$y2 : float
 
$x3 : float|string|null

Also used as control parameter to define the coincide point

$y3 : float|null
 

draw()

Get the draw helper.

endPath()

End the path object without filling or stroking it.

fill()

Fill the path.

fillAndStroke()

Fill and stroke the path.

fillAndStrokeEvenOdd()

Fill and stroke the path using even-odd rule.

fillEvenOdd()

Fill the path using even-odd rule.

lineTo()

Append a straight line segment.

Parameters
$x : float
 
$y : float
 

moveTo()

Begin a new subpath at a specific position.

Parameters
$x : float
 
$y : float
 

path()

Get the path helper.

rect()

public SetaPDF_Core_Canvas_Path SetaPDF_Core_Canvas_Path::rect ( float $x, float $y, float $width, float $height )

Append a rectangle to the current path as a complete subpath.

Parameters
$x : float
 
$y : float
 
$width : float
 
$height : float
 

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

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

setDashPattern()

public SetaPDF_Core_Canvas_Path SetaPDF_Core_Canvas_Path::setDashPattern ( [ array $dashesAndGaps = array ( ) [, integer $phase = 0 ]] )

Set the dash pattern.

Parameters
$dashesAndGaps : array
 
$phase : integer
 

setGraphicState()

Proxy method for setting a graphic state on the canvas.

Parameters
$graphicState : SetaPDF_Core_Resource_ExtGState
 
See

setLineCap()

public SetaPDF_Core_Canvas_Path SetaPDF_Core_Canvas_Path::setLineCap ( [ integer $lineCap = self::LINE_CAP_BUTT ] )

Set the line cap style.

Parameters
$lineCap : integer
 

setLineJoin()

public SetaPDF_Core_Canvas_Path SetaPDF_Core_Canvas_Path::setLineJoin ( [ integer $lineJoin = self::LINE_JOIN_MITER ] )

Set the line join type.

Parameters
$lineJoin : integer
 

setLineWidth()

public SetaPDF_Core_Canvas_Path SetaPDF_Core_Canvas_Path::setLineWidth ( [ float $lineWidth = 1.0 ] )

Set the line width.

Parameters
$lineWidth : float
 

setMiterLimit()

public SetaPDF_Core_Canvas_Path SetaPDF_Core_Canvas_Path::setMiterLimit ( [ float $miterLimit = 10.0 ] )

Set the miter limit.

Parameters
$miterLimit : float
 

setNonStrokingColor()

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

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

setStrokingColor()

Proxy method for setting the stroking color on the canvas.

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

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

stroke()

Stroke the path.

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