Zend\Barcode\Renderer\Svg
Class for rendering the barcode as svg
Synopsis
class Svg
extends AbstractRenderer
{
- // members
- protected DOMDocument $resource;
- protected DOMElement $rootElement;
- protected integer $userHeight;
- protected integer $userWidth;
- protected bool $drawPolygonExecuted;
- // Inherited members from AbstractRenderer
- protected string $rendererNamespace;
- protected string $type;
- protected bool $automaticRenderError;
- protected integer $topOffset;
- protected integer $leftOffset;
- protected string $horizontalPosition;
- protected string $verticalPosition;
- protected integer $moduleSize;
- protected ObjectInterface $barcode;
- protected $resource;
- protected Boolean $transparentBackground;
- // methods
- public Svg setHeight()
- public int getHeight()
- public self setWidth()
- public int getWidth()
- public Svg setResource()
- protected void initRenderer()
- protected void readRootElement()
- protected void appendRootElement()
- protected DOMElement createElement()
- protected void checkSpecificParams()
- protected void checkDimensions()
- public mixed draw()
- public mixed render()
- protected void drawPolygon()
- protected void drawText()
- // Inherited methods from AbstractRenderer
- public void __construct()
- public AbstractRenderer setOptions()
- public AbstractRenderer setRendererNamespace()
- public string getRendererNamespace()
- public $this setTransparentBackground()
- public bool getTransparentBackground()
- public string getType()
- public AbstractRenderer setTopOffset()
- public int getTopOffset()
- public AbstractRenderer setLeftOffset()
- public int getLeftOffset()
- public AbstractRenderer setAutomaticRenderError()
- public AbstractRenderer setHorizontalPosition()
- public string getHorizontalPosition()
- public AbstractRenderer setVerticalPosition()
- public string getVerticalPosition()
- public AbstractRenderer setModuleSize()
- public float getModuleSize()
- public bool getAutomaticRenderError()
- public AbstractRenderer setBarcode()
- public ObjectInterface getBarcode()
- public bool checkParams()
- protected void checkBarcodeObject()
- protected void adjustPosition()
- public mixed draw()
- protected abstract void checkSpecificParams()
- protected abstract void initRenderer()
- protected abstract void drawPolygon()
- protected abstract void drawText()
Hierarchy
Members
protected
- $automaticRenderError
—
Zend\Barcode\Renderer\bool
Activate/Deactivate the automatic rendering of exception - $barcode
—
Zend\Barcode\Renderer\Object\ObjectInterface
Barcode object - $drawPolygonExecuted
—
Zend\Barcode\Renderer\bool
Flag to determime if drawPolygon has been run once already - $horizontalPosition
—
int
Horizontal position of the barcode in the rendering resource - $leftOffset
—
int
Offset of the barcode from the left of the rendering resource - $moduleSize
—
float
Module size rendering - $rendererNamespace
—
string
Namespace of the renderer for autoloading - $resource
—
DOMDocument
Resource for the image -
$resource
Drawing resource - $rootElement
—
DOMElement
Root element of the XML structure - $topOffset
—
int
Offset of the barcode from the top of the rendering resource - $transparentBackground
—
Zend\Barcode\Renderer\Boolean
Show a transparent background - $type
—
string
Renderer type - $userHeight
—
int
Height of the rendered image wanted by user - $userWidth
—
int
Width of the rendered image wanted by user - $verticalPosition
—
int
Vertical position of the barcode in the rendering resource
Methods
protected
- appendRootElement() — Append a new DOMElement to the root element
- checkDimensions() — Check barcode dimensions
- checkSpecificParams() — Check barcode parameters
- createElement() — Create DOMElement
- drawPolygon() — Draw a polygon in the svg resource
- drawText() — Draw a polygon in the svg resource
- initRenderer() — Initialize the image resource
- readRootElement()
public
- draw() — Draw the barcode in the rendering resource
- getHeight() — Get barcode height
- getWidth() — Get barcode width
- render() — Draw and render the barcode with correct headers
- setHeight() — Set height of the result image
- setResource() — Set an image resource to draw the barcode inside
- setWidth() — Set barcode width
Inherited from Zend\Barcode\Renderer\AbstractRenderer
protected
- adjustPosition() — Calculate the left and top offset of the barcode in the rendering support
- checkBarcodeObject() — Check if a barcode object is correctly provided
- checkSpecificParams() — Checking of parameters after all settings
- drawPolygon() — Draw a polygon in the rendering resource
- drawText() — Draw a polygon in the rendering resource
- initRenderer() — Initialize the rendering resource
public
- checkParams() — Checking of parameters after all settings
- draw() — Draw the barcode in the rendering resource
- getAutomaticRenderError() — Retrieve the automatic rendering of exception
- getBarcode() — Retrieve the barcode object
- getHorizontalPosition() — Horizontal position of the barcode in the rendering resource
- getLeftOffset() — Retrieve vertical adjustment
- getModuleSize() — Set the size of a module
- getRendererNamespace() — Retrieve renderer namespace
- getTopOffset() — Retrieve vertical adjustment
- getTransparentBackground()
- getType() — Retrieve renderer type
- getVerticalPosition() — Vertical position of the barcode in the rendering resource
- setAutomaticRenderError() — Activate/Deactivate the automatic rendering of exception
- setBarcode() — Set the barcode object
- setHorizontalPosition() — Horizontal position of the barcode in the rendering resource
- setLeftOffset() — Manually adjust left position
- setModuleSize() — Set the size of a module
- setOptions() — Set renderer state from options array
- setRendererNamespace() — Set renderer namespace for autoloading
- setTopOffset() — Manually adjust top position
- setTransparentBackground() — Set whether background should be transparent Will work for SVG and Image (png and gif only)
- setVerticalPosition() — Vertical position of the barcode in the rendering resource