Table of contents
Namespace: Com\Tecnick\Pdf\Graph
Abstract: Yes
File: Base.php line 87
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-type: TTMatrix array{ float, float, float, float, float, float, }
- phpstan-type: StyleData array{ ’lineWidth’: float, ’lineCap’: string, ’lineJoin’: string, ‘miterLimit’: float, ‘dashArray’: array, ‘dashPhase’: float, ’lineColor’: string, ‘fillColor’: string, }
- phpstan-type: StyleDataOpt array{ ’lineWidth’?: float, ’lineCap’?: string, ’lineJoin’?: string, ‘miterLimit’?: float, ‘dashArray’?: array, ‘dashPhase’?: float, ’lineColor’?: string, ‘fillColor’?: string, }
- phpstan-type: GradientData array{ ‘antialias’: bool, ‘background’: ?\Com\Tecnick\Color\Model, ‘colors’: array<int, array{ ‘color’: string, ’exponent’?: float, ‘opacity’?: float, ‘offset’?: float, }>, ‘colspace’: string, ‘coords’: array, ‘id’: int, ‘pattern’: int, ‘stream’: string, ’transparency’: bool, ’type’: int, }
- 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
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
getLastExtGStateID()
File: Base.php line 355
public getLastExtGStateID() : int|null
Return values
int|null
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
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.
initStyle()
File: Base.php line 215
public initStyle() : 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.