\BaconQrCode\Renderer\ImageRendererInterface

Renderer interface.

Summary

Methods
Constants
render()
init()
addColor()
drawBackground()
drawBlock()
getByteStream()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

render()

render(\BaconQrCode\Encoder\QrCode  $qrCode) : string

Renders a QR code.

Parameters

\BaconQrCode\Encoder\QrCode $qrCode

Returns

string —

init()

init() : void

Initiates the drawing area.

addColor()

addColor(string  $id, \BaconQrCode\Renderer\Color\ColorInterface  $color) : void

Adds a color to the drawing area.

Parameters

string $id
\BaconQrCode\Renderer\Color\ColorInterface $color

drawBackground()

drawBackground(string  $colorId) : void

Draws the background.

Parameters

string $colorId

drawBlock()

drawBlock(int  $x, int  $y, string  $colorId) : void

Draws a block at a specified position.

Parameters

int $x
int $y
string $colorId

getByteStream()

getByteStream() : string

Returns the byte stream representing the QR code.

Returns

string —