libgimpprint API Reference: dither-inks.c File Reference

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

# src/main/dither-inks.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 <assert.h>`
`#include <string.h>`
`#include "dither-impl.h"`

Go to the source code of this file.

## Functions
int | stpi_dither_translate_channel (stp_vars_t *v, unsigned channel, unsigned subchannel)
unsigned char * | stp_dither_get_channel (stp_vars_t *v, unsigned channel, unsigned subchannel)
void | insert_channel (stp_vars_t *v, stpi_dither_t *d, int channel)
void | stpi_dither_channel_destroy (stpi_dither_channel_t *channel)
void | initialize_channel (stp_vars_t *v, int channel, int subchannel)
void | insert_subchannel (stp_vars_t *v, stpi_dither_t *d, int channel, int subchannel)
void | stpi_dither_finalize (stp_vars_t *v)
void | stp_dither_add_channel (stp_vars_t *v, unsigned char *data, unsigned channel, unsigned subchannel)
void | stpi_dither_finalize_ranges (stp_vars_t *v, stpi_dither_channel_t *dc)
void | stpi_dither_set_ranges (stp_vars_t *v, int color, const stp_shade_t *shade, 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_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)

## Function Documentation

void initialize_channel | ( | stp_vars_t * | v,
|  | int | channel,
|  | int | subchannel
| ) | `[static]`

| Definition at line 107 of file dither-inks.c. References assert, stp_dotsize::bit_pattern, CHANNEL, dither::dither_matrix, dither_channel::dithermat, stp_shade::dot_sizes, stp_shade::numsizes, dither_channel::pick, stp_dither_matrix_clone(), stp_dither_set_inks_full(), stp_dotsize_t, stp_get_component_data(), stp_shade_t, stp_vars_t, stpi_dither_channel_t, stpi_dither_t, stpi_dither_translate_channel(), dither::transition_matrix, stp_dotsize::value, and stp_shade::value. Referenced by insert_subchannel().

void insert_channel | ( | stp_vars_t * | v,
|  | stpi_dither_t * | d,
|  | int | channel
| ) | `[static]`

| Definition at line 70 of file dither-inks.c. References dither::channel_count, dither::channel_index, stp_realloc(), stp_vars_t, stpi_dither_t, and dither::subchannel_count. Referenced by stp_dither_add_channel().

void insert_subchannel | ( | stp_vars_t * | v,
|  | stpi_dither_t * | d,
|  | int | channel,
|  | int | subchannel
| ) | `[static]`

| Definition at line 127 of file dither-inks.c. References dither::channel, dither::channel_count, dither::channel_index, initialize_channel(), stp_free(), stp_malloc(), stp_vars_t, stpi_dither_channel_t, stpi_dither_t, dither::subchannel_count, and dither::total_channel_count. Referenced by stp_dither_add_channel().

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

| Definition at line 188 of file dither-inks.c. References assert, dither::channel, dither::channel_count, insert_channel(), insert_subchannel(), dither_channel::ptr, stp_get_component_data(), stp_vars_t, stpi_dither_t, stpi_dither_translate_channel(), and dither::subchannel_count. Referenced by allocate_channels().

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

| Definition at line 59 of file dither-inks.c. References dither::channel, dither_channel::ptr, stp_get_component_data(), stp_vars_t, stpi_dither_t, and stpi_dither_translate_channel(). Referenced by pcl_describe_output().

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

| Definition at line 396 of file dither-inks.c. References stp_dotsize::bit_pattern, stp_shade::dot_sizes, stp_shade::numsizes, stp_dither_set_inks_full(), stp_dotsize_t, stp_free(), stp_malloc(), stp_shade_t, stp_vars_t, stp_shade::value, and stp_dotsize::value. Referenced by setup_inks().

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

| Definition at line 366 of file dither-inks.c. References assert, CHANNEL, stp_channel_add(), stp_channel_reset_channel(), STP_DBG_INK, stp_dprintf(), stp_get_component_data(), stp_shade_t, stp_vars_t, stpi_dither_channel_t, stpi_dither_set_ranges(), stpi_dither_t, and stpi_dither_translate_channel(). Referenced by initialize_channel(), stp_dither_set_inks(), and 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
| ) |

