libgutenprint API Reference: include/gutenprint/dither.h File Reference

libgutenprint API Reference 5.2.9

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

Data Structures | Macros | Typedefs | Functions
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

#define STP_ECOLOR_C 1

#define STP_ECOLOR_K 0

#define STP_ECOLOR_M 2

#define STP_ECOLOR_Y 3

#define STP_NCOLORS (4)

## Typedef Documentation

typedef struct stp_dither_matrix_generic stp_dither_matrix_generic_t

typedef struct dither_matrix_impl stp_dither_matrix_impl_t

typedef struct stp_dither_matrix_normal stp_dither_matrix_normal_t

typedef struct stp_dither_matrix_short stp_dither_matrix_short_t

typedef struct stp_dotsize stp_dotsize_t

typedef struct stp_shade stp_shade_t

## Function Documentation

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

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

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

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

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_init | ( | stp_vars_t * | v,
|  | stp_image_t * | image,
|  | int | out_width,
|  | int | xdpi,
|  | int | ydpi
| ) |  |

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

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

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_destroy | ( | stp_dither_matrix_impl_t * | mat | ) |

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_from_dither_array | ( | stp_dither_matrix_impl_t * | mat,
|  | const stp_array_t * | array,
|  | int | transpose
| ) |  |

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
| ) |  |

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_scale_exponentially | ( | stp_dither_matrix_impl_t * | mat,
|  | double | exponent
| ) |  |

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

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

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

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

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

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_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_simple | ( | stp_vars_t * | v,
|  | int | color,
|  | int | nlevels,
|  | const double * | levels,
|  | double | density,
|  | double | darkness
| ) |  |

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_randomizer | ( | stp_vars_t * | v,
|  | int | color,
|  | double |
| ) |  |

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

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