Layers
extends AbstractLayers
in package
implements
InfoProvider
Table of Contents
Interfaces
- InfoProvider
- Interface implemented by classes that provide info about a graphics driver.
Properties
- $classFactory : ClassFactoryInterface|null
- $image : Image
- $layers : array<string|int, Image>
- $offset : int
- $palette : PaletteInterface
- $resource : Imagick
Methods
- __construct() : mixed
- add() : $this
- Adds an image at the end of the layers stack.
- animate() : $this
- Animates layers.
- coalesce() : $this
- Coalesce layers. Each layer in the sequence is the same size as the first and composited with the next layer in the sequence.
- count() : int
- {@inheritdoc}
- current() : mixed
- {@inheritdoc}
- get() : ImageInterface
- Returns the image at offset.
- getClassFactory() : ClassFactoryInterface
- Get the class factory instance to be used.
- getDriverInfo() : Info|null
- Get the info about this driver.
- has() : bool
- Returns true if a layer at offset is preset.
- key() : mixed
- {@inheritdoc}
- merge() : mixed
- Merge layers into the original objects.
- next() : mixed
- {@inheritdoc}
- offsetExists() : bool
- {@inheritdoc}
- offsetGet() : mixed
- {@inheritdoc}
- offsetSet() : void
- {@inheritdoc}
- offsetUnset() : void
- {@inheritdoc}
- remove() : $this
- Removes the image at offset.
- rewind() : void
- {@inheritdoc}
- set() : $this
- Set an image at offset.
- setClassFactory() : $this
- Set the class factory instance to be used.
- valid() : bool
- {@inheritdoc}
- extractAt() : Image
- Tries to extract layer at given offset.
Properties
$classFactory
private
ClassFactoryInterface|null
$classFactory
$image
private
Image
$image
$layers
private
array<string|int, Image>
$layers
= array()
$offset
private
int
$offset
$palette
private
PaletteInterface
$palette
$resource
private
Imagick
$resource
Methods
__construct()
public
__construct(Image $image, PaletteInterface $palette, Imagick $resource[, mixed $initialOffset = 0 ]) : mixed
Parameters
- $image : Image
- $palette : PaletteInterface
- $resource : Imagick
- $initialOffset : mixed = 0
add()
Adds an image at the end of the layers stack.
public
add(ImageInterface $image) : $this
Parameters
- $image : ImageInterface
Tags
Return values
$thisanimate()
Animates layers.
public
animate(mixed $format, mixed $delay, mixed $loops) : $this
Parameters
- $format : mixed
-
The output output format
- $delay : mixed
-
The delay in milliseconds between two frames
- $loops : mixed
-
The number of loops, 0 means infinite
Tags
Return values
$thiscoalesce()
Coalesce layers. Each layer in the sequence is the same size as the first and composited with the next layer in the sequence.
public
coalesce() : $this
Tags
Return values
$thiscount()
{@inheritdoc}
public
count() : int
Tags
Attributes
Return values
intcurrent()
{@inheritdoc}
public
current() : mixed
Tags
Attributes
get()
Returns the image at offset.
public
get(mixed $offset) : ImageInterface
Parameters
- $offset : mixed
Tags
Return values
ImageInterfacegetClassFactory()
Get the class factory instance to be used.
public
getClassFactory() : ClassFactoryInterface
Tags
Return values
ClassFactoryInterfacegetDriverInfo()
Get the info about this driver.
public
static getDriverInfo([mixed $required = true ]) : Info|null
Parameters
- $required : mixed = true
-
when the driver is not available: if FALSE the function returns NULL, if TRUE the driver throws a \Imagine\Exception\NotSupportedException
Tags
Return values
Info|nullhas()
Returns true if a layer at offset is preset.
public
has(mixed $offset) : bool
Parameters
- $offset : mixed
Tags
Return values
boolkey()
{@inheritdoc}
public
key() : mixed
Tags
Attributes
merge()
Merge layers into the original objects.
public
merge() : mixed
Tags
next()
{@inheritdoc}
public
next() : mixed
Tags
Attributes
offsetExists()
{@inheritdoc}
public
offsetExists(mixed $offset) : bool
Parameters
- $offset : mixed
Tags
Attributes
Return values
booloffsetGet()
{@inheritdoc}
public
offsetGet(mixed $offset) : mixed
Parameters
- $offset : mixed
Tags
Attributes
offsetSet()
{@inheritdoc}
public
offsetSet(mixed $offset, mixed $image) : void
Parameters
- $offset : mixed
- $image : mixed
Tags
Attributes
offsetUnset()
{@inheritdoc}
public
offsetUnset(mixed $offset) : void
Parameters
- $offset : mixed
Tags
Attributes
remove()
Removes the image at offset.
public
remove(mixed $offset) : $this
Parameters
- $offset : mixed
Tags
Return values
$thisrewind()
{@inheritdoc}
public
rewind() : void
Tags
Attributes
set()
Set an image at offset.
public
set(mixed $offset, ImageInterface $image) : $this
Parameters
- $offset : mixed
- $image : ImageInterface
Tags
Return values
$thissetClassFactory()
Set the class factory instance to be used.
public
setClassFactory(ClassFactoryInterface $classFactory) : $this
Parameters
- $classFactory : ClassFactoryInterface
Tags
Return values
$thisvalid()
{@inheritdoc}
public
valid() : bool
Tags
Attributes
Return values
boolextractAt()
Tries to extract layer at given offset.
private
extractAt(int $offset) : Image
Parameters
- $offset : int