| Definition at line 345 of file dither-inks.c. References stp_dotsize::bit_pattern, stp_shade::dot_sizes, stp_shade::numsizes, stp_dither_set_inks_full(), stp_dotsize_t, stp_free(), stp_malloc(), stp_shade_t, stp_vars_t, stp_dotsize::value, and stp_shade::value.

void stpi_dither_channel_destroy | ( | stpi_dither_channel_t * | channel | ) |

| Definition at line 91 of file dither-inks.c. References dither_channel::dithermat, dither_channel::error_rows, dither_channel::errs, dither_channel::ink_list, dither_channel::pick, dither_channel::ranges, stp_dither_matrix_destroy(), STP_SAFE_FREE, and stpi_dither_channel_t. Referenced by free_eventone_data(), and stpi_dither_free().

void stpi_dither_finalize | ( | stp_vars_t * | v | ) |

| Definition at line 166 of file dither-inks.c. References CHANNEL, CHANNEL_COUNT, dither::dither_matrix, dither_channel::dithermat, dither::finalized, dither_channel::pick, stp_dither_matrix_clone(), stp_get_component_data(), stp_vars_t, stpi_dither_channel_t, stpi_dither_t, dither_matrix_impl::x_size, and dither_matrix_impl::y_size. Referenced by stp_dither_internal().

void stpi_dither_finalize_ranges | ( | stp_vars_t * | v,
|  | stpi_dither_channel_t * | dc
| ) | `[static]`

| Definition at line 203 of file dither-inks.c. References dither::adaptive_limit, dither_channel::bit_max, ink_defn::bits, dither_channel::ink_list, dither_segment::is_equal, dither_segment::is_same_ink, dither_segment::lower, dither_channel::nlevels, ink_defn::range, dither_segment::range_span, dither_channel::ranges, dither_channel::signif_bits, STP_DBG_INK, stp_dprintf(), stp_get_component_data(), stp_vars_t, stpi_dither_channel_t, stpi_dither_t, dither_segment::upper, ink_defn::value, dither_segment::value_span, and dither_channel::very_fast. Referenced by stpi_dither_set_ranges().

void stpi_dither_set_ranges | ( | stp_vars_t * | v,
|  | int | color,
|  | const stp_shade_t * | shade,
|  | double | density,
|  | double | darkness
| ) | `[static]`

| Definition at line 261 of file dither-inks.c. References dither_channel::bit_max, stp_dotsize::bit_pattern, ink_defn::bits, CHANNEL, dither_channel::darkness, dither_channel::density, stp_shade::dot_sizes, dither_channel::ink_list, dither_segment::lower, dither_channel::nlevels, stp_shade::numsizes, ink_defn::range, dither_segment::range_span, dither_channel::ranges, STP_DBG_INK, stp_dotsize_t, stp_dprintf(), stp_flush_debug_messages(), stp_get_component_data(), stp_init_debug_messages(), STP_SAFE_FREE, stp_shade_t, stp_vars_t, stp_zalloc(), stpi_dither_channel_t, stpi_dither_finalize_ranges(), stpi_dither_segment_t, stpi_dither_t, stpi_ink_defn_t, dither_segment::upper, stp_dotsize::value, ink_defn::value, and dither_segment::value_span. Referenced by stp_dither_set_inks_full().

int stpi_dither_translate_channel | ( | stp_vars_t * | v,
|  | unsigned | channel,
|  | unsigned | subchannel
| ) |

| Definition at line 43 of file dither-inks.c. References dither::channel_count, dither::channel_index, stp_get_component_data(), stp_vars_t, stpi_dither_t, and dither::subchannel_count. Referenced by initialize_channel(), stp_dither_add_channel(), stp_dither_get_channel(), stp_dither_get_first_position(), stp_dither_get_last_position(), and stp_dither_set_inks_full().