HumHub Documentation (unofficial)

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

$layers

private array<string|int, Image> $layers = array()

$resource

private Imagick $resource

Methods

animate()

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
see
LayersInterface::animate()
Return values
$this

coalesce()

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
see
LayersInterface::coalesce()
Return values
$this

getDriverInfo()

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
see
InfoProvider::getDriverInfo()
since
1.3.0
Return values
Info|null

offsetExists()

{@inheritdoc}

public offsetExists(mixed $offset) : bool
Parameters
$offset : mixed
Tags
see
ArrayAccess::offsetExists()
Attributes
#[ReturnTypeWillChange]
Return values
bool

offsetGet()

{@inheritdoc}

public offsetGet(mixed $offset) : mixed
Parameters
$offset : mixed
Tags
see
ArrayAccess::offsetGet()
Attributes
#[ReturnTypeWillChange]

offsetSet()

{@inheritdoc}

public offsetSet(mixed $offset, mixed $image) : void
Parameters
$offset : mixed
$image : mixed
Tags
see
ArrayAccess::offsetSet()
Attributes
#[ReturnTypeWillChange]

offsetUnset()

{@inheritdoc}

public offsetUnset(mixed $offset) : void
Parameters
$offset : mixed
Tags
see
ArrayAccess::offsetUnset()
Attributes
#[ReturnTypeWillChange]

extractAt()

Tries to extract layer at given offset.

private extractAt(int $offset) : Image
Parameters
$offset : int
Tags
throws
RuntimeException
Return values
Image

        
On this page

Search results