\BaconQrCode\Renderer\ImageEpsImageBackEnd

Summary

Methods
Properties
Constants
new()
scale()
translate()
rotate()
push()
pop()
drawPathWithColor()
drawPathWithGradient()
done()
No public properties found
PRECISION
No protected methods found
No protected properties found
N/A
drawPathOperations()
createGradientFill()
getColorSetString()
getColorString()
$eps
N/A

Constants

PRECISION

PRECISION = 3

Properties

Methods

new()

new(int  $size, \BaconQrCode\Renderer\Color\ColorInterface  $backgroundColor) : void

Starts a new image.

If a previous image was already started, previous data get erased.

Parameters

int $size
\BaconQrCode\Renderer\Color\ColorInterface $backgroundColor

scale()

scale(float  $size) : void

Transforms all following drawing operation coordinates by scaling them by a given factor.

Parameters

float $size

translate()

translate(float  $x, float  $y) : void

Transforms all following drawing operation coordinates by translating them by a given amount.

Parameters

float $x
float $y

rotate()

rotate(int  $degrees) : void

Transforms all following drawing operation coordinates by rotating them by a given amount.

Parameters

int $degrees

push()

push() : void

Pushes the current coordinate transformation onto a stack.

pop()

pop() : void

Pops the last coordinate transformation from a stack.

drawPathWithColor()

drawPathWithColor(\BaconQrCode\Renderer\Path\Path  $path, \BaconQrCode\Renderer\Color\ColorInterface  $color) : void

Draws a path with a given color.

Parameters

\BaconQrCode\Renderer\Path\Path $path
\BaconQrCode\Renderer\Color\ColorInterface $color

drawPathWithGradient()

drawPathWithGradient(\BaconQrCode\Renderer\Path\Path  $path, \BaconQrCode\Renderer\RendererStyle\Gradient  $gradient, float  $x, float  $y, float  $width, float  $height) : void

Draws a path with a given gradient which spans the box described by the position and size.

Parameters

\BaconQrCode\Renderer\Path\Path $path
\BaconQrCode\Renderer\RendererStyle\Gradient $gradient
float $x
float $y
float $width
float $height

done()

done() : string

Ends the image drawing operation and returns the resulting blob.

This should reset the state of the back end and thus this method should only be callable once per image.

Returns

string —

drawPathOperations()

drawPathOperations(iterable  $ops, mixed  $fromX, mixed  $fromY) : string

Parameters

iterable $ops
mixed $fromX
mixed $fromY

Returns

string —

createGradientFill()

createGradientFill(\BaconQrCode\Renderer\RendererStyle\Gradient  $gradient, float  $x, float  $y, float  $width, float  $height) : void

Parameters

\BaconQrCode\Renderer\RendererStyle\Gradient $gradient
float $x
float $y
float $width
float $height

getColorSetString()

getColorSetString(\BaconQrCode\Renderer\Color\ColorInterface  $color) : string

Parameters

\BaconQrCode\Renderer\Color\ColorInterface $color

Returns

string —

getColorString()

getColorString(\BaconQrCode\Renderer\Color\ColorInterface  $color) : string

Parameters

\BaconQrCode\Renderer\Color\ColorInterface $color

Returns

string —