43INTERNAL
int zint_out_check_colour_options(
struct zint_symbol *symbol);
46INTERNAL
int zint_out_colour_get_rgb(
const char *colour,
unsigned char *red,
unsigned char *green,
47 unsigned char *blue,
unsigned char *alpha);
49INTERNAL
int zint_out_colour_get_cmyk(
const char *colour,
int *cyan,
int *magenta,
int *yellow,
int *black,
50 unsigned char *rgb_alpha);
53INTERNAL
int zint_out_colour_char_to_rgb(
const unsigned char ch,
unsigned char *red,
unsigned char *green,
57INTERNAL
void zint_out_set_whitespace_offsets(
const struct zint_symbol *symbol,
const int hide_text,
58 const int comp_xoffset,
float *p_xoffset,
float *p_yoffset,
float *p_roffset,
float *p_boffset,
59 float *p_qz_right,
const float scaler,
int *p_xoffset_si,
int *p_yoffset_si,
int *p_roffset_si,
60 int *p_boffset_si,
int *p_qz_right_si);
64INTERNAL
int zint_out_process_upcean(
const struct zint_symbol *symbol,
const int comp_xoffset,
int *p_main_width,
65 unsigned char addon[6],
int *p_addon_len,
int *p_addon_gap);
70INTERNAL
float zint_out_large_bar_height(
struct zint_symbol *symbol,
const int si,
int *row_heights_si,
71 int *symbol_height_si);
74INTERNAL FILE *zint_out_fopen(
const char filename[256],
const char *mode);
78INTERNAL FILE *zint_out_win_fopen(
const char *filename,
const char *mode);
82#define zint_out_le_u16(b, n) do { \
83 unsigned char *bp = (unsigned char *) &(b); \
84 uint16_t u16 = (uint16_t) (n); \
85 bp[0] = (unsigned char) (u16 & 0xFF); \
86 bp[1] = (unsigned char) ((u16 >> 8) & 0xFF); \
89#define zint_out_le_u32(b, n) do { \
90 unsigned char *bp = (unsigned char *) &(b); \
91 uint32_t u32 = (uint32_t) (n); \
92 bp[0] = (unsigned char) (u32 & 0xFF); \
93 bp[1] = (unsigned char) ((u32 >> 8) & 0xFF); \
94 bp[2] = (unsigned char) ((u32 >> 16) & 0xFF); \
95 bp[3] = (unsigned char) ((u32 >> 24) & 0xFF); \
98#define zint_out_le_i32(b, n) do { \
99 unsigned char *bp = (unsigned char *) &(b); \
100 int32_t i32 = (int32_t) (n); \
101 bp[0] = (unsigned char) (i32 & 0xFF); \
102 bp[1] = (unsigned char) ((i32 >> 8) & 0xFF); \
103 bp[2] = (unsigned char) ((i32 >> 16) & 0xFF); \
104 bp[3] = (unsigned char) ((i32 >> 24) & 0xFF); \
107#define zint_out_le_float(b, n) do { \
108 unsigned char *bp = (unsigned char *) &(b); \
109 float f = (float) (n); \
110 uint32_t *p_u32 = (uint32_t *) &f; \
111 bp[0] = (unsigned char) (*p_u32 & 0xFF); \
112 bp[1] = (unsigned char) ((*p_u32 >> 8) & 0xFF); \
113 bp[2] = (unsigned char) ((*p_u32 >> 16) & 0xFF); \
114 bp[3] = (unsigned char) ((*p_u32 >> 24) & 0xFF); \
120# define OUT_PACK __attribute((__packed__))
122# define OUT_USE_PRAGMA_PACK