Transform

Transform API reference

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:

  • $tma (TTMatrix): First Transformation Matrix.
  • $tmb (TTMatrix): Second Transformation Matrix.

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

From Style