1542. Class

1542.1. Zend\Barcode\Renderer\Image

Class for rendering the barcode as image

1542.1.1. Methods

1542.1.1.1. __construct

__construct()

Constructor

Parameters:array|Traversable
Throws RendererCreationException:
 

1542.1.1.2. setHeight

setHeight()

Set height of the result image

Parameters:null|integer
Throws ExceptionOutOfRangeException:
 
Return type:Image

1542.1.1.3. getHeight

getHeight()

Get barcode height

Return type:int

1542.1.1.4. setWidth

setWidth()

Set barcode width

Parameters:mixed
Throws ExceptionOutOfRangeException:
 
Return type:self

1542.1.1.5. getWidth

getWidth()

Get barcode width

Return type:int

1542.1.1.6. setResource

setResource()

Set an image resource to draw the barcode inside

Parameters:resource
Return type:Image
Throws :ExceptionInvalidArgumentException

1542.1.1.7. setImageType

setImageType()

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

Parameters:string
Throws ExceptionInvalidArgumentException:
 
Return type:Image

1542.1.1.8. getImageType

getImageType()

Retrieve the image type to produce

Return type:string

1542.1.1.9. initRenderer

initRenderer()

Initialize the image resource

Return type:void

1542.1.1.10. checkSpecificParams

checkSpecificParams()

Check barcode parameters

Return type:void

1542.1.1.11. checkDimensions

checkDimensions()

Check barcode dimensions

Return type:void

1542.1.1.12. render

render()

Draw and render the barcode with correct headers

Return type:mixed

1542.1.1.13. drawPolygon

drawPolygon()

Draw a polygon in the image resource

Parameters:
  • array
  • integer
  • bool

1542.1.1.14. drawText

drawText()

Draw a polygon in the image resource

Parameters:
  • string
  • float
  • array
  • string
  • integer
  • string
  • float
Throws ExceptionRuntimeException: