Pdf/Canvas/Interface.php
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Pdf
- Version
- $Id: Style.php 20096 2010-01-06 02:05:09Z bkarwin $
\Zend_Pdf_Canvas_Interface
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Methods

clipCircle(float $x, float $y, float $radius, float $startAngle = null, float $endAngle = null) : \Zend_Pdf_Canvas_InterfaceIntersect current clipping area with a circle.
| Name | Type | Description |
|---|---|---|
| $x | float | |
| $y | float | |
| $radius | float | |
| $startAngle | float | |
| $endAngle | float |
| Type | Description |
|---|---|
| \Zend_Pdf_Canvas_Interface |

clipEllipse(float $x1, float $y1, float $x2, float $y2, float $startAngle = null, float $endAngle = null) : \Zend_Pdf_Canvas_InterfaceIntersect current clipping area with a polygon.
| Name | Type | Description |
|---|---|---|
| $x1 | float | |
| $y1 | float | |
| $x2 | float | |
| $y2 | float | |
| $startAngle | float | |
| $endAngle | float |
| Type | Description |
|---|---|
| \Zend_Pdf_Canvas_Interface |
- Todo
- process special cases with $x2-$x1 == 0 or $y2-$y1 == 0

clipPolygon(array $x, array $y, integer $fillMethod = \Zend_Pdf_Page::FILL_METHOD_NON_ZERO_WINDING) : \Zend_Pdf_Canvas_InterfaceIntersect current clipping area with a polygon.
| Name | Type | Description |
|---|---|---|
| $x | array |
|
| $y | array |
|
| $fillMethod | integer |
| Type | Description |
|---|---|
| \Zend_Pdf_Canvas_Interface |

clipRectangle(float $x1, float $y1, float $x2, float $y2) : \Zend_Pdf_Canvas_InterfaceIntersect current clipping area with a rectangle.
| Name | Type | Description |
|---|---|---|
| $x1 | float | |
| $y1 | float | |
| $x2 | float | |
| $y2 | float |
| Type | Description |
|---|---|
| \Zend_Pdf_Canvas_Interface |

drawCanvas(\Zend_Pdf_Canvas_Interface $canvas, float $x1, float $y1, float $x2 = null, float $y2 = null) : \Zend_Pdf_Canvas_InterfaceDraw a canvas at the specified location
| Name | Type | Description |
|---|---|---|
| $canvas | \Zend_Pdf_Canvas_Interface | |
| $x1 | float | |
| $y1 | float | |
| $x2 | float | |
| $y2 | float |
| Type | Description |
|---|---|
| \Zend_Pdf_Canvas_Interface |

drawCircle(float $x, float $y, float $radius, mixed $param4 = null, mixed $param5 = null, mixed $param6 = null) : \Zend_Pdf_Canvas_InterfaceDraw a circle centered on x, y with a radius of radius.
| Name | Type | Description |
|---|---|---|
| $x | float | |
| $y | float | |
| $radius | float | |
| $param4 | mixed | |
| $param5 | mixed | |
| $param6 | mixed |
| Type | Description |
|---|---|
| \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_InterfaceDraw an ellipse inside the specified rectangle.
| Name | Type | Description |
|---|---|---|
| $x1 | float | |
| $y1 | float | |
| $x2 | float | |
| $y2 | float | |
| $param5 | mixed | |
| $param6 | mixed | |
| $param7 | mixed |
| Type | Description |
|---|---|
| \Zend_Pdf_Canvas_Interface |
- Todo
- process special cases with $x2-$x1 == 0 or $y2-$y1 == 0

drawImage(\Zend_Pdf_Image $image, float $x1, float $y1, float $x2, float $y2) : \Zend_Pdf_Canvas_InterfaceDraw an image at the specified position on the page.
| Name | Type | Description |
|---|---|---|
| $image | \Zend_Pdf_Image | |
| $x1 | float | |
| $y1 | float | |
| $x2 | float | |
| $y2 | float |
| Type | Description |
|---|---|
| \Zend_Pdf_Canvas_Interface |

drawLine(float $x1, float $y1, float $x2, float $y2) : \Zend_Pdf_Canvas_InterfaceDraw a line from x1,y1 to x2,y2.
| Name | Type | Description |
|---|---|---|
| $x1 | float | |
| $y1 | float | |
| $x2 | float | |
| $y2 | float |
| Type | Description |
|---|---|
| \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_InterfaceDraw a polygon.
| Name | Type | Description |
|---|---|---|
| $x | array |
|
| $y | array |
|
| $fillType | integer | |
| $fillMethod | integer |
| Type | Description |
|---|---|
| \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_InterfaceDraw a rectangle.
| Name | Type | Description |
|---|---|---|
| $x1 | float | |
| $y1 | float | |
| $x2 | float | |
| $y2 | float | |
| $fillType | integer |
| Type | Description |
|---|---|
| \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_InterfaceDraw a rounded rectangle.
| Name | Type | Description |
|---|---|---|
| $x1 | float | |
| $y1 | float | |
| $x2 | float | |
| $y2 | float | |
| $radius | integer | array | |
| $fillType | integer |
| Type | Description |
|---|---|
| \Zend_Pdf_Canvas_Interface |

