libgimpprint API Reference: array.c File Reference

Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

# src/main/array.c File Reference

`#include <gimp-print/gimp-print.h>`
`#include "gimp-print-internal.h"`
`#include <gimp-print/gimp-print-intl-internal.h>`
`#include <math.h>`
`#include <string.h>`
`#include <stdlib.h>`
`#include <limits.h>`

Go to the source code of this file.

## Data Structures
struct | stp_array
## Functions
void | check_array (const stp_array_t *array)
void | array_ctor (stp_array_t *array)
stp_array_t * | stp_array_create (int x_size, int y_size)
| Create a new array.
void | array_dtor (stp_array_t *array)
void | stp_array_destroy (stp_array_t *array)
| Destroy an array.
void | stp_array_copy (stp_array_t *dest, const stp_array_t *source)
| Copy an array.
stp_array_t * | stp_array_create_copy (const stp_array_t *array)
| Copy and allocate an array.
void | stp_array_set_size (stp_array_t *array, int x_size, int y_size)
| Resize an array.
void | stp_array_get_size (const stp_array_t *array, int *x_size, int *y_size)
| Get the size of an array.
void | stp_array_set_data (stp_array_t *array, const double *data)
| Set the data in an array.
void | stp_array_get_data (const stp_array_t *array, size_t *size, const double **data)
| Get the data in an array.
int | stp_array_set_point (stp_array_t *array, int x, int y, double data)
| Set the data at a single point in the array.
int | stp_array_get_point (const stp_array_t *array, int x, int y, double *data)
| Get the data at a single point in the array.
const stp_sequence_t * | stp_array_get_sequence (const stp_array_t *array)
| Get the underlying stp_sequence_t.
stp_array_t * | stp_array_create_from_xmltree (stp_mxml_node_t *array)
stp_mxml_node_t * | stp_xmltree_create_from_array (const stp_array_t *array)

## Function Documentation

void array_ctor | ( | stp_array_t * | array | ) | `[static]`

| Definition at line 58 of file array.c. References stp_array::data, stp_array_t, stp_sequence_create(), stp_sequence_set_size(), stp_array::x_size, and stp_array::y_size. Referenced by stp_array_create().

void array_dtor | ( | stp_array_t * | array | ) | `[static]`

| Definition at line 78 of file array.c. References stp_array::data, stp_array_t, and stp_sequence_destroy(). Referenced by stp_array_destroy().

void check_array | ( | const stp_array_t * | array | ) | `[inline, static]`

| Definition at line 48 of file array.c. References stp_abort(), stp_array_t, and stp_erprintf(). Referenced by stp_array_copy(), stp_array_create_copy(), stp_array_destroy(), stp_array_get_data(), stp_array_get_point(), stp_array_get_sequence(), stp_array_get_size(), stp_array_set_data(), stp_array_set_point(), and stp_array_set_size().

stp_array_t* stp_array_create_from_xmltree | ( | stp_mxml_node_t * | array | ) |

| Definition at line 183 of file array.c. References stp_array::data, stp_array_create(), stp_array_destroy(), stp_array_t, stp_erprintf(), STP_MXML_DESCEND, stp_mxml_node_t, stp_mxmlElementGetAttr(), stp_mxmlFindElement(), stp_sequence_create_from_xmltree(), stp_sequence_destroy(), stp_sequence_get_size(), and stp_sequence_t. Referenced by stp_printer_create_from_xmltree(), and stpi_dither_array_create_from_xmltree().

stp_mxml_node_t* stp_xmltree_create_from_array | ( | const stp_array_t * | array | ) |

| Definition at line 245 of file array.c. References stp_array_get_sequence(), stp_array_get_size(), stp_array_t, stp_asprintf(), stp_free(), STP_MXML_ADD_AFTER, stp_mxml_node_t, stp_mxmlAdd(), stp_mxmlDelete(), stp_mxmlElementSetAttr(), stp_mxmlNewElement(), stp_xml_exit(), stp_xml_init(), and stp_xmltree_create_from_sequence().