API Documentation

Zend/Barcode/Renderer/Svg.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 20366 2010-01-18 03:56:52Z ralph $  

\Zend_Barcode_Renderer_Svg

Package: Zend\Barcode

Class for rendering the barcode as svg

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

Propertyprotected\DOMDocument  $_resource= 'null'

Resource for the image

Default valuenullDetails
Type
\DOMDocument
Propertyprotected\DOMElement  $_rootElement= 'null'

Root element of the XML structure

Default valuenullDetails
Type
\DOMElement
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

methodprotected_appendRootElement( string $tagName, array $attributes = array(), string $textContent = null ) : void

Append a new DOMElement to the root element

Parameters
Name Type Description
$tagName string
$attributes array
$textContent string
methodprotected_checkDimensions( ) : void

Check barcode dimensions

methodprotected_checkParams( ) : void

Check barcode parameters

methodprotected_createElement( string $tagName, array $attributes = array(), string $textContent = null ) : \DOMElement

Create DOMElement

Parameters
Name Type Description
$tagName string
$attributes array
$textContent string
Returns
Type Description
\DOMElement
methodprotected_drawPolygon( array $points, integer $color, boolean $filled = true ) : void

Draw a polygon in the svg 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 svg 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

methodprotected_readRootElement( ) : void

methodpublicdraw( ) : mixed

Draw the barcode in the rendering resource

Returns
Type Description
mixed
methodpublicgetHeight( ) : int

Get barcode height

Returns
Type Description
int
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
methodpublicsetResource(  $svg ) : \Zend_Barcode_Renderer

Set an image resource to draw the barcode inside

Parameters
Name Type Description
$svg
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.