Zend Framework  1.12
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Zend_Barcode_Renderer_Image Class Reference

Public Member Functions

 __construct ($options=null)
 
 setHeight ($value)
 Set height of the result image.
 
 getHeight ()
 Get barcode height.
 
 setWidth ($value)
 Set barcode width.
 
 getWidth ()
 Get barcode width.
 
 setResource ($image)
 Set an image resource to draw the barcode inside.
 
 setImageType ($value)
 Set the image type to produce (png, jpeg, gif)
 
 getImageType ()
 Retrieve the image type to produce.
 
 render ()
 Draw and render the barcode with correct headers.
 
- Public Member Functions inherited from Zend_Barcode_Renderer_RendererAbstract
 __construct ($options=null)
 Constructor.
 
 setOptions ($options)
 Set renderer state from options array.
 
 setConfig (Zend_Config $config)
 Set renderer state from config object.
 
 setRendererNamespace ($namespace)
 Set renderer namespace for autoloading.
 
 getRendererNamespace ()
 Retrieve renderer namespace.
 
 getType ()
 Retrieve renderer type.
 
 setTopOffset ($value)
 Manually adjust top position.
 
 getTopOffset ()
 Retrieve vertical adjustment.
 
 setLeftOffset ($value)
 Manually adjust left position.
 
 getLeftOffset ()
 Retrieve vertical adjustment.
 
 setAutomaticRenderError ($value)
 Activate/Deactivate the automatic rendering of exception.
 
 setHorizontalPosition ($value)
 Horizontal position of the barcode in the rendering resource.
 
 getHorizontalPosition ()
 Horizontal position of the barcode in the rendering resource.
 
 setVerticalPosition ($value)
 Vertical position of the barcode in the rendering resource.
 
 getVerticalPosition ()
 Vertical position of the barcode in the rendering resource.
 
 setModuleSize ($value)
 Set the size of a module.
 
 getModuleSize ()
 Set the size of a module.
 
 getAutomaticRenderError ()
 Retrieve the automatic rendering of exception.
 
 setBarcode ($barcode)
 Set the barcode object.
 
 getBarcode ()
 Retrieve the barcode object.
 
 checkParams ()
 Checking of parameters after all settings.
 
 draw ()
 Draw the barcode in the rendering resource.
 
 render ()
 Render the resource by sending headers and drawed resource.
 

Protected Member Functions

 _initRenderer ()
 Initialize the image resource.
 
 _checkParams ()
 Check barcode parameters.
 
 _checkDimensions ()
 Check barcode dimensions.
 
 _drawPolygon ($points, $color, $filled=true)
 Draw a polygon in the image resource.
 
 _drawText ($text, $size, $position, $font, $color, $alignment= 'center', $orientation=0)
 Draw a polygon in the image resource.
 
- Protected Member Functions inherited from Zend_Barcode_Renderer_RendererAbstract
 _checkBarcodeObject ()
 Check if a barcode object is correctly provided.
 
 _adjustPosition ($supportHeight, $supportWidth)
 Calculate the left and top offset of the barcode in the rendering support.
 
 _checkParams ()
 Checking of parameters after all settings.
 
 _initRenderer ()
 Initialize the rendering resource.
 
 _drawPolygon ($points, $color, $filled=true)
 Draw a polygon in the rendering resource.
 
 _drawText ($text, $size, $position, $font, $color, $alignment= 'center', $orientation=0)
 Draw a polygon in the rendering resource.
 

Protected Attributes

 $_allowedImageType
 
 $_imageType = 'png'
 
 $_resource = null
 
 $_imageForeColor = null
 
 $_imageBackgroundColor = null
 
 $_userHeight = 0
 
 $_userWidth = 0
 
- Protected Attributes inherited from Zend_Barcode_Renderer_RendererAbstract
 $_rendererNamespace = 'Zend_Barcode_Renderer'
 
 $_type = null
 
 $_automaticRenderError = false
 
 $_topOffset = 0
 
 $_leftOffset = 0
 
 $_horizontalPosition = 'left'
 
 $_verticalPosition = 'top'
 
 $_moduleSize = 1
 
 $_barcode
 
 $_resource
 Drawing resource.
 

Constructor & Destructor Documentation

__construct (   $options = null)

Member Function Documentation

_checkDimensions ( )
protected

Check barcode dimensions.

Returns
void
_checkParams ( )
protected

Check barcode parameters.

Returns
void
_drawPolygon (   $points,
  $color,
  $filled = true 
)
protected

Draw a polygon in the image resource.

Parameters
array$points
integer$color
boolean$filled
_drawText (   $text,
  $size,
  $position,
  $font,
  $color,
  $alignment = 'center',
  $orientation = 0 
)
protected

Draw a polygon in the image resource.

Parameters
string$text
float$size
array$position
string$font
integer$color
string$alignment
float$orientation

imagestring() doesn't allow orientation, if orientation needed: a TTF font is required. Throwing an exception here, allow to use automaticRenderError to informe user of the problem instead of simply not drawing the text

_initRenderer ( )
protected

Initialize the image resource.

Returns
void
getHeight ( )

Get barcode height.

Returns
int
getImageType ( )

Retrieve the image type to produce.

Returns
string
getWidth ( )

Get barcode width.

Returns
int
render ( )

Draw and render the barcode with correct headers.

Returns
mixed
setHeight (   $value)

Set height of the result image.

Parameters
null | integer$value
Returns
Zend_Image_Barcode_Abstract
Exceptions
Zend_Image_Barcode_Exception
setImageType (   $value)

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

Parameters
string$value
Returns
Zend_Barcode_RendererAbstract
Exceptions
Zend_Barcode_Renderer_Exception
setResource (   $image)

Set an image resource to draw the barcode inside.

Parameters
resource$value
Returns
Zend_Barcode_Renderer
Exceptions
Zend_Barcode_Renderer_Exception
setWidth (   $value)

Set barcode width.

Parameters
mixed$value
Returns
void

Member Data Documentation

$_allowedImageType
protected
Initial value:
= array(
'png',
'jpeg',
'gif',
)
$_imageBackgroundColor = null
protected
$_imageForeColor = null
protected
$_imageType = 'png'
protected
$_resource = null
protected
$_userHeight = 0
protected
$_userWidth = 0
protected