dither.h File Reference

Dither functions. More...

## Data Structures

struct | stp_dither_matrix_short
struct | stp_dither_matrix_normal
struct | stp_dither_matrix_generic
struct | dither_matrix_impl
struct | stp_dotsize
struct | stp_shade

## Macros

#define | STP_ECOLOR_K 0
#define | STP_ECOLOR_C 1
#define | STP_ECOLOR_M 2
#define | STP_ECOLOR_Y 3
#define | STP_NCOLORS (4)

## Typedefs

typedef struct stp_dither_matrix_short | stp_dither_matrix_short_t
typedef struct stp_dither_matrix_normal | stp_dither_matrix_normal_t
typedef struct stp_dither_matrix_generic | stp_dither_matrix_generic_t
typedef struct dither_matrix_impl | stp_dither_matrix_impl_t
typedef struct stp_dotsize | stp_dotsize_t
typedef struct stp_shade | stp_shade_t

## Functions

void | stp_dither_matrix_iterated_init (stp_dither_matrix_impl_t *mat, size_t size, size_t exponent, const unsigned *array)
void | stp_dither_matrix_shear (stp_dither_matrix_impl_t *mat, int x_shear, int y_shear)
void | stp_dither_matrix_init (stp_dither_matrix_impl_t *mat, int x_size, int y_size, const unsigned int *array, int transpose, int prescaled)
void | stp_dither_matrix_init_short (stp_dither_matrix_impl_t *mat, int x_size, int y_size, const unsigned short *array, int transpose, int prescaled)
int | stp_dither_matrix_validate_array (const stp_array_t *array)
void | stp_dither_matrix_init_from_dither_array (stp_dither_matrix_impl_t *mat, const stp_array_t *array, int transpose)
void | stp_dither_matrix_destroy (stp_dither_matrix_impl_t *mat)
void | stp_dither_matrix_clone (const stp_dither_matrix_impl_t *src, stp_dither_matrix_impl_t *dest, int x_offset, int y_offset)
void | stp_dither_matrix_copy (const stp_dither_matrix_impl_t *src, stp_dither_matrix_impl_t *dest)
void | stp_dither_matrix_scale_exponentially (stp_dither_matrix_impl_t *mat, double exponent)
void | stp_dither_matrix_set_row (stp_dither_matrix_impl_t *mat, int y)
stp_array_t * | stp_find_standard_dither_array (int x_aspect, int y_aspect)
stp_parameter_list_t | stp_dither_list_parameters (const stp_vars_t *v)
void | stp_dither_describe_parameter (const stp_vars_t *v, const char *name, stp_parameter_t *description)
void | stp_dither_init (stp_vars_t *v, stp_image_t *image, int out_width, int xdpi, int ydpi)
void | stp_dither_set_iterated_matrix (stp_vars_t *v, size_t edge, size_t iterations, const unsigned *data, int prescaled, int x_shear, int y_shear)
void | stp_dither_set_matrix (stp_vars_t *v, const stp_dither_matrix_generic_t *mat, int transpose, int x_shear, int y_shear)
void | stp_dither_set_matrix_from_dither_array (stp_vars_t *v, const stp_array_t *array, int transpose)
void | stp_dither_set_transition (stp_vars_t *v, double)
void | stp_dither_set_randomizer (stp_vars_t *v, int color, double)
void | stp_dither_set_ink_spread (stp_vars_t *v, int spread)
void | stp_dither_set_adaptive_limit (stp_vars_t *v, double limit)
int | stp_dither_get_first_position (stp_vars_t *v, int color, int subchan)
int | stp_dither_get_last_position (stp_vars_t *v, int color, int subchan)
void | stp_dither_set_inks_simple (stp_vars_t *v, int color, int nlevels, const double *levels, double density, double darkness)
void | stp_dither_set_inks_full (stp_vars_t *v, int color, int nshades, const stp_shade_t *shades, double density, double darkness)
void | stp_dither_set_inks (stp_vars_t *v, int color, double density, double darkness, int nshades, const double *svalues, int ndotsizes, const double *dvalues)
void | stp_dither_add_channel (stp_vars_t *v, unsigned char *data, unsigned channel, unsigned subchannel)
unsigned char * | stp_dither_get_channel (stp_vars_t *v, unsigned channel, unsigned subchannel)
void | stp_dither (stp_vars_t *v, int row, int duplicate_line, int zero_mask, const unsigned char *mask)
void | stp_dither_internal (stp_vars_t *v, int row, const unsigned short *input, int duplicate_line, int zero_mask, const unsigned char *mask)

