Canvas is an abstract rectangle drawing area which can be dropped into page object at specified place.
package | Zend_Pdf |
---|---|
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
clipCircle(float $x, float $y, float $radius, float $startAngle= null
, float $endAngle= null
) : \Zend_Pdf_Canvas_Interface
float
float
float
float
float
\Zend_Pdf_Canvas_Interface
clipEllipse(float $x1, float $y1, float $x2, float $y2, float $startAngle= null
, float $endAngle= null
) : \Zend_Pdf_Canvas_Interface
Method signatures: drawEllipse($x1, $y1, $x2, $y2); drawEllipse($x1, $y1, $x2, $y2, $startAngle, $endAngle);
todo | process special cases with $x2-$x1 == 0 or $y2-$y1 == 0 |
---|
float
float
float
float
float
float
\Zend_Pdf_Canvas_Interface
clipPolygon(array $x, array $y, integer $fillMethod = \Zend_Pdf_Page::FILL_METHOD_NON_ZERO_WINDING
) : \Zend_Pdf_Canvas_Interface
array
array
integer
\Zend_Pdf_Canvas_Interface
clipRectangle(float $x1, float $y1, float $x2, float $y2) : \Zend_Pdf_Canvas_Interface
float
float
float
float
\Zend_Pdf_Canvas_Interface
drawCanvas(\Zend_Pdf_Canvas_Interface $canvas, float $x1, float $y1, float $x2= null
, float $y2= null
) : \Zend_Pdf_Canvas_Interface
If upper right corner is not specified then canvas heght and width are used.
\Zend_Pdf_Canvas_Interface
float
float
float
float
\Zend_Pdf_Canvas_Interface
drawCircle(float $x, float $y, float $radius, mixed $param4= null
, mixed $param5= null
, mixed $param6= null
) : \Zend_Pdf_Canvas_Interface
Method signatures: drawCircle($x, $y, $radius); drawCircle($x, $y, $radius, $fillType); drawCircle($x, $y, $radius, $startAngle, $endAngle); drawCircle($x, $y, $radius, $startAngle, $endAngle, $fillType);
It's not a really circle, because PDF supports only cubic Bezier curves. But very good approximation. It differs from a real circle on a maximum 0.00026 radiuses (at PI/8, 3PI/8, 5PI/8, 7PI/8, 9PI/8, 11PI/8, 13PI/8 and 15PI/8 angles). At 0, PI/4, PI/2, 3PI/4, PI, 5PI/4, 3PI/2 and 7*PI/4 it's exactly a tangent to a circle.
float
float
float
mixed
mixed
mixed
\Zend_Pdf_Canvas_Interface
drawEllipse(float $x1, float $y1, float $x2, float $y2, mixed $param5= null
, mixed $param6= null
, mixed $param7= null
) : \Zend_Pdf_Canvas_Interface
Method signatures: drawEllipse($x1, $y1, $x2, $y2); drawEllipse($x1, $y1, $x2, $y2, $fillType); drawEllipse($x1, $y1, $x2, $y2, $startAngle, $endAngle); drawEllipse($x1, $y1, $x2, $y2, $startAngle, $endAngle, $fillType);
todo | process special cases with $x2-$x1 == 0 or $y2-$y1 == 0 |
---|
float
float
float
float
mixed
mixed
mixed
\Zend_Pdf_Canvas_Interface
drawImage(\Zend_Pdf_Image $image, float $x1, float $y1, float $x2, float $y2) : \Zend_Pdf_Canvas_Interface
\Zend_Pdf_Image
float
float
float
float
\Zend_Pdf_Canvas_Interface
drawLine(float $x1, float $y1, float $x2, float $y2) : \Zend_Pdf_Canvas_Interface
float
float
float
float
\Zend_Pdf_Canvas_Interface
drawPolygon(array $x, array $y, integer $fillType= \Zend_Pdf_Page::SHAPE_DRAW_FILL_AND_STROKE
, integer $fillMethod= \Zend_Pdf_Page::FILL_METHOD_NON_ZERO_WINDING
) : \Zend_Pdf_Canvas_Interface
If $fillType is Zend_Pdf_Page::SHAPE_DRAW_FILL_AND_STROKE or Zend_Pdf_Page::SHAPE_DRAW_FILL, then polygon is automatically closed. See detailed description of these methods in a PDF documentation (section 4.4.2 Path painting Operators, Filling)
array
array
integer
integer
\Zend_Pdf_Canvas_Interface
drawRectangle(float $x1, float $y1, float $x2, float $y2, integer $fillType = \Zend_Pdf_Page::SHAPE_DRAW_FILL_AND_STROKE
) : \Zend_Pdf_Canvas_Interface
Fill types: Zend_Pdf_Page::SHAPE_DRAW_FILL_AND_STROKE - fill rectangle and stroke (default) Zend_Pdf_Page::SHAPE_DRAW_STROKE - stroke rectangle Zend_Pdf_Page::SHAPE_DRAW_FILL - fill rectangle
float
float
float
float
integer
\Zend_Pdf_Canvas_Interface
drawRoundedRectangle(float $x1, float $y1, float $x2, float $y2, integer|array $radius, integer $fillType = \Zend_Pdf_Page::SHAPE_DRAW_FILL_AND_STROKE
) : \Zend_Pdf_Canvas_Interface
Fill types: Zend_Pdf_Page::SHAPE_DRAW_FILL_AND_STROKE - fill rectangle and stroke (default) Zend_Pdf_Page::SHAPE_DRAW_STROKE - stroke rectangle Zend_Pdf_Page::SHAPE_DRAW_FILL - fill rectangle
radius is an integer representing radius of the four corners, or an array of four integers representing the radius starting at top left, going clockwise
float
float
float
float
integer
array
integer
\Zend_Pdf_Canvas_Interface
drawText(string $text, float $x, float $y, string $charEncoding = ''
) : \Zend_Pdf_Canvas_Interface
string
float
float
string
(optional) Character encoding of source text. Defaults to current locale.
\Zend_Pdf_Exception |
---|
\Zend_Pdf_Canvas_Interface
getFont() : \Zend_Pdf_Resource_Font
\Zend_Pdf_Resource_Font
$fontgetFontSize() : float
float
$fontSizegetHeight() : float
float
getStyle() : \Zend_Pdf_Style | null
\Zend_Pdf_Style
null
getWidth() : float
float
rawWrite(string $data, string $procSet = null
) : \Zend_Pdf_Canvas_Interface
Be sure to consult the PDF reference to ensure your syntax is correct. No attempt is made to ensure the validity of the stream data.
string
string
(optional) Name of ProcSet to add.
\Zend_Pdf_Canvas_Interface
rotate(float $x, float $y, float $angle) : \Zend_Pdf_Canvas_Interface
float
float
float
\Zend_Pdf_Canvas_Interface
saveGS() : \Zend_Pdf_Page
This takes a snapshot of the currently applied style, position, clipping area and any rotation/translation/scaling that has been applied.
\Zend_Pdf_Exception |
- if a save is performed with an open path |
---|
\Zend_Pdf_Page
scale(float $xScale, float $yScale) : \Zend_Pdf_Canvas_Interface
float
float
\Zend_Pdf_Canvas_Interface
setAlpha(float $alpha, string $mode = 'Normal'
) : \Zend_Pdf_Canvas_Interface
$alpha == 0 - transparent $alpha == 1 - opaque
Transparency modes, supported by PDF: Normal (default), Multiply, Screen, Overlay, Darken, Lighten, ColorDodge, ColorBurn, HardLight, SoftLight, Difference, Exclusion
float
string
\Zend_Pdf_Exception |
---|
\Zend_Pdf_Canvas_Interface
setFillColor(\Zend_Pdf_Color $color) : \Zend_Pdf_Canvas_Interface
\Zend_Pdf_Color
\Zend_Pdf_Canvas_Interface
setFont(\Zend_Pdf_Resource_Font $font, float $fontSize) : \Zend_Pdf_Canvas_Interface
\Zend_Pdf_Resource_Font
float
\Zend_Pdf_Canvas_Interface
setLineColor(\Zend_Pdf_Color $color) : \Zend_Pdf_Canvas_Interface
\Zend_Pdf_Color
\Zend_Pdf_Canvas_Interface
setLineDashingPattern(mixed $pattern, array $phase = 0
) : \Zend_Pdf_Canvas_Interface
Pattern is an array of floats: array(on_length, off_length, on_length, off_length, ...) or Zend_Pdf_Page::LINE_DASHING_SOLID constant Phase is shift from the beginning of line.
mixed
array
\Zend_Pdf_Canvas_Interface
setLineWidth(float $width) : \Zend_Pdf_Canvas_Interface
float
\Zend_Pdf_Canvas_Interface
setStyle(\Zend_Pdf_Style $style) : \Zend_Pdf_Canvas_Interface
\Zend_Pdf_Style
\Zend_Pdf_Canvas_Interface
skew(float $x, float $y, float $xAngle, float $yAngle) : \Zend_Pdf_Canvas_Interface
float
float
float
float
\Zend_Pdf_Canvas_Interface
translate(float $xShift, float $yShift) : \Zend_Pdf_Canvas_Interface
float
float
\Zend_Pdf_Canvas_Interface