setasign\SetaPDF2\Core\Canvas
Path A canvas helper class for path operators
File: /SetaPDF v2/Core/Canvas/Path.php
Old class name (alias):
\SetaPDF_Core_Canvas_Path
Class hierarchy
Summary
Methods
- __construct()
- addCurrentTransformationMatrix()
- cleanUp()
- clip()
- clipEvenOdd()
- close()
- closeAndStroke()
- closeFillAndStroke()
- closeFillAndStrokeEvenOdd()
- curveTo()
- draw()
- endPath()
- fill()
- fillAndStroke()
- fillAndStrokeEvenOdd()
- fillEvenOdd()
- lineTo()
- markedContent()
- moveTo()
- path()
- rect()
- restoreGraphicState()
- rotate()
- saveGraphicState()
- scale()
- setColor()
- setDashPattern()
- setGraphicState()
- setLineCap()
- setLineJoin()
- setLineWidth()
- setMiterLimit()
- setNonStrokingColor()
- setStrokingColor()
- skew()
- stroke()
- text()
- translate()
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()
addCurrentTransformationMatrix()
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
curveTo()
float $y1,
float $x2,
float $y2,
float|string|null $x3 = null,
?float $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
rect()
Append a rectangle to the current path as a complete subpath.
Parameters
- $x : float
- $y : float
- $width : float
- $height : float
rotate()
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
scale()
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()
Proxy method for setting the color on the canvas.
Parameters
- $color : \SetaPDF_Core_DataStructure_Color|int[]|int|string
- $stroking : bool
See
setDashPattern()
int $phase = 0
Set the dash pattern.
Parameters
- $dashesAndGaps : array
- $phase : int
setGraphicState()
Proxy method for setting a graphic state on the canvas.
Parameters
- $graphicState : \SetaPDF_Core_Resource_ExtGState
See
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()
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
translate()
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