Barcode/Renderer/Image.php

Show: PublicProtectedPrivateinherited
Table of Contents
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

>VPropertyprotectedarray $_allowedImageType = array('png', 'jpeg', 'gif')
List of authorized output format
Default valuearray('png', 'jpeg', 'gif')Details
Type
array
>VPropertyprotectedinteger $_imageBackgroundColor = null
Resource for the background color of the image
Default valuenullDetails
Type
integer
>VPropertyprotectedinteger $_imageForeColor = null
Resource for the font and bars color of the image
Default valuenullDetails
Type
integer
>VPropertyprotectedstring $_imageType = 'png'
Image format
Default value'png'Details
Type
string
>VPropertyprotectedresource $_resource = null
Resource for the image
Default valuenullDetails
Type
resource
>VPropertyprotectedinteger $_userHeight = 0
Height of the rendered image wanted by user
Default value0Details
Type
integer
>VPropertyprotectedinteger $_userWidth = 0
Width of the rendered image wanted by user
Default value0Details
Type
integer

Methods

methodpublic__construct( $options = null) : void

Parameters
NameTypeDescription
$options
methodprotected_checkDimensions() : void

Check barcode dimensions

methodprotected_checkParams() : void

Check barcode parameters

methodprotected_drawPolygon(array $points, integer $color, boolean $filled = true) : void

Draw a polygon in the image resource

Parameters
NameTypeDescription
$pointsarray
$colorinteger
$filledboolean
methodprotected_drawText(string $text, float $size, array $position, string $font, integer $color, string $alignment = 'center', float $orientation = 0) : void

Draw a polygon in the image resource

Parameters
NameTypeDescription
$textstring
$sizefloat
$positionarray
$fontstring
$colorinteger
$alignmentstring
$orientationfloat
methodprotected_initRenderer() : void

Initialize the image resource

methodpublicgetHeight() : int

Get barcode height

Returns
TypeDescription
int
methodpublicgetImageType() : string

Retrieve the image type to produce

Returns
TypeDescription
string
methodpublicgetWidth() : int

Get barcode width

Returns
TypeDescription
int
methodpublicrender() : mixed

Draw and render the barcode with correct headers

Returns
TypeDescription
mixed
methodpublicsetHeight(null | integer $value) : \Zend_Image_Barcode_Abstract

Set height of the result image

Parameters
NameTypeDescription
$valuenull | integer
Returns
TypeDescription
\Zend_Image_Barcode_Abstract
Details
Throw
 
methodpublicsetImageType(string $value) : \Zend_Barcode_RendererAbstract

Set the image type to produce (png, jpeg, gif)

Parameters
NameTypeDescription
$valuestring
Returns
TypeDescription
\Zend_Barcode_RendererAbstract
Details
Throw
 
methodpublicsetResource( $image) : \Zend_Barcode_Renderer

Set an image resource to draw the barcode inside

Parameters
NameTypeDescription
$image
Returns
TypeDescription
\Zend_Barcode_Renderer
Details
Throw
 
methodpublicsetWidth(mixed $value) : void

Set barcode width

Parameters
NameTypeDescription
$valuemixed
Documentation was generated by phpDocumentor 2.2.0 .