Methods summary
public string |
# getLine( float
$posx1, float $posy1,
float $posx2, float
$posy2, array $style =
array() )
Draws a line between two points.
Draws a line between two points.
Parameters
- $posx1
- Abscissa of first point.
- $posy1
- Ordinate of first point.
- $posx2
- Abscissa of second point.
- $posy2
- Ordinate of second point.
- $style
- Line style to apply.
Returns
string
PDF command
|
public string |
# getCurve( float
$posx0, float $posy0,
float $posx1, float
$posy1, float $posx2,
float $posy2, float
$posx3, float $posy3,
string $mode = 'S', array $style =
array() )
Draws a Bezier curve. The Bezier curve is a tangent to the line
between the control points at either end of the curve.
Draws a Bezier curve. The Bezier curve is a tangent to the line
between the control points at either end of the curve.
Parameters
- $posx0
- Abscissa of start point.
- $posy0
- Ordinate of start point.
- $posx1
- Abscissa of control point 1.
- $posy1
- Ordinate of control point 1.
- $posx2
- Abscissa of control point 2.
- $posy2
- Ordinate of control point 2.
- $posx3
- Abscissa of end point.
- $posy3
- Ordinate of end point.
- $mode
- Mode of rendering. @see getPathPaintOp()
- $style
- Style.
Returns
string
PDF command
Suppresswarnings(phpmd.excessiveparameterlist)
|
public string |
# getPolycurve( float
$posx0, float $posy0,
float $segments, string
$mode = 'S',
array $style = array() )
Draws a poly-Bezier curve. Each Bezier curve segment is a
tangent to the line between the control points at either end of the
curve.
Draws a poly-Bezier curve. Each Bezier curve segment is a
tangent to the line between the control points at either end of the
curve.
Parameters
- $posx0
- Abscissa of start point.
- $posy0
- Ordinate of start point.
- $segments
- An array of bezier descriptions. Format: array(x1, y1, x2, y2,
x3, y3).
- $mode
- Mode of rendering. @see getPathPaintOp()
- $style
- Style.
Returns
string
PDF command
|
public string |
# getEllipse( float
$posx, float $posy,
float $hrad, float $vrad =
0, float
$angle = 0,
float $angs = 0, float $angf =
360, string
$mode = 'S',
array $style = array(), integer $ncv
= 2 )
Draws an ellipse. An ellipse is formed from n Bezier curves.
Draws an ellipse. An ellipse is formed from n Bezier curves.
Parameters
- $posx
- Abscissa of center point.
- $posy
- Ordinate of center point.
- $hrad
- Horizontal radius.
- $vrad
- Vertical radius.
- $angle
- Angle oriented (anti-clockwise). Default value: 0.
- $angs
- Angle in degrees at which starting drawing.
- $angf
- Angle in degrees at which stop drawing.
- $mode
- Mode of rendering. @see getPathPaintOp()
- $style
- Style.
- $ncv
- Number of curves used to draw a 90 degrees portion of
ellipse.
Returns
string
PDF command
Suppresswarnings(phpmd.excessiveparameterlist)
|
public string |
# getCircle( float
$posx, float $posy,
float $rad, float $angs =
0, float $angf
= 360, string
$mode = 'S',
array $style = array(), integer $ncv
= 2 )
Draws a circle. A circle is formed from n Bezier curves.
Draws a circle. A circle is formed from n Bezier curves.
Parameters
- $posx
- Abscissa of center point.
- $posy
- Ordinate of center point.
- $rad
- Radius.
- $angs
- Angle in degrees at which starting drawing.
- $angf
- Angle in degrees at which stop drawing.
- $mode
- Mode of rendering. @see getPathPaintOp()
- $style
- Style.
- $ncv
- Number of curves used to draw a 90 degrees portion of
ellipse.
Returns
string
PDF command
|
public string |
# getPieSector( float
$posx, float $posy,
float $rad, float $angs =
0, float $angf
= 360, string
$mode = 'FD',
array $style = array(), integer $ncv
= 2 )
Draws a circle pie sector.
Draws a circle pie sector.
Parameters
- $posx
- Abscissa of center point.
- $posy
- Ordinate of center point.
- $rad
- Radius.
- $angs
- Angle in degrees at which starting drawing.
- $angf
- Angle in degrees at which stop drawing.
- $mode
- Mode of rendering. @see getPathPaintOp()
- $style
- Style.
- $ncv
- Number of curves used to draw a 90 degrees portion of
ellipse.
Returns
string
PDF command
|
public string |
#
getBasicPolygon( array
$points, string $mode =
'S', array
$style = array() )
Draws a basic polygon.
Parameters
- $points
- Points - array containing 4 points for each segment: (x0, y0,
x1, y1, x2, y2, ...)
- $mode
- Mode of rendering. @see getPathPaintOp()
- $style
- Style.
Returns
string
PDF command
|
protected string |
#
getDefaultSegStyle( array
& $styles = array() )
Returns the polygon default style command and initialize the
first segment style if missing.
Returns the polygon default style command and initialize the
first segment style if missing.
Parameters
- $styles
- Array of styles - one style entry for each polygon segment
and/or one global "all" entry.
Returns
string
PDF command
|
public string |
# getPolygon( array
$points, string $mode =
'S', array
$styles = array() )
Draws a polygon with a different style for each segment.
Draws a polygon with a different style for each segment.
Parameters
- $points
- Points - array with values (x0, y0, x1, y1,..., x(n-1),
y(n-1))
- $mode
- Mode of rendering. @see getPathPaintOp()
- $styles
- Array of styles - one style entry for each polygon segment
and/or one global "all" entry.
Returns
string
PDF command
|
public string |
#
getRegularPolygon( float
$posx, float $posy,
float $radius, integer
$sides, float $angle =
0, string
$mode = 'S',
array $styles = array(), string
$cirmode = '',
array $cirstyle = array() )
Draws a regular polygon.
Parameters
- $posx
- Abscissa of center point.
- $posy
- Ordinate of center point.
- $radius
- Radius of inscribed circle.
- $sides
- Number of sides.
- $angle
- Angle of the orientation (anti-clockwise).
- $mode
- Mode of rendering. @see getPathPaintOp()
- $styles
- Array of styles - one style entry for each polygon segment
and/or one global "all" entry.
- $cirmode
- Mode of rendering of the inscribed circle (if any). @see
getPathPaintOp()
- $cirstyle
- Style of inscribed circle.
Returns
string
PDF command
|
public string |
# getStarPolygon( float
$posx, float $posy,
float $radius, integer
$nvert, integer $ngaps,
float $angle = 0, string $mode =
'S', array
$styles = array(), string
$cirmode = '',
array $cirstyle = array() )
Draws a star polygon.
Parameters
- $posx
- Abscissa of center point.
- $posy
- Ordinate of center point.
- $radius
- Radius of inscribed circle.
- $nvert
- Number of vertices.
- $ngaps
- Number of gaps (if ($ngaps % $nvert = 1) then is a regular
polygon).
- $angle
- Angle oriented (anti-clockwise).
- $mode
- Mode of rendering. @see getPathPaintOp()
- $styles
- Array of styles - one style entry for each polygon segment
and/or one global "all" entry.
- $cirmode
- Mode of rendering of the inscribed circle (if any). @see
getPathPaintOp()
- $cirstyle
- Style of inscribed circle.
Returns
string
PDF command
Suppresswarnings(phpmd.excessiveparameterlist)
|
public string |
# getBasicRect( float
$posx, float $posy,
float $width, float
$height, string $mode =
'S', array
$style = array() )
Draws a basic rectangle
Parameters
- $posx
- Abscissa of upper-left corner.
- $posy
- Ordinate of upper-left corner.
- $width
- Width.
- $height
- Height.
- $mode
- Mode of rendering. @see getPathPaintOp()
- $style
- Style.
Returns
string
PDF command
|
public string |
# getRect( float
$posx, float $posy,
float $width, float
$height, string $mode =
'S', array
$styles = array() )
Draws a rectangle with a different style for each segment.
Draws a rectangle with a different style for each segment.
Parameters
- $posx
- Abscissa of upper-left corner.
- $posy
- Ordinate of upper-left corner.
- $width
- Width.
- $height
- Height.
- $mode
- Mode of rendering. @see getPathPaintOp()
- $styles
- Array of styles - one style entry for each side (T,R,B,L)
and/or one global "all" entry.
Returns
string
PDF command
|
public string |
# getRoundedRect( float
$posx, float $posy,
float $width, float
$height, float $hrad,
float $vrad, string
$corner = '1111',
string $mode = 'S', array $style =
array() )
Draws a rounded rectangle.
Draws a rounded rectangle.
Parameters
- $posx
- Abscissa of upper-left corner.
- $posy
- Ordinate of upper-left corner.
- $width
- Width.
- $height
- Height.
- $hrad
- X-axis radius of the ellipse used to round off the corners of
the rectangle.
- $vrad
- Y-axis radius of the ellipse used to round off the corners of
the rectangle.
- $corner
-
Round corners to draw: 0 (square i-corner) or 1 (rounded
i-corner) in i-position. Positions are int the following order: top
right, bottom right, bottom left and top left.
- $mode
- Mode of rendering. @see getPathPaintOp()
- $style
- Style.
Returns
string
PDF command
|
public string |
# getArrow( float
$posx0, float $posy0,
float $posx1, float
$posy1, integer $headmode =
0, float
$armsize = 5,
integer $armangle = 15, array $style =
array() )
Draws an arrow.
Parameters
- $posx0
- Abscissa of first point.
- $posy0
- Ordinate of first point.
- $posx1
- Abscissa of second point (head side).
- $posy1
- Ordinate of second point (head side)
- $headmode
-
Arrow head mode: 0 = draw only head arms; 1 = draw closed head
without filling; 2 = closed and filled head; 3 = filled head.
- $armsize
- Length of head arms.
- $armangle
- Angle between an head arm and the arrow shaft.
- $style
- Line style to apply.
Returns
string
PDF command
|
public string |
#
getRegistrationMark( float
$posx, float $posy,
float $rad, boolean
$double = false, array $color =
'all' )
Get a registration mark.
Parameters
- $posx
- Abscissa of center point.
- $posy
- Ordinate of center point.
- $rad
- Radius.
- $double
- If true prints two concentric crop marks.
- $color
- Color.
Returns
string
PDF command
|
public string |
#
getCmykRegistrationMark( float
$posx, float $posy,
float $rad )
Get a CMYK registration mark.
Get a CMYK registration mark.
Parameters
- $posx
- Abscissa of center point.
- $posy
- Ordinate of center point.
- $rad
- Radius.
Returns
string
PDF command
|