Layers

Layers — Functions for handling image layers.

Functions

Includes

#include <abydos.h>

Description

Some formats may compose an image out of several layers. It could simply be a set of partly transparent pixmaps placed on top of each other. But layers could also be more like filter operations. Sometimes the internal organization of the layers may be in the form of a tree. But abydos will in that case always flatten the tree and index the layers sequentially.

Functions

abydos_get_layer_count ()

int
abydos_get_layer_count (abydos_t *ar);

Get the number of layers of the image.

Parameters

ar

an abydos_t

 

abydos_get_layer_visibility ()

cairo_bool_t
abydos_get_layer_visibility (abydos_t *ar,
                             int layer);

Check if a layer is currently visible.

Parameters

ar

an abydos_t

 

layer

layer number starting from 0

 

Returns

True if the layer is visible


abydos_set_layer_visibility ()

void
abydos_set_layer_visibility (abydos_t *ar,
                             int layer,
                             cairo_bool_t visibility);

Sets the visibility of a layer. Currently this has no effect for images with only one layer.

Parameters

ar

an abydos_t

 

layer

layer number staring from 0

 

visibility

True show the layer, false to hide it