`lqr_carver_attach`
Prev | Carver objects | Next

## Name

lqr_carver_attach — attach an `LqrCarver` to another `LqrCarver`

## Synopsis

    #include <lqr.h>

`LqrRetVal lqr_carver_attach(` | LqrCarver* carver,
| LqrCarver* aux`)`;

## Description

The function `lqr_carver_attach` is used to attach an `LqrCarver` object (pointed to by `aux`) to another one (pointed to by `carver`). This will have the effect that each operation performed over the `carver` object will be reflected on `aux` (they will share the same visibility map).

This function must not be used after a visibility map was loaded into the base object (the one pointed to by `carver`).

The object pointed to by `aux` must have the same original size as the base object. Note that the original size information is reset whenever a flattening operation occurs, or the rescaling direction changes, so that this function should be called befor rescaling occurs.

There is no limitation on the number of `LqrCarver` objects which is possible to attach. Nesting is also possible. It is irrelevant if the `aux` carver is initialised or not; from the moment of attachment, it will passively undergo all transformations performed over `carver`.

## Return value

The return value follows the Liquid Rescale library signalling system. `LQR_ERROR` is returned if the sizes of `carver` and `aux` don't match.

## See also

LqrRetVal(3), `lqr_carver_list_start`(3), `lqr_carver_list_current`(3), `lqr_carver_list_next`(3), `lqr_carver_list_foreach`(3)

Prev | Up | Next
`lqr_carver_set_use_cache` | Home | `lqr_carver_list_start`