00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef GIMP_PRINT_WEAVE_H
00034 #define GIMP_PRINT_WEAVE_H
00035
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039
00040 #ifdef HAVE_CONFIG_H
00041 #include <config.h>
00042 #endif
00043
00044 #define STP_MAX_WEAVE (8)
00045
00046
00047 typedef struct
00048 {
00049 int row;
00050 int pass;
00051 int jet;
00052 int missingstartrows;
00053
00054
00055
00056 int logicalpassstart;
00057
00058
00059 int physpassstart;
00060
00061
00062 int physpassend;
00063
00064
00065
00066 } stp_weave_t;
00067
00068 typedef struct
00069 {
00070 int pass;
00071 int missingstartrows;
00072 int logicalpassstart;
00073 int physpassstart;
00074 int physpassend;
00075 int subpass;
00076 } stp_pass_t;
00077
00078 typedef struct {
00079 int ncolors;
00080 unsigned long *v;
00081 } stp_lineoff_t;
00082
00083 typedef struct {
00084 int ncolors;
00085 char *v;
00086 } stp_lineactive_t;
00087
00088 typedef struct {
00089 int ncolors;
00090 int *v;
00091 } stp_linecount_t;
00092
00093 typedef struct {
00094 int ncolors;
00095 unsigned char **v;
00096 } stp_linebufs_t;
00097
00098 typedef struct {
00099 int ncolors;
00100 int *start_pos;
00101 int *end_pos;
00102 } stp_linebounds_t;
00103
00104 typedef enum {
00105 STP_WEAVE_ZIGZAG,
00106 STP_WEAVE_ASCENDING,
00107 STP_WEAVE_DESCENDING,
00108 STP_WEAVE_ASCENDING_2X,
00109 STP_WEAVE_STAGGERED,
00110 STP_WEAVE_ASCENDING_3X
00111 } stp_weave_strategy_t;
00112
00113 typedef int stp_packfunc(stp_vars_t *v,
00114 const unsigned char *line, int height,
00115 unsigned char *comp_buf,
00116 unsigned char **comp_ptr,
00117 int *first, int *last);
00118 typedef void stp_fillfunc(stp_vars_t *v, int row, int subpass,
00119 int width, int missingstartrows, int color);
00120 typedef void stp_flushfunc(stp_vars_t *v, int passno, int vertical_subpass);
00121 typedef int stp_compute_linewidth_func(stp_vars_t *v, int n);
00122
00123 extern void stp_initialize_weave(stp_vars_t *v, int jets, int separation,
00124 int oversample, int horizontal,
00125 int vertical, int ncolors, int bitwidth,
00126 int linewidth, int line_count,
00127 int first_line, int page_height,
00128 const int *head_offset,
00129 stp_weave_strategy_t,
00130 stp_flushfunc,
00131 stp_fillfunc,
00132 stp_packfunc,
00133 stp_compute_linewidth_func);
00134
00135 extern stp_packfunc stp_pack_tiff;
00136 extern stp_packfunc stp_pack_uncompressed;
00137
00138 extern stp_fillfunc stp_fill_tiff;
00139 extern stp_fillfunc stp_fill_uncompressed;
00140
00141 extern stp_compute_linewidth_func stp_compute_tiff_linewidth;
00142 extern stp_compute_linewidth_func stp_compute_uncompressed_linewidth;
00143
00144 extern void stp_flush_all(stp_vars_t *v);
00145
00146 extern void
00147 stp_write_weave(stp_vars_t *v, unsigned char *const cols[]);
00148
00149 extern stp_lineoff_t *
00150 stp_get_lineoffsets_by_pass(const stp_vars_t *v, int pass);
00151
00152 extern stp_lineactive_t *
00153 stp_get_lineactive_by_pass(const stp_vars_t *v, int pass);
00154
00155 extern stp_linecount_t *
00156 stp_get_linecount_by_pass(const stp_vars_t *v, int pass);
00157
00158 extern const stp_linebufs_t *
00159 stp_get_linebases_by_pass(const stp_vars_t *v, int pass);
00160
00161 extern stp_pass_t *
00162 stp_get_pass_by_pass(const stp_vars_t *v, int pass);
00163
00164 extern void
00165 stp_weave_parameters_by_row(const stp_vars_t *v, int row,
00166 int vertical_subpass, stp_weave_t *w);
00167
00168 #ifdef __cplusplus
00169 }
00170 #endif
00171
00172 #endif
00173
00174
00175