## Detailed Description

Dither functions.

## Macro Definition Documentation

## STP_ECOLOR_C

#define STP_ECOLOR_C 1

## STP_ECOLOR_K

#define STP_ECOLOR_K 0

## STP_ECOLOR_M

#define STP_ECOLOR_M 2

## STP_ECOLOR_Y

#define STP_ECOLOR_Y 3

## STP_NCOLORS

#define STP_NCOLORS (4)

## Typedef Documentation

## stp_dither_matrix_generic_t

typedef struct stp_dither_matrix_generic stp_dither_matrix_generic_t

## stp_dither_matrix_impl_t

typedef struct dither_matrix_impl stp_dither_matrix_impl_t

## stp_dither_matrix_normal_t

typedef struct stp_dither_matrix_normal stp_dither_matrix_normal_t

## stp_dither_matrix_short_t

typedef struct stp_dither_matrix_short stp_dither_matrix_short_t

## stp_dotsize_t

typedef struct stp_dotsize stp_dotsize_t

## stp_shade_t

typedef struct stp_shade stp_shade_t

## Function Documentation

## stp_dither()

void stp_dither | ( | stp_vars_t * | v,
|  | int | row,
|  | int | duplicate_line,
|  | int | zero_mask,
|  | const unsigned char * | mask )

extern

## stp_dither_add_channel()

void stp_dither_add_channel | ( | stp_vars_t * | v,
|  | unsigned char * | data,
|  | unsigned | channel,
|  | unsigned | subchannel )

extern

## stp_dither_describe_parameter()

void stp_dither_describe_parameter | ( | const stp_vars_t * | v,
|  | const char * | name,
|  | stp_parameter_t * | description )

extern

## stp_dither_get_channel()

unsigned char * stp_dither_get_channel | ( | stp_vars_t * | v,
|  | unsigned | channel,
|  | unsigned | subchannel )

extern

## stp_dither_get_first_position()

int stp_dither_get_first_position | ( | stp_vars_t * | v,
|  | int | color,
|  | int | subchan )

extern

## stp_dither_get_last_position()

int stp_dither_get_last_position | ( | stp_vars_t * | v,
|  | int | color,
|  | int | subchan )

extern

## stp_dither_init()

void stp_dither_init | ( | stp_vars_t * | v,
|  | stp_image_t * | image,
|  | int | out_width,
|  | int | xdpi,
|  | int | ydpi )

extern

## stp_dither_internal()

void stp_dither_internal | ( | stp_vars_t * | v,
|  | int | row,
|  | const unsigned short * | input,
|  | int | duplicate_line,
|  | int | zero_mask,
|  | const unsigned char * | mask )

extern

## stp_dither_list_parameters()

stp_parameter_list_t stp_dither_list_parameters | ( | const stp_vars_t * | v | ) |

extern

## stp_dither_matrix_clone()

void stp_dither_matrix_clone | ( | const stp_dither_matrix_impl_t * | src,
|  | stp_dither_matrix_impl_t * | dest,
|  | int | x_offset,
|  | int | y_offset )

extern

## stp_dither_matrix_copy()

void stp_dither_matrix_copy | ( | const stp_dither_matrix_impl_t * | src,
|  | stp_dither_matrix_impl_t * | dest )

extern

## stp_dither_matrix_destroy()

void stp_dither_matrix_destroy | ( | stp_dither_matrix_impl_t * | mat | ) |

extern

