Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals  

src/main/print-escp2.h

Go to the documentation of this file.
00001 /*
00002  * "$Id: print-escp2.h,v 1.81 2004/05/07 19:20:32 rleigh Exp $"
00003  *
00004  *   Print plug-in EPSON ESC/P2 driver for the GIMP.
00005  *
00006  *   Copyright 1997-2000 Michael Sweet (mike@easysw.com) and
00007  *      Robert Krawitz (rlk@alum.mit.edu)
00008  *
00009  *   This program is free software; you can redistribute it and/or modify it
00010  *   under the terms of the GNU General Public License as published by the Free
00011  *   Software Foundation; either version 2 of the License, or (at your option)
00012  *   any later version.
00013  *
00014  *   This program is distributed in the hope that it will be useful, but
00015  *   WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
00016  *   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00017  *   for more details.
00018  *
00019  *   You should have received a copy of the GNU General Public License
00020  *   along with this program; if not, write to the Free Software
00021  *   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00022  */
00023 
00024 #ifndef GIMP_PRINT_INTERNAL_ESCP2_H
00025 #define GIMP_PRINT_INTERNAL_ESCP2_H
00026 
00027 /*
00028  * Maximum number of channels in a printer.  If Epson comes out with an
00029  * 8-head printer, this needs to be increased.
00030  */
00031 #define PHYSICAL_CHANNEL_LIMIT 8
00032 #define MAX_DROP_SIZES 3
00033 
00034 #define XCOLOR_R     (STP_NCOLORS + 0)
00035 #define XCOLOR_B     (STP_NCOLORS + 1)
00036 #define XCOLOR_GLOSS (STP_NCOLORS + 2)
00037 
00038 /*
00039  * Printer capabilities.
00040  *
00041  * Various classes of printer capabilities are represented by bitmasks.
00042  */
00043 
00044 typedef unsigned long model_cap_t;
00045 typedef unsigned long model_featureset_t;
00046 
00047 
00048 #define RES_LOW          0
00049 #define RES_360          1
00050 #define RES_720_360      2
00051 #define RES_720          3
00052 #define RES_1440_720     4
00053 #define RES_2880_720     5
00054 #define RES_2880_1440    6
00055 #define RES_2880_2880    7
00056 #define RES_N            8
00057 
00058 /*
00059  ****************************************************************
00060  *                                                              *
00061  * DROP SIZES                                                   *
00062  *                                                              *
00063  ****************************************************************
00064  */
00065 
00066 typedef struct
00067 {
00068   const char *listname;
00069   short numdropsizes;
00070   const double dropsizes[MAX_DROP_SIZES];
00071 } escp2_dropsize_t;
00072 
00073 typedef const escp2_dropsize_t *const escp2_drop_list_t[RES_N];
00074 
00075 /*
00076  ****************************************************************
00077  *                                                              *
00078  * PAPERS                                                       *
00079  *                                                              *
00080  ****************************************************************
00081  */
00082 
00083 typedef struct
00084 {
00085   const char *name;
00086   float base_density;
00087   float subchannel_cutoff;
00088   float k_transition;
00089   float k_lower;
00090   float k_upper;
00091   float cyan;
00092   float magenta;
00093   float yellow;
00094   float black;
00095   float saturation;
00096   float gamma;
00097   const char *hue_adjustment;
00098   const char *lum_adjustment;
00099   const char *sat_adjustment;
00100 } paper_adjustment_t;
00101 
00102 typedef struct
00103 {
00104   const char *listname;
00105   short paper_count;
00106   const paper_adjustment_t *papers;
00107 } paper_adjustment_list_t;
00108 
00109 typedef enum
00110 {
00111   PAPER_PLAIN         = 0x01,
00112   PAPER_GOOD          = 0x02,
00113   PAPER_PHOTO         = 0x04,
00114   PAPER_PREMIUM_PHOTO = 0x08,
00115   PAPER_TRANSPARENCY  = 0x10
00116 } paper_class_t;
00117 
00118 typedef struct
00119 {
00120   const char *name;
00121   const char *text;
00122   paper_class_t paper_class;
00123   short paper_feed_sequence;
00124   short platen_gap;
00125   short feed_adjustment;
00126   short vacuum_intensity;
00127   short paper_thickness;
00128   const char *preferred_ink_type;
00129   const char *preferred_ink_set;
00130 } paper_t;
00131 
00132 typedef struct
00133 {
00134   const char *listname;
00135   short paper_count;
00136   const paper_t *papers;
00137 } paperlist_t;
00138 
00139 
00140 /*
00141  ****************************************************************
00142  *                                                              *
00143  * RESOLUTIONS                                                  *
00144  *                                                              *
00145  ****************************************************************
00146  */
00147 
00148 typedef struct
00149 {
00150   const char *name;
00151   const char *text;
00152   short hres;
00153   short vres;
00154   short printed_hres;
00155   short printed_vres;
00156   short softweave;
00157   short printer_weave;
00158   short vertical_passes;
00159 } res_t;
00160 
00161 
00162 /*
00163  ****************************************************************
00164  *                                                              *
00165  * INKS                                                         *
00166  *                                                              *
00167  ****************************************************************
00168  */
00169 
00170 typedef struct
00171 {
00172   short color;
00173   short subchannel;
00174   short head_offset;
00175   const char *channel_density;
00176   const char *subchannel_scale;
00177 } physical_subchannel_t;
00178 
00179 typedef struct
00180 {
00181   const char *listname;
00182   const physical_subchannel_t *subchannels;
00183   short n_subchannels;
00184 } ink_channel_t;
00185 
00186 typedef enum
00187 {
00188   INKSET_CMYK             = 0,
00189   INKSET_CcMmYK           = 1,
00190   INKSET_CcMmYyK          = 2,
00191   INKSET_CcMmYKk          = 3,
00192   INKSET_QUADTONE         = 4,
00193   INKSET_CMYKRB           = 5,
00194   INKSET_EXTENDED         = 6
00195 } inkset_id_t;
00196 
00197 typedef struct
00198 {
00199   const char *name;
00200   const ink_channel_t *const *channels;
00201   short channel_count;
00202 } channel_set_t;
00203 
00204 typedef struct
00205 {
00206   const char *name;
00207   const char *text;
00208   inkset_id_t inkset;
00209   const channel_set_t *channel_set;
00210 } escp2_inkname_t;
00211 
00212 typedef struct
00213 {
00214   int n_shades;
00215   const double shades[PHYSICAL_CHANNEL_LIMIT];
00216 } shade_t;
00217 
00218 typedef shade_t shade_set_t[PHYSICAL_CHANNEL_LIMIT];
00219 
00220 typedef struct
00221 {
00222   const char *name;
00223   const char *text;
00224   const escp2_inkname_t *const *inknames;
00225   const paperlist_t *papers;
00226   const paper_adjustment_list_t *paper_adjustments;
00227   const shade_set_t *shades;
00228   short n_inks;
00229 } inklist_t;
00230 
00231 typedef struct
00232 {
00233   const char *listname;
00234   const inklist_t *const *inklists;
00235   short n_inklists;
00236 } inkgroup_t;
00237     
00238 
00239 /*
00240  ****************************************************************
00241  *                                                              *
00242  * MISCELLANEOUS                                                *
00243  *                                                              *
00244  ****************************************************************
00245  */
00246 
00247 /*
00248  * For each printer, we can select from a variety of dot sizes.
00249  * For single dot size printers, the available sizes are usually 0,
00250  * which is the "default", and some subset of 1-4.  For simple variable
00251  * dot size printers (with only one kind of variable dot size), the
00252  * variable dot size is specified as 0x10.  For newer printers, there
00253  * is a choice of variable dot sizes available, 0x10, 0x11, and 0x12 in
00254  * order of increasing size.
00255  *
00256  * Normally, we want to specify the smallest dot size that lets us achieve
00257  * a density of less than .8 or thereabouts (above that we start to get
00258  * some dither artifacts).  This needs to be tested for each printer and
00259  * resolution.
00260  *
00261  * An entry of -1 in a slot means that this resolution is not available.
00262  */
00263 
00264 typedef short escp2_dot_size_t[RES_N];
00265 
00266 /*
00267  * Choose the number of bits to use at each resolution.
00268  */
00269 
00270 typedef short escp2_bits_t[RES_N];
00271 
00272 /*
00273  * Choose the base resolution to use at each resolution.
00274  */
00275 
00276 typedef short escp2_base_resolutions_t[RES_N];
00277 
00278 /*
00279  * Specify the base density for each available resolution.
00280  * This obviously depends upon the dot size.
00281  */
00282 
00283 typedef float escp2_densities_t[RES_N];
00284 
00285 #define ROLL_FEED_CUT_ALL (1)
00286 #define ROLL_FEED_CUT_LAST (2)
00287 #define ROLL_FEED_DONT_EJECT (4)
00288 
00289 typedef struct
00290 {
00291   const char *name;
00292   const char *text;
00293   short is_cd;
00294   short is_roll_feed;
00295   unsigned roll_feed_cut_flags;
00296   const stp_raw_t init_sequence;
00297   const stp_raw_t deinit_sequence;
00298 } input_slot_t;
00299 
00300 typedef struct
00301 {
00302   const input_slot_t *slots;
00303   size_t n_input_slots;
00304 } input_slot_list_t;
00305 
00306 typedef struct
00307 {
00308   const char *name;
00309   const char *text;
00310   short min_hres;
00311   short min_vres;
00312   short max_hres;
00313   short max_vres;
00314   short desired_hres;
00315   short desired_vres;
00316 } quality_t;
00317 
00318 typedef struct
00319 {
00320   const quality_t *qualities;
00321   size_t n_quals;
00322 } quality_list_t;
00323 
00324 typedef enum
00325 {
00326   AUTO_MODE_QUALITY,
00327   AUTO_MODE_MANUAL
00328 } auto_mode_t;
00329 
00330 typedef struct
00331 {
00332   const char *name;
00333   const char *text;
00334   short value;
00335 } printer_weave_t;
00336 
00337 typedef struct
00338 {
00339   const char *name;
00340   size_t n_printer_weaves;
00341   const printer_weave_t *printer_weaves;
00342 } printer_weave_list_t;
00343 
00344 #define MODEL_COMMAND_MASK      0xful /* What general command set does */
00345 #define MODEL_COMMAND_1998      0x0ul
00346 #define MODEL_COMMAND_1999      0x1ul /* The 1999 series printers */
00347 #define MODEL_COMMAND_2000      0x2ul /* The 2000 series printers */
00348 #define MODEL_COMMAND_PRO       0x3ul /* Stylus Pro printers */
00349 
00350 #define MODEL_XZEROMARGIN_MASK  0x10ul /* Does this printer support */
00351 #define MODEL_XZEROMARGIN_NO    0x00ul /* zero margin mode? */
00352 #define MODEL_XZEROMARGIN_YES   0x10ul /* (print to edge of the paper) */
00353 
00354 #define MODEL_ROLLFEED_MASK     0x20ul /* Does this printer support */
00355 #define MODEL_ROLLFEED_NO       0x00ul /* a roll feed? */
00356 #define MODEL_ROLLFEED_YES      0x20ul
00357 
00358 #define MODEL_VARIABLE_DOT_MASK 0x40ul /* Does this printer support var */
00359 #define MODEL_VARIABLE_NO       0x00ul /* dot size printing? The newest */
00360 #define MODEL_VARIABLE_YES      0x40ul /* printers support multiple modes */
00361 
00362 #define MODEL_GRAYMODE_MASK     0x80ul /* Does this printer support special */
00363 #define MODEL_GRAYMODE_NO       0x00ul /* fast black printing? */
00364 #define MODEL_GRAYMODE_YES      0x80ul
00365 
00366 #define MODEL_VACUUM_MASK       0x100ul
00367 #define MODEL_VACUUM_NO         0x000ul
00368 #define MODEL_VACUUM_YES        0x100ul
00369 
00370 #define MODEL_FAST_360_MASK     0x200ul
00371 #define MODEL_FAST_360_NO       0x000ul
00372 #define MODEL_FAST_360_YES      0x200ul
00373 
00374 #define MODEL_SEND_ZERO_ADVANCE_MASK    0x400ul
00375 #define MODEL_SEND_ZERO_ADVANCE_NO      0x000ul
00376 #define MODEL_SEND_ZERO_ADVANCE_YES     0x400ul
00377 
00378 #define MODEL_SUPPORTS_INK_CHANGE_MASK  0x800ul
00379 #define MODEL_SUPPORTS_INK_CHANGE_NO    0x000ul
00380 #define MODEL_SUPPORTS_INK_CHANGE_YES   0x800ul
00381 
00382 typedef enum
00383 {
00384   MODEL_COMMAND,
00385   MODEL_XZEROMARGIN,
00386   MODEL_ROLLFEED,
00387   MODEL_VARIABLE_DOT,
00388   MODEL_GRAYMODE,
00389   MODEL_VACUUM,
00390   MODEL_FAST_360,
00391   MODEL_SEND_ZERO_ADVANCE,
00392   MODEL_SUPPORTS_INK_CHANGE,
00393   MODEL_LIMIT
00394 } escp2_model_option_t;
00395 
00396 typedef struct escp2_printer
00397 {
00398   model_cap_t   flags;          /* Bitmask of flags, see above */
00399 /*****************************************************************************/
00400   /* Basic head configuration */
00401   short         nozzles;        /* Number of nozzles per color */
00402   short         min_nozzles;    /* Minimum number of nozzles per color */
00403   short         nozzle_separation; /* Separation between rows, in 1/360" */
00404   short         black_nozzles;  /* Number of black nozzles (may be extra) */
00405   short         min_black_nozzles;      /* # of black nozzles (may be extra) */
00406   short         black_nozzle_separation; /* Separation between rows */
00407   short         fast_nozzles;   /* Number of fast nozzles */
00408   short         min_fast_nozzles;       /* # of fast nozzles (may be extra) */
00409   short         fast_nozzle_separation; /* Separation between rows */
00410   short         physical_channels; /* Number of ink channels */
00411 /*****************************************************************************/
00412   /* Print head resolution */
00413   short         base_separation; /* Basic unit of row separation */
00414   short         resolution_scale;   /* Scaling factor for ESC(D command */
00415   short         max_black_resolution; /* Above this resolution, we */
00416                                       /* must use color parameters */
00417                                       /* rather than (faster) black */
00418                                       /* only parameters*/
00419   short         max_hres;
00420   short         max_vres;
00421   short         min_hres;
00422   short         min_vres;
00423   /* Miscellaneous printer-specific data */
00424   short         extra_feed;     /* Extra distance the paper can be spaced */
00425                                 /* beyond the bottom margin, in 1/360". */
00426                                 /* (maximum useful value is */
00427                                 /* nozzles * nozzle_separation) */
00428   short         separation_rows; /* Some printers require funky spacing */
00429                                 /* arguments in softweave mode. */
00430   short         pseudo_separation_rows;/* Some printers require funky */
00431                                 /* spacing arguments in printer_weave mode */
00432 
00433   short         zero_margin_offset;   /* Offset to use to achieve */
00434                                       /* zero-margin printing */
00435   short         initial_vertical_offset;
00436   short         black_initial_vertical_offset;
00437   short         extra_720dpi_separation;
00438 /*****************************************************************************/
00439   /* Paper size limits */
00440   int           max_paper_width; /* Maximum paper width, in points */
00441   int           max_paper_height; /* Maximum paper height, in points */
00442   int           min_paper_width; /* Maximum paper width, in points */
00443   int           min_paper_height; /* Maximum paper height, in points */
00444 /*****************************************************************************/
00445   /* Borders */
00446                                 /* SHEET FED: */
00447                                 /* Softweave: */
00448   short         left_margin;    /* Left margin, points */
00449   short         right_margin;   /* Right margin, points */
00450   short         top_margin;     /* Absolute top margin, points */
00451   short         bottom_margin;  /* Absolute bottom margin, points */
00452                                 /* Printer weave: */
00453   short         m_left_margin;  /* Left margin, points */
00454   short         m_right_margin; /* Right margin, points */
00455   short         m_top_margin;   /* Absolute top margin, points */
00456   short         m_bottom_margin;        /* Absolute bottom margin, points */
00457                                 /* ROLL FEED: */
00458                                 /* Softweave: */
00459   short         roll_left_margin;       /* Left margin, points */
00460   short         roll_right_margin;      /* Right margin, points */
00461   short         roll_top_margin;        /* Absolute top margin, points */
00462   short         roll_bottom_margin;     /* Absolute bottom margin, points */
00463                                 /* Printer weave: */
00464   short         m_roll_left_margin;     /* Left margin, points */
00465   short         m_roll_right_margin;    /* Right margin, points */
00466   short         m_roll_top_margin;      /* Absolute top margin, points */
00467   short         m_roll_bottom_margin;   /* Absolute bottom margin, points */
00468                                 /* Print directly to CD */
00469   short         cd_x_offset;    /* Center of CD (horizontal offset) */
00470   short         cd_y_offset;    /* Center of CD (vertical offset) */
00471   short         cd_page_width;  /* Width of "page" when printing to CD */
00472   short         cd_page_height; /* Height of "page" when printing to CD */
00473 /*****************************************************************************/
00474   /* Parameters for escputil */
00475   short         alignment_passes;
00476   short         alignment_choices;
00477   short         alternate_alignment_passes;
00478   short         alternate_alignment_choices;
00479 /*****************************************************************************/
00480   const short *dot_sizes;       /* Vector of dot sizes for resolutions */
00481   const float *densities;       /* List of densities for each printer */
00482   const escp2_drop_list_t *drops; /* Drop sizes */
00483 /*****************************************************************************/
00484   const res_t *const *reslist;
00485   const inkgroup_t *inkgroup;
00486 /*****************************************************************************/
00487   const short *bits;
00488   const short *base_resolutions;
00489   const input_slot_list_t *input_slots;
00490 /*****************************************************************************/
00491   const quality_list_t *quality_list;
00492   const stp_raw_t *preinit_sequence;
00493   const stp_raw_t *postinit_remote_sequence;
00494 /*****************************************************************************/
00495   const printer_weave_list_t *const printer_weaves;
00496 } stpi_escp2_printer_t;
00497 
00498 extern const stpi_escp2_printer_t stpi_escp2_model_capabilities[];
00499 extern const int stpi_escp2_model_limit;
00500 
00501 extern const escp2_drop_list_t stpi_escp2_simple_drops;
00502 extern const escp2_drop_list_t stpi_escp2_spro10000_drops;
00503 extern const escp2_drop_list_t stpi_escp2_variable_1_5pl_drops;
00504 extern const escp2_drop_list_t stpi_escp2_variable_2pl_drops;
00505 extern const escp2_drop_list_t stpi_escp2_variable_3pl_drops;
00506 extern const escp2_drop_list_t stpi_escp2_variable_3pl_pigment_drops;
00507 extern const escp2_drop_list_t stpi_escp2_variable_3pl_pmg_drops;
00508 extern const escp2_drop_list_t stpi_escp2_variable_4pl_drops;
00509 extern const escp2_drop_list_t stpi_escp2_variable_ultrachrome_drops;
00510 extern const escp2_drop_list_t stpi_escp2_variable_680_4pl_drops;
00511 extern const escp2_drop_list_t stpi_escp2_variable_6pl_drops;
00512 extern const escp2_drop_list_t stpi_escp2_variable_2000p_drops;
00513 extern const escp2_drop_list_t stpi_escp2_variable_x80_6pl_drops;
00514 
00515 extern const paperlist_t stpi_escp2_standard_paper_list;
00516 extern const paperlist_t stpi_escp2_durabrite_paper_list;
00517 extern const paperlist_t stpi_escp2_ultrachrome_paper_list;
00518 
00519 extern const paper_adjustment_list_t stpi_escp2_standard_paper_adjustment_list;
00520 extern const paper_adjustment_list_t stpi_escp2_durabrite_paper_adjustment_list;
00521 extern const paper_adjustment_list_t stpi_escp2_photo_paper_adjustment_list;
00522 extern const paper_adjustment_list_t stpi_escp2_photo2_paper_adjustment_list;
00523 extern const paper_adjustment_list_t stpi_escp2_photo3_paper_adjustment_list;
00524 extern const paper_adjustment_list_t stpi_escp2_sp960_paper_adjustment_list;
00525 extern const paper_adjustment_list_t stpi_escp2_ultrachrome_photo_paper_adjustment_list;
00526 extern const paper_adjustment_list_t stpi_escp2_ultrachrome_matte_paper_adjustment_list;
00527 
00528 extern const res_t *const stpi_escp2_superfine_reslist[];
00529 extern const res_t *const stpi_escp2_no_printer_weave_reslist[];
00530 extern const res_t *const stpi_escp2_pro_reslist[];
00531 extern const res_t *const stpi_escp2_sp5000_reslist[];
00532 extern const res_t *const stpi_escp2_720dpi_reslist[];
00533 extern const res_t *const stpi_escp2_720dpi_soft_reslist[];
00534 extern const res_t *const stpi_escp2_g3_720dpi_reslist[];
00535 extern const res_t *const stpi_escp2_1440dpi_reslist[];
00536 extern const res_t *const stpi_escp2_2880dpi_reslist[];
00537 extern const res_t *const stpi_escp2_2880_1440dpi_reslist[];
00538 extern const res_t *const stpi_escp2_g3_reslist[];
00539 extern const res_t *const stpi_escp2_sc500_reslist[];
00540 extern const res_t *const stpi_escp2_sc640_reslist[];
00541 
00542 extern const inkgroup_t stpi_escp2_cmy_inkgroup;
00543 extern const inkgroup_t stpi_escp2_standard_inkgroup;
00544 extern const inkgroup_t stpi_escp2_c80_inkgroup;
00545 extern const inkgroup_t stpi_escp2_c64_inkgroup;
00546 extern const inkgroup_t stpi_escp2_x80_inkgroup;
00547 extern const inkgroup_t stpi_escp2_photo_gen1_inkgroup;
00548 extern const inkgroup_t stpi_escp2_photo_gen2_inkgroup;
00549 extern const inkgroup_t stpi_escp2_photo_gen3_inkgroup;
00550 extern const inkgroup_t stpi_escp2_photo_pigment_inkgroup;
00551 extern const inkgroup_t stpi_escp2_photo7_japan_inkgroup;
00552 extern const inkgroup_t stpi_escp2_ultrachrome_inkgroup;
00553 extern const inkgroup_t stpi_escp2_f360_photo_inkgroup;
00554 extern const inkgroup_t stpi_escp2_f360_photo7_japan_inkgroup;
00555 extern const inkgroup_t stpi_escp2_f360_ultrachrome_inkgroup;
00556 extern const inkgroup_t stpi_escp2_cmykrb_inkgroup;
00557 
00558 extern const escp2_inkname_t stpi_escp2_default_black_inkset;
00559 
00560 extern const printer_weave_list_t stpi_escp2_standard_printer_weave_list;
00561 extern const printer_weave_list_t stpi_escp2_sp2200_printer_weave_list;
00562 extern const printer_weave_list_t stpi_escp2_pro7000_printer_weave_list;
00563 extern const printer_weave_list_t stpi_escp2_pro7500_printer_weave_list;
00564 extern const printer_weave_list_t stpi_escp2_pro7600_printer_weave_list;
00565 
00566 typedef struct
00567 {
00568   /* Basic print head parameters */
00569   int nozzles;                  /* Number of nozzles */
00570   int min_nozzles;              /* Fewest nozzles we're allowed to use */
00571   int nozzle_separation;        /* Nozzle separation, in dots */
00572   int *head_offset;             /* Head offset (for C80-type printers) */
00573   int max_head_offset;          /* Largest head offset */
00574   int page_management_units;    /* Page management units (dpi) */
00575   int vertical_units;           /* Vertical units (dpi) */
00576   int horizontal_units;         /* Horizontal units (dpi) */
00577   int micro_units;              /* Micro-units for horizontal positioning */
00578   int unit_scale;               /* Scale factor for units */
00579   int send_zero_pass_advance;   /* Send explicit command for zero advance */
00580 
00581   /* Ink parameters */
00582   int bitwidth;                 /* Number of bits per ink drop */
00583   int drop_size;                /* ID of the drop size we're using */
00584   int ink_resid;                /* Array index for the drop set we're using */
00585   const escp2_inkname_t *inkname; /* Description of the ink set */
00586 
00587   /* Ink channels */
00588   int logical_channels;         /* Number of logical ink channels (e.g.CMYK) */
00589   int physical_channels;        /* Number of physical channels (e.g. CcMmYK) */
00590   int channels_in_use;          /* Number of channels we're using
00591                                    FIXME merge with physical_channels! */
00592   unsigned char **cols;         /* Output dithered data */
00593   const physical_subchannel_t **channels; /* Description of each channel */
00594 
00595   /* Miscellaneous printer control */
00596   int use_black_parameters;     /* Can we use (faster) black head parameters */
00597   int use_fast_360;             /* Can we use fast 360 DPI 4 color mode */
00598   int advanced_command_set;     /* Uses one of the advanced command sets */
00599   int use_extended_commands;    /* Do we use the extended commands? */
00600   const input_slot_t *input_slot; /* Input slot description */
00601   const paper_t *paper_type;    /* Paper type */
00602   const paper_adjustment_t *paper_adjustment;   /* Paper adjustments */
00603   const inkgroup_t *ink_group;  /* Which set of inks */
00604   const stp_raw_t *init_sequence; /* Initialization sequence */
00605   const stp_raw_t *deinit_sequence; /* De-initialization sequence */
00606   model_featureset_t command_set; /* Which command set this printer supports */
00607   int variable_dots;            /* Print supports variable dot sizes */
00608   int has_vacuum;               /* Printer supports vacuum command */
00609   int has_graymode;             /* Printer supports fast grayscale mode */
00610   int base_separation;          /* Basic unit of separation */
00611   int resolution_scale;         /* Scale factor for ESC(D command */
00612   int printing_resolution;      /* Printing resolution for this resolution */
00613   int separation_rows;          /* Row separation scaling */
00614   int pseudo_separation_rows;   /* Special row separation for some printers */
00615   int extra_720dpi_separation;  /* Special separation needed at 720 DPI */
00616 
00617   /* weave parameters */
00618   int horizontal_passes;        /* Number of horizontal passes required
00619                                    to print a complete row */
00620   int physical_xdpi;            /* Horizontal distance between dots in pass */
00621   const res_t *res;             /* Description of the printing resolution */
00622   const printer_weave_t *printer_weave; /* Printer weave parameters */
00623   int use_printer_weave;        /* Use the printer weaving mechanism */
00624 
00625   /* page parameters */         /* Indexed from top left */
00626   int page_left;                /* Left edge of page (points) */
00627   int page_right;               /* Right edge of page (points) */
00628   int page_top;                 /* Top edge of page (points) */
00629   int page_bottom;              /* Bottom edge of page (points) */
00630   int page_width;               /* Page width (points) */
00631   int page_height;              /* Page height (points) */
00632   int page_true_height;         /* Physical page height (points) */
00633   int cd_x_offset;              /* CD X offset (micro units) */
00634   int cd_y_offset;              /* CD Y offset (micro units) */
00635   int cd_outer_radius;          /* CD radius (micro units) */
00636   int cd_inner_radius;          /* CD radius (micro units) */
00637 
00638   /* Image parameters */        /* Indexed from top left */
00639   int image_height;             /* Height of printed region (points) */
00640   int image_width;              /* Width of printed region (points) */
00641   int image_top;                /* First printed row (points) */
00642   int image_left;               /* Left edge of image (points) */
00643   int image_scaled_width;       /* Width of physical printed region (dots) */
00644   int image_printed_width;      /* Width of printed region (dots) */
00645   int image_scaled_height;      /* Height of physical printed region (dots) */
00646   int image_printed_height;     /* Height of printed region (dots) */
00647   int image_left_position;      /* Left dot position of image */
00648 
00649   /* Transitory state */
00650   int printed_something;        /* Have we actually printed anything? */
00651   int initial_vertical_offset;  /* Vertical offset for C80-type printers */
00652   int printing_initial_vertical_offset; /* Vertical offset, for print cmd */
00653   int last_color;               /* Last color we printed */
00654   int last_pass_offset;         /* Starting row of last pass we printed */
00655   int last_pass;                /* Last pass printed */
00656 
00657 } escp2_privdata_t;
00658 
00659 extern void stpi_escp2_init_printer(stp_vars_t *v);
00660 extern void stpi_escp2_deinit_printer(stp_vars_t *v);
00661 extern void stpi_escp2_flush_pass(stp_vars_t *v, int passno,
00662                                   int vertical_subpass);
00663 extern void stpi_escp2_terminate_page(stp_vars_t *v);
00664 
00665 #ifdef TEST_UNCOMPRESSED
00666 #define COMPRESSION (0)
00667 #define FILLFUNC stp_fill_uncompressed
00668 #define COMPUTEFUNC stp_compute_uncompressed_linewidth
00669 #define PACKFUNC stp_pack_uncompressed
00670 #else
00671 #define COMPRESSION (1)
00672 #define FILLFUNC stp_fill_tiff
00673 #define COMPUTEFUNC stp_compute_tiff_linewidth
00674 #define PACKFUNC stp_pack_tiff
00675 #endif
00676 
00677 #endif /* GIMP_PRINT_INTERNAL_ESCP2_H */
00678 /*
00679  * End of "$Id: print-escp2.h,v 1.81 2004/05/07 19:20:32 rleigh Exp $".
00680  */

Generated on Wed May 12 20:21:32 2004 for libgimpprint API Reference by doxygen1.2.17