ImagickImageBackEnd
in package
implements
ImageBackEndInterface
Interfaces, Classes, Traits and Enums
- ImageBackEndInterface
- Interface for back ends able to to produce path based images.
Table of Contents
- $compressionQuality : int
- $draw : ImagickDraw|null
- $gradientCount : int|null
- $image : Imagick|null
- $imageFormat : string
- $matrices : array<string|int, TransformationMatrix>|null
- $matrixIndex : int|null
- __construct() : mixed
- done() : string
- Ends the image drawing operation and returns the resulting blob.
- drawPathWithColor() : void
- Draws a path with a given color.
- drawPathWithGradient() : void
- Draws a path with a given gradient which spans the box described by the position and size.
- new() : void
- Starts a new image.
- pop() : void
- Pops the last coordinate transformation from a stack.
- push() : void
- Pushes the current coordinate transformation onto a stack.
- rotate() : void
- Transforms all following drawing operation coordinates by rotating them by a given amount.
- scale() : void
- Transforms all following drawing operation coordinates by scaling them by a given factor.
- translate() : void
- Transforms all following drawing operation coordinates by translating them by a given amount.
- createGradientFill() : string
- drawPath() : void
- getColorPixel() : ImagickPixel
Properties
$compressionQuality
private
int
$compressionQuality
$draw
private
ImagickDraw|null
$draw
$gradientCount
private
int|null
$gradientCount
$image
private
Imagick|null
$image
$imageFormat
private
string
$imageFormat
$matrices
private
array<string|int, TransformationMatrix>|null
$matrices
$matrixIndex
private
int|null
$matrixIndex
Methods
__construct()
public
__construct([string $imageFormat = 'png' ][, int $compressionQuality = 100 ]) : mixed
Parameters
- $imageFormat : string = 'png'
- $compressionQuality : int = 100
Return values
mixed —done()
Ends the image drawing operation and returns the resulting blob.
public
done() : string
This should reset the state of the back end and thus this method should only be callable once per image.
Return values
string —drawPathWithColor()
Draws a path with a given color.
public
drawPathWithColor(Path $path, ColorInterface $color) : void
Parameters
- $path : Path
- $color : ColorInterface
Return values
void —drawPathWithGradient()
Draws a path with a given gradient which spans the box described by the position and size.
public
drawPathWithGradient(Path $path, Gradient $gradient, float $x, float $y, float $width, float $height) : void
Parameters
Return values
void —new()
Starts a new image.
public
new(int $size, ColorInterface $backgroundColor) : void
If a previous image was already started, previous data get erased.
Parameters
- $size : int
- $backgroundColor : ColorInterface
Return values
void —pop()
Pops the last coordinate transformation from a stack.
public
pop() : void
Return values
void —push()
Pushes the current coordinate transformation onto a stack.
public
push() : void
Return values
void —rotate()
Transforms all following drawing operation coordinates by rotating them by a given amount.
public
rotate(int $degrees) : void
Parameters
- $degrees : int
Return values
void —scale()
Transforms all following drawing operation coordinates by scaling them by a given factor.
public
scale(float $size) : void
Parameters
- $size : float
Return values
void —translate()
Transforms all following drawing operation coordinates by translating them by a given amount.
public
translate(float $x, float $y) : void
Parameters
- $x : float
- $y : float
Return values
void —createGradientFill()
private
createGradientFill(Gradient $gradient, float $x, float $y, float $width, float $height) : string
Parameters
- $gradient : Gradient
- $x : float
- $y : float
- $width : float
- $height : float
Return values
string —drawPath()
private
drawPath(Path $path) : void
Parameters
- $path : Path
Return values
void —getColorPixel()
private
getColorPixel(ColorInterface $color) : ImagickPixel
Parameters
- $color : ColorInterface