32 lines
1.4 KiB
C
32 lines
1.4 KiB
C
/* Capas. Opacidad 0..255. Una capa bloqueada rechaza ediciones de píxeles. */
|
|
#ifndef TAHGIBU_LAYER_H
|
|
#define TAHGIBU_LAYER_H
|
|
|
|
#include "tahgibu/document.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
size_t tgb_layer_count(const tgb_document *doc);
|
|
uint32_t tgb_layer_id(const tgb_document *doc, size_t index); /* 0 si fuera de rango */
|
|
tgb_status tgb_layer_index_of(const tgb_document *doc, uint32_t id, size_t *out_index);
|
|
/* El puntero devuelto es válido hasta el siguiente cambio de capas. */
|
|
const char *tgb_layer_name(const tgb_document *doc, size_t index);
|
|
bool tgb_layer_visible(const tgb_document *doc, size_t index);
|
|
bool tgb_layer_locked(const tgb_document *doc, size_t index);
|
|
uint8_t tgb_layer_opacity(const tgb_document *doc, size_t index);
|
|
|
|
tgb_status tgb_layer_add(tgb_document *doc, size_t index, const char *name, uint32_t *out_id);
|
|
tgb_status tgb_layer_delete(tgb_document *doc, size_t index); /* nunca la última */
|
|
tgb_status tgb_layer_move(tgb_document *doc, size_t from, size_t to);
|
|
tgb_status tgb_layer_rename(tgb_document *doc, size_t index, const char *name);
|
|
tgb_status tgb_layer_set_visible(tgb_document *doc, size_t index, bool visible);
|
|
tgb_status tgb_layer_set_locked(tgb_document *doc, size_t index, bool locked);
|
|
tgb_status tgb_layer_set_opacity(tgb_document *doc, size_t index, uint8_t opacity);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif
|