Table of contents
Namespace: Com\Tecnick\Pdf\Graph
Extends: Raw
Abstract: Yes
File: Gradient.php line 41
Tags
- since: 2011-05-23
- category: Library
- author: Nicola Asuni info@tecnick.com
- copyright: 2011-2026 Nicola Asuni - Tecnick.com LTD
- license: https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE)
- link: https://github.com/tecnickcom/tc-lib-pdf-graph
- phpstan-import-type: GradientData from \Com\Tecnick\Pdf\Graph\Base
- phpstan-import-type: StyleDataOpt from \Com\Tecnick\Pdf\Graph\Base
- SuppressWarnings: (“PHPMD.ExcessiveClassComplexity”)
Constants
IDMATRIX
File: Base.php line 101
public TTMatrix IDMATRIX = [1.0, 0.0, 0.0, 1.0, 0.0, 0.0]
MPI
File: Base.php line 94
public float MPI = 3.141592653589793
Methods
__construct()
File: Base.php line 191
public __construct(float $kunit, float $pagew, float $pageh, Pdf $pdfColor, Encrypt $encrypt[, bool $notransparency = false ][, bool $compress = true ]) : mixed
Parameters
- $kunit : float: Unit of measure conversion ratio.
- $pagew : float: Page width.
- $pageh : float: Page height.
- $pdfColor : Pdf: Color object.
- $encrypt : Encrypt: Encrypt object.
- $notransparency : bool = false: True when the conformance mode forbids transparency (PDF/A-1, PDF/X-1a, PDF/X-3): alpha, blend modes and soft masks are suppressed. Shadings stay available.
- $compress : bool = true: Set to false to disable stream compression.
Tags
- throws: Exception
add()
File: Style.php line 233
public add([StyleDataOpt $style = [] ][, bool $inheritlast = false ]) : string
Parameters
- $style : StyleDataOpt = []: Style to add.
- $inheritlast : bool = false: If true inherit missing values from the last style.
Return values
string —
PDF style string
degToRad()
File: Transform.php line 393
public degToRad(float $deg) : float
Parameters
- $deg : float: Angular value in degrees.
Return values
float —
Angle in radians
getAlpha()
File: Gradient.php line 828
public getAlpha([float $stroking = 1 ][, string|BlendMode $bmv = 'Normal' ][, float|string $nonstroking = '' ][, bool $ais = false ]) : string
Parameters
- $stroking : float = 1: Alpha value for stroking operations: real value from 0 (transparent) to 1 (opaque).
- $bmv : string|BlendMode = ‘Normal’: Blend mode, one of the following: Normal, Multiply, Screen, Overlay, Darken, Lighten, ColorDodge, ColorBurn, HardLight, SoftLight, Difference, Exclusion, Hue, Saturation, Color, Luminosity.
- $nonstroking : float|string = ‘’: Alpha value for non-stroking operations: real value from 0 (transparent) to 1 (opaque).
- $ais : bool = false: Alpha-Is-Shape flag set on the /AIS ExtGState key.
Return values
string —
PDF command
getBasicRect()
File: Gradient.php line 65
public getBasicRect(float $posx, float $posy, float $width, float $height[, string|PathPaintOp $mode = 'S' ][, StyleDataOpt $style = [] ]) : string
Parameters
- $posx : float: Abscissa of upper-left corner.
- $posy : float: Ordinate of upper-left corner.
- $width : float: Width.
- $height : float: Height.
- $mode : string|PathPaintOp = ‘S’: Mode of rendering. @see getPathPaintOp()
- $style : StyleDataOpt = []: Style.
Return values
string —
PDF command
getClippingRect()
File: Gradient.php line 201
public getClippingRect(float $posx, float $posy, float $width, float $height[, bool $eoclip = false ]) : string
Parameters
- $posx : float: Abscissa of the top left corner of the rectangle.
- $posy : float: Ordinate of the top left corner of the rectangle.
- $width : float: Width of the rectangle.
- $height : float: Height of the rectangle.
- $eoclip : bool = false: If true, set clipping path using even-odd rule.
Return values
string —
PDF command
getColorRegistrationBar()
File: Gradient.php line 653
public getColorRegistrationBar(float $posx, float $posy, float $width, float $height[, bool $vertical = false ][, array<int, string|array<string|int, string>> $colors = [ // GRAY : black to white ['g(0%)', 'g(100%)'], // RGB : red to white ['rgb(100%,0%,0%)', 'rgb(100%,100%,100%)'], // RGB : green to white ['rgb(0%,100%,0%)', 'rgb(100%,100%,100%)'], // RGB : blue to white ['rgb(0%,0%,100%)', 'rgb(100%,100%,100%)'], // CMYK : cyan to white ['cmyk(100%,0%,0%,0%)', 'cmyk(0%,0%,0%,0%)'], // CMYK : magenta to white ['cmyk(0%,100%,0%,0%)', 'cmyk(0%,0%,0%,0%)'], // CMYK : yellow to white ['cmyk(0%,0%,100%,0%)', 'cmyk(0%,0%,0%,0%)'], // CMYK : black to white ['cmyk(0%,0%,0%,100%)', 'cmyk(0%,0%,0%,0%)'], ] ]) : string
Parameters
- $posx : float: Abscissa of the top left corner of the rectangle.
- $posy : float: Ordinate of the top left corner of the rectangle.
- $width : float: Width of the rectangle.
- $height : float: Height of the rectangle.
- $vertical : bool = false: If true prints bar vertically, otherwise horizontally.
- $colors : array<int, string|array<string|int, string» = [ // GRAY : black to white [‘g(0%)’, ‘g(100%)’], // RGB : red to white [‘rgb(100%,0%,0%)’, ‘rgb(100%,100%,100%)’], // RGB : green to white [‘rgb(0%,100%,0%)’, ‘rgb(100%,100%,100%)’], // RGB : blue to white [‘rgb(0%,0%,100%)’, ‘rgb(100%,100%,100%)’], // CMYK : cyan to white [‘cmyk(100%,0%,0%,0%)’, ‘cmyk(0%,0%,0%,0%)’], // CMYK : magenta to white [‘cmyk(0%,100%,0%,0%)’, ‘cmyk(0%,0%,0%,0%)’], // CMYK : yellow to white [‘cmyk(0%,0%,100%,0%)’, ‘cmyk(0%,0%,0%,0%)’], // CMYK : black to white [‘cmyk(0%,0%,0%,100%)’, ‘cmyk(0%,0%,0%,0%)’], ]: Array of colors to print: each entry is a color string or an array of two transition colors.
Tags
- SuppressWarnings: (“PHPMD.CyclomaticComplexity”)
- throws: Exception
Return values
string —
PDF command
getCoonsPatchMesh()
File: Gradient.php line 570
public getCoonsPatchMesh(float $posx, float $posy, float $width, float $height[, array<string|int, array{'f': int, 'points': float[], 'colors': array>}> $patch_array = [] ][, float $coords_min = 0.0 ][, float $coords_max = 1.0 ][, bool $antialias = false ]) : string
Parameters
- $posx : float: Abscissa of the top left corner of the rectangle.
- $posy : float: Ordinate of the top left corner of the rectangle.
- $width : float: Width of the rectangle.
- $height : float: Height of the rectangle.
- $patch_array : array<string|int, array{‘f’: int, ‘points’: float[], ‘colors’: array>}> = []: One entry for each patch: f = position of the patch (0 = first patch; 1, 2, 3 = right, top and left); points = pairs of coordinates (normally from 0 to 1) of the Bezier control points that define the patch: 12 pairs for the first patch, 8 pairs for the following ones, ignoring the coordinates already defined by the preceding patch. The first pair is the lower left edge point, the next is its right control point (control point 2), then the other points follow counter-clockwise around the patch in the order: control point 1, edge point, control point 2. The last pair is the left control point (control point 1) of the first edge point; colors = 4 colors for the first patch, 2 colors for the following ones.
- $coords_min : float = 0.0: Minimum value used by the coordinates: smaller values are cut to coords_min.
- $coords_max : float = 1.0: Maximum value used by the coordinates: greater values are cut to coords_max.
- $antialias : bool = false: Flag indicating whether to filter the shading function to prevent aliasing artifacts.
Tags
- SuppressWarnings: (“PHPMD.ExcessiveParameterList”)
- SuppressWarnings: (“PHPMD.ExcessiveMethodLength”)
- SuppressWarnings: (“PHPMD.CyclomaticComplexity”)
- throws: Exception
Return values
string —
PDF command
getCoonsPatchMeshWithCoords()
File: Gradient.php line 441
public getCoonsPatchMeshWithCoords(float $posx, float $posy, float $width, float $height[, string $colll = 'yellow' ][, string $collr = 'blue' ][, string $colur = 'green' ][, string $colul = 'red' ][, array<string|int, float> $coords = [0.0, 0.0, 0.33, 0.0, 0.67, 0.0, 1.0, 0.0, 1.0, 0.33, 1.0, 0.67, 1.0, 1.0, 0.67, 1.0, 0.33, 1.0, 0.0, 1.0, 0.0, 0.67, 0.0, 0.33] ][, float $coords_min = 0.0 ][, float $coords_max = 1.0 ][, bool $antialias = false ]) : string
Parameters
- $posx : float: Abscissa of the top left corner of the rectangle.
- $posy : float: Ordinate of the top left corner of the rectangle.
- $width : float: Width of the rectangle.
- $height : float: Height of the rectangle.
- $colll : string = ‘yellow’: Lower-Left corner color.
- $collr : string = ‘blue’: Lower-Right corner color.
- $colur : string = ‘green’: Upper-Right corner color.
- $colul : string = ‘red’: Upper-Left corner color.
- $coords : array<string|int, float> = [0.0, 0.0, 0.33, 0.0, 0.67, 0.0, 1.0, 0.0, 1.0, 0.33, 1.0, 0.67, 1.0, 1.0, 0.67, 1.0, 0.33, 1.0, 0.0, 1.0, 0.0, 0.67, 0.0, 0.33]: Coordinates of the 12 Bezier control points of the patch.
- $coords_min : float = 0.0: Minimum value used by the coordinates: smaller values are cut to coords_min.
- $coords_max : float = 1.0: Maximum value used by the coordinates: greater values are cut to coords_max.
- $antialias : bool = false: Flag indicating whether to filter the shading function to prevent aliasing artifacts.
Tags
- SuppressWarnings: (“PHPMD.ExcessiveParameterList”)
- SuppressWarnings: (“PHPMD.ExcessiveMethodLength”)
- throws: Exception
Return values
string —
PDF command
getCropMark()
File: Gradient.php line 744
public getCropMark(float $posx, float $posy, float $width, float $height[, string $type = 'TBLR' ][, StyleDataOpt $style = [] ]) : string
Parameters
- $posx : float: Abscissa of the crop-mark center.
- $posy : float: Ordinate of the crop-mark center.
- $width : float: Width of the crop-mark.
- $height : float: Height of the crop-mark.
- $type : string = ‘TBLR’: Type of crop mark - one symbol per type: T = TOP, B = BOTTOM, L = LEFT, R = RIGHT
- $style : StyleDataOpt = []: Line style to apply.
Return values
string —
PDF command
getCtmProduct()
File: Transform.php line 374
public getCtmProduct(TTMatrix $tma, TTMatrix $tmb) : TTMatrix
Parameters
- $tma : TTMatrix: First Transformation Matrix.
- $tmb : TTMatrix: Second Transformation Matrix.
Return values
TTMatrix —
CTM Transformation Matrix.
getCurrentStyleArray()
File: Style.php line 290
public getCurrentStyleArray() : StyleDataOpt
Return values
StyleDataOpt
getCurrentStyleItem()
File: Style.php line 331
public getCurrentStyleItem(string $item) : mixed
Parameters
- $item : string: Item to search.
Tags
- throws: Exception
getDefaultStyle()
File: Base.php line 227
public getDefaultStyle([StyleDataOpt $style = [] ]) : StyleData
Parameters
- $style : StyleDataOpt = []: Style parameters to merge to the default ones.
Return values
StyleData
getExtGState()
File: Style.php line 606
public getExtGState(array<string, int|float|bool|string> $parms) : string
Parameters
- $parms : array<string, int|float|bool|string>: parameters.
Return values
string —
PDF command.
getGradient()
File: Gradient.php line 259
public getGradient(int $type, array<string|int, float> $coords, array<int, array{'color': string, 'exponent'?: float, 'opacity'?: float, 'offset'?: float}> $stops, string $bgcolor[, bool $antialias = false ]) : string
When a stop is not fully opaque the command also selects the soft-mask ExtGState of the gradient, so the caller is responsible for wrapping it between “q” and “Q”.
Parameters
- $type : int: Type of gradient: 2 = Axial shading; 3 = Radial shading.
- $coords : array<string|int, float>: Array of coordinates: (x0, y0, x1, y1) for type 2, (fx, fy, cx, cy, r) for type 3.
- $stops : array<int, array{‘color’: string, ’exponent’?: float, ‘opacity’?: float, ‘offset’?: float}>: Gradient color stops (at least two entries): color = color; offset = (0 to 1) location along the gradient vector; opacity = (0 to 1) stop opacity; exponent = exponent of the exponential interpolation function (default = 1) used between the previous stop and this one, so the value set on the first stop is unused.
- $bgcolor : string: Background color.
- $antialias : bool = false: Flag indicating whether to filter the shading function to prevent aliasing artifacts.
Tags
- throws: Exception
Return values
string —
PDF command
getGradientsArray()
File: Gradient.php line 48
public getGradientsArray() : array<int, GradientData>
Return values
array<int, GradientData>
getGradientTransform()
File: Gradient.php line 217
public getGradientTransform(float $posx, float $posy, float $width, float $height) : string
Parameters
- $posx : float: Abscissa of the top left corner of the rectangle.
- $posy : float: Ordinate of the top left corner of the rectangle.
- $width : float: Width of the rectangle.
- $height : float: Height of the rectangle.
Return values
string —
PDF command
getHorizMirroring()
File: Transform.php line 216
public getHorizMirroring(float $posx) : string
Parameters
- $posx : float: Abscissa of the mirroring line.
Tags
- throws: Exception
Return values
string —
Transformation string
getHorizScaling()
File: Transform.php line 147
public getHorizScaling(float $skx, float $posx, float $posy) : string
Parameters
- $skx : float: Horizontal scaling factor.
- $posx : float: Abscissa of the scaling center.
- $posy : float: Ordinate of the scaling center.
Tags
- throws: Exception
Return values
string —
Transformation string
getHorizSkewing()
File: Transform.php line 345
public getHorizSkewing(float $angx, float $posx, float $posy) : string
Parameters
- $angx : float: Angle in degrees between -90 (skew to the left) and 90 (skew to the right)
- $posx : float: Abscissa of the skewing center.
- $posy : float: Ordinate of the skewing center.
Tags
- throws: Exception
Return values
string —
Transformation string
getHorizTranslation()
File: Transform.php line 287
public getHorizTranslation(float $trx) : string
Parameters
- $trx : float: Movement to the right.
Return values
string —
Transformation string
getLastExtGStateID()
File: Base.php line 355
public getLastExtGStateID() : int|null
Return values
int|null
getLastGradientID()
File: Gradient.php line 336
public getLastGradientID() : int|null
This is the key accepted by getOutGradientResourcesByKeys(), not the PDF object number.
Return values
int|null
getLastStyleProperty()
File: Style.php line 307
public getLastStyleProperty(string $property[, int|float|bool|string|null $default = null ]) : int|float|bool|string|null
Parameters
- $property : string: Property to search.
- $default : int|float|bool|string|null = null: Default value to return in case the property is not found.
Return values
int|float|bool|string|null —
Property value or $default in case the property is not found.
getLinearGradient()
File: Gradient.php line 91
public getLinearGradient(float $posx, float $posy, float $width, float $height, string $colorstart, string $colorend[, array<string|int, float> $coords = [0, 0, 1, 0] ]) : string
Parameters
- $posx : float: Abscissa of the top left corner of the rectangle.
- $posy : float: Ordinate of the top left corner of the rectangle.
- $width : float: Width of the rectangle.
- $height : float: Height of the rectangle.
- $colorstart : string: Starting color.
- $colorend : string: Ending color.
- $coords : array<string|int, float> = [0, 0, 1, 0]: Gradient vector (x1, y1, x2, y2).
Tags
- throws: Exception
Return values
string —
PDF command
getModeWithClose()
File: Style.php line 524
public getModeWithClose(string|PathPaintOp $mode) : string
Modes that do not stroke, or that already close, are returned unchanged.
Parameters
- $mode : string|PathPaintOp : Path paint operator.
Return values
string
getModeWithoutClose()
File: Style.php line 544
public getModeWithoutClose(string|PathPaintOp $mode) : string
Parameters
- $mode : string|PathPaintOp : Path paint operator.
Return values
string
getModeWithoutFill()
File: Style.php line 564
public getModeWithoutFill(string|PathPaintOp $mode) : string
Parameters
- $mode : string|PathPaintOp : Path paint operator.
Return values
string
getModeWithoutStroke()
File: Style.php line 584
public getModeWithoutStroke(string|PathPaintOp $mode) : string
Parameters
- $mode : string|PathPaintOp : Path paint operator.
Return values
string
getObjectNumber()
File: Base.php line 268
public getObjectNumber() : int
Return values
int
getOutExtGState()
File: Base.php line 325
public getOutExtGState(int $pon) : string
Parameters
- $pon : int: Current PDF Object Number
Return values
string —
PDF command
getOutExtGStateResources()
File: Base.php line 437
public getOutExtGStateResources() : string
Return values
string —
PDF command
getOutExtGStateResourcesByKeys()
File: Base.php line 449
public getOutExtGStateResourcesByKeys(array<string|int, int> $keys) : string
Parameters
- $keys : array<string|int, int>: Array of extgstates keys.
Return values
string —
PDF command
getOutGradientResources()
File: Base.php line 502
public getOutGradientResources() : string
Return values
string —
PDF command
getOutGradientResourcesByKeys()
File: Base.php line 514
public getOutGradientResourcesByKeys(array<string|int, int> $keys) : string
Parameters
- $keys : array<string|int, int>: Array of gradient keys.
Return values
string —
PDF command
getOutGradientShaders()
File: Base.php line 782
public getOutGradientShaders(int $pon) : string
Parameters
- $pon : int: Current PDF Object Number
Tags
- throws: Exception
Return values
string —
PDF command
getOverprint()
File: Gradient.php line 800
public getOverprint([bool $stroking = true ][, bool|null $nonstroking = null ][, int $mode = 0 ]) : string
(Check the “Entries in a Graphics State Parameter Dictionary” on PDF 32000-1:2008).
Parameters
- $stroking : bool = true: If true apply overprint for stroking operations.
- $nonstroking : bool|null = null: If true apply overprint for painting operations other than stroking.
- $mode : int = 0: Overprint mode: 0 = each source colour component value replaces the value previously painted for the corresponding device colorant; 1 = a tint value of 0.0 for a source colour component leaves the corresponding component of the previously painted colour unchanged.
Return values
string —
PDF command
getPathPaintOp()
File: Style.php line 437
public getPathPaintOp(string|PathPaintOp $mode[, string|PathPaintOp $default = 'S' ]) : string
Parameters
- $mode : string|PathPaintOp : Mode of rendering. Possible values are: - S or D: stroke the path; - s or d: close and stroke the path; - f or F: fill the path, using the nonzero winding number rule; - f* or F*: fill the path, using the even-odd rule; - B or FD or DF: fill and then stroke the path, using the nonzero winding number rule; - B* or FD or DF: fill and then stroke the path, using the even-odd rule; - b or fd or df: close, fill and then stroke the path, using the nonzero winding number rule; - b* or fd or df: close, fill and then stroke the path, using the even-odd rule; - CNZ: clipping mode using the nonzero winding number rule; - CEO: clipping mode using the even-odd rule; - h: close the path; - n: end the path object without filling or stroking it.
- $default : string|PathPaintOp = ‘S’: Mode to use when $mode is empty or unknown.
Return values
string
getPointMirroring()
File: Transform.php line 245
public getPointMirroring(float $posx, float $posy) : string
Parameters
- $posx : float: Abscissa of the mirroring point.
- $posy : float: Ordinate of the mirroring point.
Tags
- throws: Exception
Return values
string —
Transformation string
getPropScaling()
File: Transform.php line 179
public getPropScaling(float $skf, float $posx, float $posy) : string
Parameters
- $skf : float: Scaling factor.
- $posx : float: Abscissa of the scaling center.
- $posy : float: Ordinate of the scaling center.
Tags
- throws: Exception
Return values
string —
Transformation string
getRadialGradient()
File: Gradient.php line 123
public getRadialGradient(float $posx, float $posy, float $width, float $height, string $colorstart, string $colorend[, array<string|int, float> $coords = [0.5, 0.5, 0.5, 0.5, 1] ]) : string
Parameters
- $posx : float: Abscissa of the top left corner of the rectangle.
- $posy : float: Ordinate of the top left corner of the rectangle.
- $width : float: Width of the rectangle.
- $height : float: Height of the rectangle.
- $colorstart : string: Starting color.
- $colorend : string: Ending color.
- $coords : array<string|int, float> = [0.5, 0.5, 0.5, 0.5, 1]: Array of the form (fx, fy, cx, cy, r) where (fx, fy) is the starting point of the gradient with $colorstart (which should be inside the circle), (cx, cy) is the center of the circle with $colorend, and r is the radius of the circle.
Tags
- throws: Exception
Return values
string —
PDF command
getRawCurve()
File: Raw.php line 107
public getRawCurve(float $posx1, float $posy1, float $posx2, float $posy2, float $posx3, float $posy3) : string
The curve shall extend from the current point to the point (posx3, posy3), using (posx1, posy1) and (posx2, posy2) as the Bezier control points. The new current point shall be (posx3, posy3).
Parameters
- $posx1 : float: Abscissa of control point 1.
- $posy1 : float: Ordinate of control point 1.
- $posx2 : float: Abscissa of control point 2.
- $posy2 : float: Ordinate of control point 2.
- $posx3 : float: Abscissa of end point.
- $posy3 : float: Ordinate of end point.
Return values
string —
PDF command
getRawCurveV()
File: Raw.php line 139
public getRawCurveV(float $posx2, float $posy2, float $posx3, float $posy3) : string
The curve shall extend from the current point to the point (posx3, posy3), using the current point and (posx2, posy2) as the Bezier control points. The new current point shall be (posx3, posy3).
Parameters
- $posx2 : float: Abscissa of control point 2.
- $posy2 : float: Ordinate of control point 2.
- $posx3 : float: Abscissa of end point.
- $posy3 : float: Ordinate of end point.
Return values
string —
PDF command
getRawCurveY()
File: Raw.php line 163
public getRawCurveY(float $posx1, float $posy1, float $posx3, float $posy3) : string
The curve shall extend from the current point to the point (posx3, posy3), using (posx1, posy1) and (posx3, posy3) as the Bezier control points. The new current point shall be (posx3, posy3).
Parameters
- $posx1 : float: Abscissa of control point 1.
- $posy1 : float: Ordinate of control point 1.
- $posx3 : float: Abscissa of end point.
- $posy3 : float: Ordinate of end point.
Return values
string —
PDF command
getRawEllipticalArc()
File: Raw.php line 240
public getRawEllipticalArc(float $posxc, float $posyc, float $rdh, float $rdv[, float $posxang = 0.0 ][, float $angs = 0.0 ][, float $angf = 360.0 ][, bool $pie = false ][, float $ncv = 2 ][, bool $startpoint = true ][, bool $ccw = true ][, bool $svg = false ][, array<string|int, float> &$bbox = [] ]) : string
An ellipse is formed from n Bezier curves.
Parameters
- $posxc : float: Abscissa of center point.
- $posyc : float: Ordinate of center point.
- $rdh : float: Horizontal radius.
- $rdv : float: Vertical radius (if = 0 then it is a circle).
- $posxang : float = 0.0: Angle between the X-axis and the major axis of the ellipse.
- $angs : float = 0.0: Angle in degrees at which starting drawing.
- $angf : float = 360.0: Angle in degrees at which stop drawing.
- $pie : bool = false: If true do not mark the border point (used to draw pie sectors).
- $ncv : float = 2: Number of curves used to draw a 90 degrees portion of ellipse.
- $startpoint : bool = true: If true output a starting point.
- $ccw : bool = true: If true draws in counter-clockwise direction.
- $svg : bool = false: If true the angles are in svg mode (already calculated).
- $bbox : array<string|int, float> = []: Filled with the bounding box coordinates (x min, y min, x max, y max) derived from the Bezier control points, or emptied when no arc is drawn.
Tags
- SuppressWarnings: (“PHPMD.ExcessiveParameterList”)
- SuppressWarnings: (“PHPMD.ExcessiveMethodLength”)
Return values
string —
PDF command
getRawLine()
File: Raw.php line 57
public getRawLine(float $posx, float $posy) : string
The new current point shall be the one specified.
Parameters
- $posx : float: Abscissa of end point.
- $posy : float: Ordinate of end point.
Return values
string —
PDF command
getRawPoint()
File: Raw.php line 43
public getRawPoint(float $posx, float $posy) : string
Parameters
- $posx : float: Abscissa of point.
- $posy : float: Ordinate of point.
Return values
string —
PDF command
getRawRect()
File: Raw.php line 74
public getRawRect(float $posx, float $posy, float $width, float $height[, string|PathPaintOp $mode = '' ]) : string
Parameters
- $posx : float: Abscissa of upper-left corner.
- $posy : float: Ordinate of upper-left corner.
- $width : float: Width.
- $height : float: Height.
- $mode : string|PathPaintOp = ‘’: Mode of rendering. @see getPathPaintOp()
Return values
string —
PDF command
getReflection()
File: Transform.php line 261
public getReflection(float $ang, float $posx, float $posy) : string
Parameters
- $ang : float: Gradient angle in degrees of the straight line.
- $posx : float: Abscissa of the mirroring point.
- $posy : float: Ordinate of the mirroring point.
Tags
- throws: Exception
Return values
string —
Transformation string
getRotation()
File: Transform.php line 193
public getRotation(float $angle, float $posx, float $posy) : string
Parameters
- $angle : float: Angle in degrees for counter-clockwise rotation.
- $posx : float: Abscissa of the rotation center.
- $posy : float: Ordinate of the rotation center.
Return values
string —
Transformation string
getScaling()
File: Transform.php line 124
public getScaling(float $skx, float $sky, float $posx, float $posy) : string
Parameters
- $skx : float: Horizontal scaling factor.
- $sky : float: vertical scaling factor.
- $posx : float: Abscissa of the scaling center.
- $posy : float: Ordinate of the scaling center.
Tags
- throws: Exception
Return values
string —
Transformation string
getSkewing()
File: Transform.php line 316
public getSkewing(float $angx, float $angy, float $posx, float $posy) : string
Parameters
- $angx : float: Angle in degrees between -90 (skew to the left) and 90 (skew to the right)
- $angy : float: Angle in degrees between -90 (skew to the bottom) and 90 (skew to the top)
- $posx : float: Abscissa of the skewing center.
- $posy : float: Ordinate of the skewing center.
Tags
- throws: Exception
Return values
string —
Transformation string
getStartTransform()
File: Transform.php line 73
public getStartTransform() : string
This function must be called before calling transformation methods
Return values
string
getStopTransform()
File: Transform.php line 84
public getStopTransform() : string
This function must be called after calling transformation methods.
Return values
string
getStyle()
File: Style.php line 344
public getStyle() : string
Return values
string
getStyleCmd()
File: Style.php line 354
public getStyleCmd([StyleDataOpt $style = [] ]) : string
Parameters
- $style : StyleDataOpt = []: Style to represent.
Return values
string
getTransformation()
File: Transform.php line 103
public getTransformation(TTMatrix $ctm) : string
The matrix is recorded on the transformation stack only when a block opened by getStartTransform() is active.
Parameters
- $ctm : TTMatrix: Transformation matrix array.
Return values
string
getTransformIndex()
File: Transform.php line 64
public getTransformIndex() : int
Return values
int
getTransformStack()
File: Transform.php line 56
public getTransformStack() : array<int, array<int, TTMatrix>>
Return values
array<int, array<int, TTMatrix»
getTranslation()
File: Transform.php line 274
public getTranslation(float $trx, float $try) : string
Parameters
- $trx : float: Movement to the right.
- $try : float: Movement to the bottom.
Return values
string —
Transformation string
getTransparencyExtGStateNames()
File: Base.php line 368
public getTransparencyExtGStateNames() : array<int, string>
The names match the tokens used by the “gs” operator (for example “GS3”).
Return values
array<int, string> —
List of ExtGState resource names.
getVectorsAngle()
File: Raw.php line 410
public getVectorsAngle(float $posx1, float $posy1, float $posx2, float $posy2) : float
Angles are counted counter-clock wise.
Parameters
- $posx1 : float: X coordinate of first vector point.
- $posy1 : float: Y coordinate of first vector point.
- $posx2 : float: X coordinate of second vector point.
- $posy2 : float: Y coordinate of second vector point.
Return values
float —
Angle in radians
getVertMirroring()
File: Transform.php line 230
public getVertMirroring(float $posy) : string
Parameters
- $posy : float: Ordinate of the mirroring line.
Tags
- throws: Exception
Return values
string —
Transformation string
getVertScaling()
File: Transform.php line 163
public getVertScaling(float $sky, float $posx, float $posy) : string
Parameters
- $sky : float: vertical scaling factor.
- $posx : float: Abscissa of the scaling center.
- $posy : float: Ordinate of the scaling center.
Tags
- throws: Exception
Return values
string —
Transformation string
getVertSkewing()
File: Transform.php line 361
public getVertSkewing(float $angy, float $posx, float $posy) : string
Parameters
- $angy : float: Angle in degrees between -90 (skew to the bottom) and 90 (skew to the top)
- $posx : float: Abscissa of the skewing center.
- $posy : float: Ordinate of the skewing center.
Tags
- throws: Exception
Return values
string —
Transformation string
getVertTranslation()
File: Transform.php line 299
public getVertTranslation(float $try) : string
Parameters
- $try : float: Movement to the bottom.
Return values
string —
Transformation string
initStyle()
File: Base.php line 215
public initStyle() : void
isClippingMode()
File: Style.php line 507
public isClippingMode(string|PathPaintOp $mode) : bool
Parameters
- $mode : string|PathPaintOp : Path paint operator.
Return values
bool
isClosingMode()
File: Style.php line 493
public isClosingMode(string|PathPaintOp $mode) : bool
Parameters
- $mode : string|PathPaintOp : Path paint operator.
Return values
bool
isFillingMode()
File: Style.php line 463
public isFillingMode(string|PathPaintOp $mode) : bool
Parameters
- $mode : string|PathPaintOp : Path paint operator.
Return values
bool
isStrokingMode()
File: Style.php line 477
public isStrokingMode(string|PathPaintOp $mode) : bool
Parameters
- $mode : string|PathPaintOp : Path paint operator.
Return values
bool
pop()
File: Style.php line 250
public pop() : string
Tags
- throws: Exception
Return values
string —
PDF style string.
restoreStyleStatus()
File: Style.php line 273
public restoreStyleStatus() : void
saveStyleStatus()
File: Style.php line 265
public saveStyleStatus() : void
setKUnit()
File: Base.php line 308
public setKUnit(float $kunit) : static
Parameters
- $kunit : float: Unit of measure conversion ratio. Must be greater than zero.
Tags
- throws: Exception
Return values
static
setPageHeight()
File: Base.php line 280
public setPageHeight(float $pageh) : float
Parameters
- $pageh : float: Page height.
Return values
float —
previous page height value.
setPageWidth()
File: Base.php line 294
public setPageWidth(float $pagew) : float
Parameters
- $pagew : float: Page width.
Return values
float —
previous page width value.