Raw

Raw API reference

Namespace: Com\Tecnick\Pdf\Graph

abstract class Raw extends Transform

Extends: Transform

Source: src/Raw.php:32

Methods

getRawCurve()

Append a cubic Bezier curve to the current path.

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).

public getRawCurve(
    float $posx1,
    float $posy1,
    float $posx2,
    float $posy2,
    float $posx3,
    float $posy3
): string

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.

Returns: string: PDF command

Source: src/Raw.php:107

getRawCurveV()

Append a cubic Bezier curve to the current path.

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).

public getRawCurveV(float $posx2, float $posy2, float $posx3, float $posy3): string

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.

Returns: string: PDF command

Source: src/Raw.php:139

getRawCurveY()

Append a cubic Bezier curve to the current path.

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).

public getRawCurveY(float $posx1, float $posy1, float $posx3, float $posy3): string

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.

Returns: string: PDF command

Source: src/Raw.php:163

getRawEllipticalArc()

Append an elliptical arc to the current path.

An ellipse is formed from n Bezier curves.

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,
    float[] &$bbox = []
): string

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): Angle between the X-axis and the major axis of the ellipse.
  • $angs (float): Angle in degrees at which starting drawing.
  • $angf (float): Angle in degrees at which stop drawing.
  • $pie (bool): If true do not mark the border point (used to draw pie sectors).
  • $ncv (float): Number of curves used to draw a 90 degrees portion of ellipse.
  • $startpoint (bool): If true output a starting point.
  • $ccw (bool): If true draws in counter-clockwise direction.
  • $svg (bool): If true the angles are in svg mode (already calculated).
  • $bbox (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.

Returns: string: PDF command

Source: src/Raw.php:240

getRawLine()

Append a straight line segment from the current point to the specified one.

The new current point shall be the one specified.

public getRawLine(float $posx, float $posy): string

Parameters:

  • $posx (float): Abscissa of end point.
  • $posy (float): Ordinate of end point.

Returns: string: PDF command

Source: src/Raw.php:57

getRawPoint()

Begin a new subpath by moving the current point to the specified coordinates, omitting any connecting line segment.

public getRawPoint(float $posx, float $posy): string

Parameters:

  • $posx (float): Abscissa of point.
  • $posy (float): Ordinate of point.

Returns: string: PDF command

Source: src/Raw.php:43

getRawRect()

Append a rectangle to the current path as a complete subpath, with lower-left corner in the specified point and dimensions width and height in user units.

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()

Returns: string: PDF command

Source: src/Raw.php:74

getVectorsAngle()

Returns the angle in radians between two vectors with the same origin point.

Angles are counted counter-clock wise.

public getVectorsAngle(float $posx1, float $posy1, float $posx2, float $posy2): float

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.

Returns: float: Angle in radians

Source: src/Raw.php:410

Inherited members

From Base

From Style

From Transform