## stp_dither_matrix_init()

void stp_dither_matrix_init | ( | stp_dither_matrix_impl_t * | mat,
|  | int | x_size,
|  | int | y_size,
|  | const unsigned int * | array,
|  | int | transpose,
|  | int | prescaled )

extern

## stp_dither_matrix_init_from_dither_array()

void stp_dither_matrix_init_from_dither_array | ( | stp_dither_matrix_impl_t * | mat,
|  | const stp_array_t * | array,
|  | int | transpose )

extern

## stp_dither_matrix_init_short()

void stp_dither_matrix_init_short | ( | stp_dither_matrix_impl_t * | mat,
|  | int | x_size,
|  | int | y_size,
|  | const unsigned short * | array,
|  | int | transpose,
|  | int | prescaled )

extern

## stp_dither_matrix_iterated_init()

void stp_dither_matrix_iterated_init | ( | stp_dither_matrix_impl_t * | mat,
|  | size_t | size,
|  | size_t | exponent,
|  | const unsigned * | array )

extern

## stp_dither_matrix_scale_exponentially()

void stp_dither_matrix_scale_exponentially | ( | stp_dither_matrix_impl_t * | mat,
|  | double | exponent )

extern

## stp_dither_matrix_set_row()

void stp_dither_matrix_set_row | ( | stp_dither_matrix_impl_t * | mat,
|  | int | y )

extern

## stp_dither_matrix_shear()

void stp_dither_matrix_shear | ( | stp_dither_matrix_impl_t * | mat,
|  | int | x_shear,
|  | int | y_shear )

extern

## stp_dither_matrix_validate_array()

int stp_dither_matrix_validate_array | ( | const stp_array_t * | array | ) |

extern

## stp_dither_set_adaptive_limit()

void stp_dither_set_adaptive_limit | ( | stp_vars_t * | v,
|  | double | limit )

extern

## stp_dither_set_ink_spread()

void stp_dither_set_ink_spread | ( | stp_vars_t * | v,
|  | int | spread )

extern

## stp_dither_set_inks()

void stp_dither_set_inks | ( | stp_vars_t * | v,
|  | int | color,
|  | double | density,
|  | double | darkness,
|  | int | nshades,
|  | const double * | svalues,
|  | int | ndotsizes,
|  | const double * | dvalues )

extern

## stp_dither_set_inks_full()

void stp_dither_set_inks_full | ( | stp_vars_t * | v,
|  | int | color,
|  | int | nshades,
|  | const stp_shade_t * | shades,
|  | double | density,
|  | double | darkness )

extern

## stp_dither_set_inks_simple()

void stp_dither_set_inks_simple | ( | stp_vars_t * | v,
|  | int | color,
|  | int | nlevels,
|  | const double * | levels,
|  | double | density,
|  | double | darkness )

extern

## stp_dither_set_iterated_matrix()

void stp_dither_set_iterated_matrix | ( | stp_vars_t * | v,
|  | size_t | edge,
|  | size_t | iterations,
|  | const unsigned * | data,
|  | int | prescaled,
|  | int | x_shear,
|  | int | y_shear )

extern

## stp_dither_set_matrix()

void stp_dither_set_matrix | ( | stp_vars_t * | v,
|  | const stp_dither_matrix_generic_t * | mat,
|  | int | transpose,
|  | int | x_shear,
|  | int | y_shear )

extern

## stp_dither_set_matrix_from_dither_array()

void stp_dither_set_matrix_from_dither_array | ( | stp_vars_t * | v,
|  | const stp_array_t * | array,
|  | int | transpose )

extern

## stp_dither_set_randomizer()

void stp_dither_set_randomizer | ( | stp_vars_t * | v,
|  | int | color,
|  | double | )

extern

## stp_dither_set_transition()

void stp_dither_set_transition | ( | stp_vars_t * | v,
|  | double | )

extern

## stp_find_standard_dither_array()

stp_array_t * stp_find_standard_dither_array | ( | int | x_aspect,
|  | int | y_aspect )

extern