Properties

$margin

$margin : integer

Margin around the QR code, also known as quiet zone.

Type

integer

$width

$width : integer

Requested width of the rendered image.

Type

integer

$height

$height : integer

Requested height of the rendered image.

Type

integer

$roundDimensions

$roundDimensions : boolean

Whether dimensions should be rounded down.

Type

boolean

$finalWidth

$finalWidth : integer

Final width of the image.

Type

integer

$finalHeight

$finalHeight : integer

Final height of the image.

Type

integer

$blockSize

$blockSize : integer

Size of each individual block.

Type

integer

$floorToClosestDimension

$floorToClosestDimension : boolean

Whether dimensions should be rounded down

Type

boolean

$decorators

$decorators : array

Decorators used on QR codes.

Type

array

Methods

setMargin()

setMargin(integer  $margin) : \BaconQrCode\Renderer\Image\AbstractRenderer

Sets the margin around the QR code.

Parameters

integer $margin

Throws

\BaconQrCode\Exception\InvalidArgumentException

Returns

\BaconQrCode\Renderer\Image\AbstractRenderer

getMargin()

getMargin() : integer

Gets the margin around the QR code.

Returns

integer

setWidth()

setWidth(integer  $width) : \BaconQrCode\Renderer\Image\AbstractRenderer

Sets the height around the renderd image.

If the width is smaller than the matrix width plus padding, the renderer will automatically use that as the width instead of the specified one.

Parameters

integer $width

Returns

\BaconQrCode\Renderer\Image\AbstractRenderer

getWidth()

getWidth() : integer

Gets the width of the rendered image.

Returns

integer

setHeight()

setHeight(integer  $height) : \BaconQrCode\Renderer\Image\AbstractRenderer

Sets the height around the renderd image.

If the height is smaller than the matrix height plus padding, the renderer will automatically use that as the height instead of the specified one.

Parameters

integer $height

Returns

\BaconQrCode\Renderer\Image\AbstractRenderer

getHeight()

getHeight() : integer

Gets the height around the rendered image.

Returns

integer

setRoundDimensions()

setRoundDimensions(boolean  $flag) : \BaconQrCode\Renderer\Image\AbstractRenderer

Sets whether dimensions should be rounded down.

Parameters

boolean $flag

Returns

\BaconQrCode\Renderer\Image\AbstractRenderer

shouldRoundDimensions()

shouldRoundDimensions() : boolean

Gets whether dimensions should be rounded down.

Returns

boolean

render()

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

render(): defined by RendererInterface.

Parameters

\BaconQrCode\Encoder\QrCode $qrCode

Returns

string