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

array.c File Reference

#include <gutenprint/gutenprint.h>
#include "gutenprint-internal.h"
#include <gutenprint/gutenprint-intl-internal.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <limits.h>

Go to the source code of this file.

Functions

static void check_array (const stp_array_t *array)
static void array_ctor (stp_array_t *array)
stp_array_tstp_array_create (int x_size, int y_size)
 Create a new array.
static 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_tstp_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_tstp_array_get_sequence (const stp_array_t *array)
 Get the underlying stp_sequence_t.
stp_array_tstp_array_create_from_xmltree (stp_mxml_node_t *array)
stp_mxml_node_tstp_xmltree_create_from_array (const stp_array_t *array)


Function Documentation

static void array_ctor stp_array_t array  )  [static]
 

Definition at line 58 of file array.c.

References stp_sequence_create(), and stp_sequence_set_size().

Referenced by stp_array_create().

static void array_dtor stp_array_t array  )  [static]
 

Definition at line 78 of file array.c.

References stp_sequence_destroy().

Referenced by stp_array_destroy().

static void check_array const stp_array_t array  )  [inline, static]
 

Definition at line 48 of file array.c.

References stp_abort(), 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_erprintf(), STP_MXML_DESCEND, stp_mxmlElementGetAttr(), stp_mxmlFindElement(), stp_sequence_create_from_xmltree(), stp_sequence_destroy(), and stp_sequence_get_size().

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_asprintf(), stp_free(), STP_MXML_ADD_AFTER, stp_mxmlAdd(), stp_mxmlDelete(), stp_mxmlElementSetAttr(), stp_mxmlNewElement(), stp_xml_exit(), stp_xml_init(), and stp_xmltree_create_from_sequence().


Generated on Thu Feb 10 19:29:31 2005 for libgutenprint API Reference by  doxygen 1.4.1