Raw

Com\Tecnick\Pdf\Graph\Raw

Namespace: Com\Tecnick\Pdf\Graph

Extends: Transform

Abstract: Yes

File: Raw.php line 32

Tags

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

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

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

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.

getHorizMirroring()

File: Transform.php line 216

public getHorizMirroring(float $posx) : string

Parameters

  • $posx : float: Abscissa of the mirroring line.

Tags

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

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

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

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.

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

Return values

string

getModeWithoutClose()

File: Style.php line 544

public getModeWithoutClose(string|PathPaintOp $mode) : string

Parameters

Return values

string

getModeWithoutFill()

File: Style.php line 564

public getModeWithoutFill(string|PathPaintOp $mode) : string

Parameters

Return values

string

getModeWithoutStroke()

File: Style.php line 584

public getModeWithoutStroke(string|PathPaintOp $mode) : string

Parameters

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

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

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

Return values

string —

Transformation string

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

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

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

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

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

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

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

Return values

bool

isClosingMode()

File: Style.php line 493

public isClosingMode(string|PathPaintOp $mode) : bool

Parameters

Return values

bool

isFillingMode()

File: Style.php line 463

public isFillingMode(string|PathPaintOp $mode) : bool

Parameters

Return values

bool

isStrokingMode()

File: Style.php line 477

public isStrokingMode(string|PathPaintOp $mode) : bool

Parameters

Return values

bool

pop()

File: Style.php line 250

public pop() : string

Tags

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

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.