Table of contents
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
- 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.
From Transform
- degToRad(): Converts the number in degrees to the radian equivalent.
- getCtmProduct(): Get the product of two Transformation Matrix.
- getHorizMirroring(): Horizontal Mirroring.
- getHorizScaling(): Horizontal Scaling.
- getHorizSkewing(): Skew horizontally.
- getHorizTranslation(): Translate graphic object horizontally.
- getPointMirroring(): Point reflection mirroring.
- getPropScaling(): Vertical and horizontal proportional Scaling.
- getReflection(): Reflection against a straight line through point (x, y) with the gradient angle (angle).
- getRotation(): Rotation.
- getScaling(): Vertical and horizontal non-proportional Scaling.
- getSkewing(): Skew.
- getStartTransform(): Starts a 2D transformation saving current graphic state.
- getStopTransform(): Stops a 2D transformation restoring previous graphic state.
- getTransformation(): Get the transformation matrix (CTM) PDF string.
- getTransformIndex(): Returns the transformation stack index.
- getTransformStack(): Returns the transformation stack.
- getTranslation(): Translate graphic object horizontally and vertically.
- getVertMirroring(): Vertical Mirroring.
- getVertScaling(): Vertical Scaling.
- getVertSkewing(): Skew vertically.
- getVertTranslation(): Translate graphic object vertically.