drawText(string $text, float $x, float $y, string $charEncoding = '') : \Zend_Pdf_Canvas_InterfaceDraw a line of text at the specified position.
| Name | Type | Description |
|---|---|---|
| $text | string | |
| $x | float | |
| $y | float | |
| $charEncoding | string | (optional) Character encoding of source text. Defaults to current locale. |
| Type | Description |
|---|---|
| \Zend_Pdf_Canvas_Interface |
| Exception | Description |
|---|---|
| \Zend_Pdf_Exception |

getFont() : \Zend_Pdf_Resource_FontGet current font.
| Type | Description |
|---|---|
| \Zend_Pdf_Resource_Font | $font |

getStyle() : \Zend_Pdf_Style | nullReturn the style, applied to the page.
| Type | Description |
|---|---|
| \Zend_Pdf_Style | null |

rawWrite(string $data, string $procSet = null) : \Zend_Pdf_Canvas_InterfaceWrites the raw data to the page's content stream.
| Name | Type | Description |
|---|---|---|
| $data | string | |
| $procSet | string | (optional) Name of ProcSet to add. |
| Type | Description |
|---|---|
| \Zend_Pdf_Canvas_Interface |

rotate(float $x, float $y, float $angle) : \Zend_Pdf_Canvas_InterfaceRotate the page.
| Name | Type | Description |
|---|---|---|
| $x | float |
|
| $y | float |
|
| $angle | float |
|
| Type | Description |
|---|---|
| \Zend_Pdf_Canvas_Interface |

saveGS() : \Zend_Pdf_PageSave the graphics state of this page.
| Type | Description |
|---|---|
| \Zend_Pdf_Page |
| Exception | Description |
|---|---|
| \Zend_Pdf_Exception | - if a save is performed with an open path |

scale(float $xScale, float $yScale) : \Zend_Pdf_Canvas_InterfaceScale coordination system.
| Name | Type | Description |
|---|---|---|
| $xScale | float |
|
| $yScale | float |
|
| Type | Description |
|---|---|
| \Zend_Pdf_Canvas_Interface |

setAlpha(float $alpha, string $mode = 'Normal') : \Zend_Pdf_Canvas_InterfaceSet the transparancy
| Name | Type | Description |
|---|---|---|
| $alpha | float | |
| $mode | string |
| Type | Description |
|---|---|
| \Zend_Pdf_Canvas_Interface |
| Exception | Description |
|---|---|
| \Zend_Pdf_Exception |

setFillColor(\Zend_Pdf_Color $color) : \Zend_Pdf_Canvas_InterfaceSet fill color.
| Name | Type | Description |
|---|---|---|
| $color | \Zend_Pdf_Color |
| Type | Description |
|---|---|
| \Zend_Pdf_Canvas_Interface |

setFont(\Zend_Pdf_Resource_Font $font, float $fontSize) : \Zend_Pdf_Canvas_InterfaceSet current font.
| Name | Type | Description |
|---|---|---|
| $font | \Zend_Pdf_Resource_Font | |
| $fontSize | float |
| Type | Description |
|---|---|
| \Zend_Pdf_Canvas_Interface |

setLineColor(\Zend_Pdf_Color $color) : \Zend_Pdf_Canvas_InterfaceSet line color.
| Name | Type | Description |
|---|---|---|
| $color | \Zend_Pdf_Color |
| Type | Description |
|---|---|
| \Zend_Pdf_Canvas_Interface |

setLineDashingPattern(mixed $pattern, array $phase = 0) : \Zend_Pdf_Canvas_InterfaceSet line dashing pattern
| Name | Type | Description |
|---|---|---|
| $pattern | mixed | |
| $phase | array |
| Type | Description |
|---|---|
| \Zend_Pdf_Canvas_Interface |

setLineWidth(float $width) : \Zend_Pdf_Canvas_InterfaceSet line width.
| Name | Type | Description |
|---|---|---|
| $width | float |
| Type | Description |
|---|---|
| \Zend_Pdf_Canvas_Interface |

setStyle(\Zend_Pdf_Style $style) : \Zend_Pdf_Canvas_InterfaceSet the style to use for future drawing operations on this page
| Name | Type | Description |
|---|---|---|
| $style | \Zend_Pdf_Style |
| Type | Description |
|---|---|
| \Zend_Pdf_Canvas_Interface |

skew(float $x, float $y, float $xAngle, float $yAngle) : \Zend_Pdf_Canvas_InterfaceTranslate coordination system.
| Name | Type | Description |
|---|---|---|
| $x | float |
|
| $y | float |
|
| $xAngle | float |
|
| $yAngle | float |
|
| Type | Description |
|---|---|
| \Zend_Pdf_Canvas_Interface |

translate(float $xShift, float $yShift) : \Zend_Pdf_Canvas_InterfaceTranslate coordination system.
| Name | Type | Description |
|---|---|---|
| $xShift | float |
|
| $yShift | float |
|
| Type | Description |
|---|---|
| \Zend_Pdf_Canvas_Interface |