Barcode/Renderer/Image.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Barcode
- Subpackage
- Renderer
- Version
- $Id$
\Zend_Barcode_Renderer_Image
Package: Zend_Barcode










Class for rendering the barcode as image
- Parent(s)
- \Zend_Barcode_Renderer_RendererAbstract
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties

array $_allowedImageType = array('png', 'jpeg', 'gif')List of authorized output format
Default value
array('png', 'jpeg', 'gif')Details- Type
- array

integer $_imageBackgroundColor = nullResource for the background color of the image
Default value
nullDetails- Type
- integer

integer $_imageForeColor = nullResource for the font and bars color of the image
Default value
nullDetails- Type
- integer
Methods

_checkDimensions() : voidCheck barcode dimensions
Throws
| Exception | Description |
|---|---|
| \Zend_Barcode_Renderer_Exception |

_drawPolygon(array $points, integer $color, boolean $filled = true) : voidDraw a polygon in the image resource
Parameters
| Name | Type | Description |
|---|---|---|
| $points | array | |
| $color | integer | |
| $filled | boolean |

_drawText(string $text, float $size, array $position, string $font, integer $color, string $alignment = 'center', float | int $orientation = 0) : voidDraw a polygon in the image resource
Parameters
Throws
| Name | Type | Description |
|---|---|---|
| $text | string | |
| $size | float | |
| $position | array | |
| $font | string | |
| $color | integer | |
| $alignment | string | |
| $orientation | float | int |
| Exception | Description |
|---|---|
| \Zend_Barcode_Renderer_Exception |

_initRenderer() : voidInitialize the image resource
Throws
| Exception | Description |
|---|---|
| \Zend_Barcode_Exception |

setHeight(null | integer $value) : \Zend_Image_Barcode_AbstractSet height of the result image
Parameters
Returns
Throws
| Name | Type | Description |
|---|---|---|
| $value | null | integer |
| Type | Description |
|---|---|
| \Zend_Image_Barcode_Abstract |
| Exception | Description |
|---|---|
| \Zend_Barcode_Renderer_Exception |

setImageType(string $value) : \Zend_Barcode_RendererAbstractSet the image type to produce (png, jpeg, gif)
Parameters
Returns
Throws
| Name | Type | Description |
|---|---|---|
| $value | string |
| Type | Description |
|---|---|
| \Zend_Barcode_RendererAbstract |
| Exception | Description |
|---|---|
| \Zend_Barcode_Renderer_Exception |

setResource( $image) : \Zend_Barcode_RendererSet an image resource to draw the barcode inside
Parameters
Returns
Throws
| Name | Type | Description |
|---|---|---|
| $image |
| Type | Description |
|---|---|
| \Zend_Barcode_Renderer |
| Exception | Description |
|---|---|
| \Zend_Barcode_Renderer_Exception |

setWidth(mixed $value) : \Zend_Barcode_Renderer_ImageSet barcode width
Parameters
Returns
Throws
Details
| Name | Type | Description |
|---|---|---|
| $value | mixed |
| Type | Description |
|---|---|
| \Zend_Barcode_Renderer_Image |
| Exception | Description |
|---|---|
| \Zend_Barcode_Renderer_Exception |
- Fluent
- This method is part of a fluent interface and will return the same instance