Table of contents
Namespace: Com\Tecnick\Pdf\Graph
abstract class Transform extends Style
Extends: Style
Source: src/Transform.php:36
Methods
degToRad()
Converts the number in degrees to the radian equivalent.
public degToRad(float $deg): float
Parameters:
$deg(float): Angular value in degrees.
Returns: float: Angle in radians
Source: src/Transform.php:393
getCtmProduct()
Get the product of two Transformation Matrix.
public getCtmProduct(TTMatrix $tma, TTMatrix $tmb): TTMatrix
Parameters:
Returns: TTMatrix: CTM Transformation Matrix.
Source: src/Transform.php:374
getHorizMirroring()
Horizontal Mirroring.
public getHorizMirroring(float $posx): string
Parameters:
$posx(float): Abscissa of the mirroring line.
Returns: string: Transformation string
Throws:
Source: src/Transform.php:216
getHorizScaling()
Horizontal Scaling.
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.
Returns: string: Transformation string
Throws:
Source: src/Transform.php:147
getHorizSkewing()
Skew horizontally.
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.
Returns: string: Transformation string
Throws:
Source: src/Transform.php:345
getHorizTranslation()
Translate graphic object horizontally.
public getHorizTranslation(float $trx): string
Parameters:
$trx(float): Movement to the right.
Returns: string: Transformation string
Source: src/Transform.php:287
getPointMirroring()
Point reflection mirroring.
public getPointMirroring(float $posx, float $posy): string
Parameters:
$posx(float): Abscissa of the mirroring point.$posy(float): Ordinate of the mirroring point.
Returns: string: Transformation string
Throws:
Source: src/Transform.php:245
getPropScaling()
Vertical and horizontal proportional Scaling.
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.
Returns: string: Transformation string
Throws:
Source: src/Transform.php:179
getReflection()
Reflection against a straight line through point (x, y) with the gradient angle (angle).
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.
Returns: string: Transformation string
Throws:
Source: src/Transform.php:261
getRotation()
Rotation.
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.
Returns: string: Transformation string
Source: src/Transform.php:193
getScaling()
Vertical and horizontal non-proportional Scaling.
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.
Returns: string: Transformation string
Throws:
Source: src/Transform.php:124
getSkewing()
Skew.
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.
Returns: string: Transformation string
Throws:
Source: src/Transform.php:316
getStartTransform()
Starts a 2D transformation saving current graphic state.
This function must be called before calling transformation methods
public getStartTransform(): string
Returns: string
Source: src/Transform.php:73
getStopTransform()
Stops a 2D transformation restoring previous graphic state.
This function must be called after calling transformation methods.
public getStopTransform(): string
Returns: string
Source: src/Transform.php:84
getTransformation()
Get the transformation matrix (CTM) PDF string.
The matrix is recorded on the transformation stack only when a block opened by getStartTransform() is active.
public getTransformation(TTMatrix $ctm): string
Parameters:
$ctm(TTMatrix): Transformation matrix array.
Returns: string
Source: src/Transform.php:103
getTransformIndex()
Returns the transformation stack index.
public getTransformIndex(): int
Returns: int
Source: src/Transform.php:64
getTransformStack()
Returns the transformation stack.
public getTransformStack(): array<int,array<int,TTMatrix>>
Returns: array<int,array<int,TTMatrix>>
Source: src/Transform.php:56
getTranslation()
Translate graphic object horizontally and vertically.
public getTranslation(float $trx, float $try): string
Parameters:
$trx(float): Movement to the right.$try(float): Movement to the bottom.
Returns: string: Transformation string
Source: src/Transform.php:274
getVertMirroring()
Vertical Mirroring.
public getVertMirroring(float $posy): string
Parameters:
$posy(float): Ordinate of the mirroring line.
Returns: string: Transformation string
Throws:
Source: src/Transform.php:230
getVertScaling()
Vertical Scaling.
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.
Returns: string: Transformation string
Throws:
Source: src/Transform.php:163
getVertSkewing()
Skew vertically.
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.
Returns: string: Transformation string
Throws:
Source: src/Transform.php:361
getVertTranslation()
Translate graphic object vertically.
public getVertTranslation(float $try): string
Parameters:
$try(float): Movement to the bottom.
Returns: string: Transformation string
Source: src/Transform.php:299
Inherited members
From Base
- IDMATRIX: Identity matrix for transformations.
- MPI: Pi constant.
- __construct(): Initialize
- getDefaultStyle(): Returns the default style.
- getLastExtGStateID(): Returns the last extgstate ID to be used with XObjects.
- getObjectNumber(): Returns current PDF object number
- getOutExtGState(): Get the PDF output string for ExtGState
- getOutExtGStateResources(): Get the PDF output string for ExtGState Resource Dictionary
- getOutExtGStateResourcesByKeys(): Get the PDF output string for ExtGState Resource Dictionary for XObjects.
- getOutGradientResources(): Get the PDF output string for Gradients Resource Dictionary
- getOutGradientResourcesByKeys(): Returns the PDF command to output gradient resources.
- getOutGradientShaders(): Get the PDF output string for gradient shaders
- getTransparencyExtGStateNames(): Returns the resource names of the registered ExtGState objects that carry transparency: a fill or stroke alpha below 1, a blend mode other than Normal, or a soft mask.
- initStyle(): Initialize default style
- setKUnit(): Set unit of measure conversion ratio.
- setPageHeight(): Set page height and returns previous value.
- setPageWidth(): Set page width and returns previous value.
From Style
- add(): Add a new style
- getCurrentStyleArray(): Returns the last style array.
- getCurrentStyleItem(): Returns the value of the specified item from the last inserted style.
- getExtGState(): Add transparency parameters to the current extgstate.
- getLastStyleProperty(): Returns the last set value of the specified property.
- getModeWithClose(): Add the Close option to the specified Path paint operator.
- getModeWithoutClose(): Remove the Close option from the specified Path paint operator.
- getModeWithoutFill(): Remove the Fill option from the specified Path paint operator.
- getModeWithoutStroke(): Remove the Stroke option from the specified Path paint operator.
- getPathPaintOp(): Get the Path-Painting Operators.
- getStyle(): Returns the PDF string of the last style added.
- getStyleCmd(): Returns the PDF string of the specified style.
- isClippingMode(): Returns true if the specified mode is of clipping type.
- isClosingMode(): Returns true if the specified mode includes “closing the path” option.
- isFillingMode(): Returns true if the specified path paint operator includes the filling option.
- isStrokingMode(): Returns true if the specified mode includes the stroking option.
- pop(): Remove and return last style.
- restoreStyleStatus(): Restore the saved style status.
- saveStyleStatus(): Save the current style ID to be restored later.