API Documentation

Zend/Barcode/Renderer/Image.php

Show: inherited
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-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Barcode  
Subpackage
Renderer  
Version
$Id: Image.php 24594 2012-01-05 21:27:01Z matthew $  

\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-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprotectedarray  $_allowedImageType= 'array( 'png''

List of authorized output format

Default valuearray( 'png'Details
Type
array
Propertyprotectedinteger  $_imageBackgroundColor= 'null'

Resource for the background color of the image

Default valuenullDetails
Type
integer
Propertyprotectedinteger  $_imageForeColor= 'null'

Resource for the font and bars color of the image

Default valuenullDetails
Type
integer
Propertyprotectedstring  $_imageType= ''png''

Image format

Default value'png'Details
Type
string
Propertyprotectedresource  $_resource= 'null'

Resource for the image

Default valuenullDetails
Type
resource
Propertyprotectedinteger  $_userHeight= '0'

Height of the rendered image wanted by user

Default value0Details
Type
integer
Propertyprotectedinteger  $_userWidth= '0'

Width of the rendered image wanted by user

Default value0Details
Type
integer

Methods

methodpublic__construct(  $options = null ) : void

Parameters
Name Type Description
$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
Name Type Description
$points array
$color integer
$filled boolean
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
Name Type Description
$text string
$size float
$position array
$font string
$color integer
$alignment string
$orientation float
methodprotected_initRenderer( ) : void

Initialize the image resource

methodpublicgetHeight( ) : int

Get barcode height

Returns
Type Description
int
methodpublicgetImageType( ) : string

Retrieve the image type to produce

Returns
Type Description
string
methodpublicgetWidth( ) : int

Get barcode width

Returns
Type Description
int
methodpublicrender( ) : mixed

Draw and render the barcode with correct headers

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

Set height of the result image

Parameters
Name Type Description
$value null|integer
Returns
Type Description
\Zend_Image_Barcode_Abstract
Throws
Exception Description
\Zend_Image_Barcode_Exception
methodpublicsetImageType( string $value ) : \Zend_Barcode_RendererAbstract

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

Parameters
Name Type Description
$value string
Returns
Type Description
\Zend_Barcode_RendererAbstract
Throws
Exception Description
\Zend_Barcode_Renderer_Exception
methodpublicsetResource(  $image ) : \Zend_Barcode_Renderer

Set an image resource to draw the barcode inside

Parameters
Name Type Description
$image
Returns
Type Description
\Zend_Barcode_Renderer
Throws
Exception Description
\Zend_Barcode_Renderer_Exception
methodpublicsetWidth( mixed $value ) : void

Set barcode width

Parameters
Name Type Description
$value mixed
Documentation was generated by DocBlox 0.15.1.