API Documentation

Barcode/Renderer/Image.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Barcode
subpackage
Renderer
version
$Id: Image.php 20367 2010-01-18 04:51:23Z ralph $
Classes
Zend_Barcode_Renderer_Image

Description

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.

Zend_Barcode_Renderer_Image

Extends from
Zend_Barcode_Renderer_RendererAbstract
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Barcode
Properties
$_allowedImageType
$_imageType
$_resource
$_imageForeColor
$_imageBackgroundColor
$_userHeight
$_userWidth
Methods
__construct
setHeight
getHeight
setWidth
getWidth
setResource
setImageType
getImageType
_initRenderer
_checkParams
_checkDimensions
render
_drawPolygon
_drawText

Description

Class for rendering the barcode as image

Properties

$_allowedImageType

array $_allowedImageType = 'array'

List of authorized output format

Details

$_allowedImageType
array
visibility
protected
default
array
final
false
static
false

$_imageBackgroundColor

integer $_imageBackgroundColor = 'null'

Resource for the background color of the image

Details

$_imageBackgroundColor
integer
visibility
protected
default
null
final
false
static
false

$_imageForeColor

integer $_imageForeColor = 'null'

Resource for the font and bars color of the image

Details

$_imageForeColor
integer
visibility
protected
default
null
final
false
static
false

$_imageType

string $_imageType = 'png'

Image format

Details

$_imageType
string
visibility
protected
default
png
final
false
static
false

$_resource

resource $_resource = 'null'

Resource for the image

Details

$_resource
resource
visibility
protected
default
null
final
false
static
false

$_userHeight

integer $_userHeight = '0'

Height of the rendered image wanted by user

Details

$_userHeight
integer
visibility
protected
default
0
final
false
static
false

$_userWidth

integer $_userWidth = '0'

Width of the rendered image wanted by user

Details

$_userWidth
integer
visibility
protected
default
0
final
false
static
false

Methods

__construct

__construct(  $options = null ) :
Arguments
$options
Details
visibility
public
final
false
static
false

_checkDimensions

_checkDimensions( ) : void

Check barcode dimensions

Details
visibility
protected
final
false
static
false

_checkParams

_checkParams( ) : void

Check barcode parameters

Details
visibility
protected
final
false
static
false

_drawPolygon

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

Draw a polygon in the image resource

Arguments
$points
array
$color
integer
$filled
boolean
Details
visibility
protected
final
false
static
false

_drawText

_drawText( string $text, float $size, array $position, string $font, integer $color, string $alignment = center, float $orientation = 0 ) :

Draw a polygon in the image resource

Arguments
$text
string
$size
float
$position
array
$font
string
$color
integer
$alignment
string
$orientation
float
Details
visibility
protected
final
false
static
false

_initRenderer

_initRenderer( ) : void

Initialize the image resource

Details
visibility
protected
final
false
static
false

getHeight

getHeight( ) : int

Get barcode height

Output
int
Details
visibility
public
final
false
static
false

getImageType

getImageType( ) : string

Retrieve the image type to produce

Output
string
Details
visibility
public
final
false
static
false

getWidth

getWidth( ) : int

Get barcode width

Output
int
Details
visibility
public
final
false
static
false

render

render( ) : mixed

Draw and render the barcode with correct headers

Output
mixed
Details
visibility
public
final
false
static
false

setHeight

setHeight( null|integer $value ) : Zend_Image_Barcode_Abstract

Set height of the result image

Arguments
$value
nullinteger
Output
Zend_Image_Barcode_Abstract
Details
visibility
public
final
false
static
false
throw

setImageType

setImageType( string $value ) : Zend_Barcode_RendererAbstract

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

Arguments
$value
string
Output
Zend_Barcode_RendererAbstract
Details
visibility
public
final
false
static
false
throw

setResource

setResource(  $image ) : Zend_Barcode_Renderer

Set an image resource to draw the barcode inside

Arguments
$image
Output
Zend_Barcode_Renderer
Details
visibility
public
final
false
static
false
throw

setWidth

setWidth( mixed $value ) : void

Set barcode width

Arguments
$value
mixed
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.