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

Properties

>VPropertyprotected\DOMDocument $_resource = null
Resource for the image
Default valuenullDetails
Type
\DOMDocument
>VPropertyprotected\DOMElement $_rootElement = null
Root element of the XML structure
Default valuenullDetails
Type
\DOMElement
>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

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

Append a new DOMElement to the root element

Parameters
NameTypeDescription
$tagNamestring
$attributesarray
$textContentstring
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
NameTypeDescription
$tagNamestring
$attributesarray
$textContentstring
Returns
TypeDescription
\DOMElement
methodprotected_drawPolygon(array $points, integer $color, boolean $filled = true) : void

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

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

Initialize the image resource

methodprotected_readRootElement() : void

methodpublicdraw() : mixed

Draw the barcode in the rendering resource

Returns
TypeDescription
mixed
methodpublicgetHeight() : int

Get barcode height

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

Set an image resource to draw the barcode inside

Parameters
NameTypeDescription
$svg
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 .