|
From: Robert L K. <rl...@al...> - 2000-02-02 03:10:49
|
I've just made an important change to print-util.c (and minor changes
to print-escp2.c and print-pcl.c). In place of the mishmash of
constants in print-util, I created a struct (dither_t) that contains
all the constants. It looks like this:
typedef struct dither
{
int error[ERROR_ROWS][NCOLORS][MAX_CARRIAGE_WIDTH*MAX_BPI+1];
int cbits;
int lcbits;
int mbits;
int lmbits;
int ybits;
int lybits;
int kbits;
int k_lower;
int k_upper;
int lc_level;
int lm_level;
int ly_level;
int c_randomizer;
int m_randomizer;
int y_randomizer;
int k_randomizer;
int nc_l;
int nc_log;
int *c_transitions;
int *c_levels;
int nlc_l;
int nlc_log;
int *lc_transitions;
int *lc_levels;
int nm_l;
int nm_log;
int *m_transitions;
int *m_levels;
int nlm_l;
int nlm_log;
int *lm_transitions;
int *lm_levels;
int ny_l;
int ny_log;
int *y_transitions;
int *y_levels;
int nly_l;
int nly_log;
int *ly_transitions;
int *ly_levels;
int nk_l;
int nk_log;
int *k_transitions;
int *k_levels;
} dither_t;
Currently, this is essentially static in nature, but there's no reason
that each printer driver couldn't set it up as appropriate. This is
necessary to allow different printers to share the same dithering
routine.
It printed something out correctly on my printer, so I know it works
perfectly :-) Seriously, this change was pervasive enough so that
something's almost surely not right somewhere, so take a look at it if
you suspect anything. Or, if you're close to having something
working, you might not want to take this update quite yet.
--
Robert Krawitz <rl...@al...> http://www.tiac.net/users/rlk/
Tall Clubs International -- http://www.tall.org/ or 1-888-IM-TALL-2
Member of the League for Programming Freedom -- mail lp...@uu...
Project lead for The Gimp Print -- http://gimp-print.sourceforge.net
"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton
|