libgimpprint API Reference: src/main/print-escp2.h Source File

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

# src/main/print-escp2.h

Go to the documentation of this file.

    00001 /*
    00002  * "$Id: print-escp2_8h-source.html,v 1.1.1.2 2004/12/22 23:49:07 jlovell 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 #define MODEL_PACKET_MODE_MASK  0x1000ul
    00383 #define MODEL_PACKET_MODE_NO    0x0000ul
    00384 #define MODEL_PACKET_MODE_YES   0x1000ul
    00385
    00386 #define MODEL_PRINT_TO_CD_MASK  0x2000ul
    00387 #define MODEL_PRINT_TO_CD_NO    0x0000ul
    00388 #define MODEL_PRINT_TO_CD_YES   0x2000ul
    00389
    00390 typedef enum
    00391 {
    00392   MODEL_COMMAND,
    00393   MODEL_XZEROMARGIN,
    00394   MODEL_ROLLFEED,
    00395   MODEL_VARIABLE_DOT,
    00396   MODEL_GRAYMODE,
    00397   MODEL_VACUUM,
    00398   MODEL_FAST_360,
    00399   MODEL_SEND_ZERO_ADVANCE,
    00400   MODEL_SUPPORTS_INK_CHANGE,
    00401   MODEL_PACKET_MODE,
    00402   MODEL_PRINT_TO_CD,
    00403   MODEL_LIMIT
    00404 } escp2_model_option_t;
    00405
    00406 typedef struct escp2_printer
    00407 {
    00408   model_cap_t   flags;          /* Bitmask of flags, see above */
    00409 /*****************************************************************************/
    00410   /* Basic head configuration */
    00411   short         nozzles;        /* Number of nozzles per color */
    00412   short         min_nozzles;    /* Minimum number of nozzles per color */
    00413   short         nozzle_separation; /* Separation between rows, in 1/360" */
    00414   short         black_nozzles;  /* Number of black nozzles (may be extra) */
    00415   short         min_black_nozzles;      /* # of black nozzles (may be extra) */
    00416   short         black_nozzle_separation; /* Separation between rows */
    00417   short         fast_nozzles;   /* Number of fast nozzles */
    00418   short         min_fast_nozzles;       /* # of fast nozzles (may be extra) */
    00419   short         fast_nozzle_separation; /* Separation between rows */
    00420   short         physical_channels; /* Number of ink channels */
    00421 /*****************************************************************************/
    00422   /* Print head resolution */
    00423   short         base_separation; /* Basic unit of row separation */
    00424   short         resolution_scale;   /* Scaling factor for ESC(D command */
    00425   short         max_black_resolution; /* Above this resolution, we */
    00426                                       /* must use color parameters */
    00427                                       /* rather than (faster) black */
    00428                                       /* only parameters*/
    00429   short         max_hres;
    00430   short         max_vres;
    00431   short         min_hres;
    00432   short         min_vres;
    00433   /* Miscellaneous printer-specific data */
    00434   short         extra_feed;     /* Extra distance the paper can be spaced */
    00435                                 /* beyond the bottom margin, in 1/360". */
    00436                                 /* (maximum useful value is */
    00437                                 /* nozzles * nozzle_separation) */
    00438   short         separation_rows; /* Some printers require funky spacing */
    00439                                 /* arguments in softweave mode. */
    00440   short         pseudo_separation_rows;/* Some printers require funky */
    00441                                 /* spacing arguments in printer_weave mode */
    00442
    00443   short         zero_margin_offset;   /* Offset to use to achieve */
    00444                                       /* zero-margin printing */
    00445   short         initial_vertical_offset;
    00446   short         black_initial_vertical_offset;
    00447   short         extra_720dpi_separation;
    00448 /*****************************************************************************/
    00449   /* Paper size limits */
    00450   int           max_paper_width; /* Maximum paper width, in points */
    00451   int           max_paper_height; /* Maximum paper height, in points */
    00452   int           min_paper_width; /* Maximum paper width, in points */
    00453   int           min_paper_height; /* Maximum paper height, in points */
    00454 /*****************************************************************************/
    00455   /* Borders */
    00456                                 /* SHEET FED: */
    00457                                 /* Softweave: */
    00458   short         left_margin;    /* Left margin, points */
    00459   short         right_margin;   /* Right margin, points */
    00460   short         top_margin;     /* Absolute top margin, points */
    00461   short         bottom_margin;  /* Absolute bottom margin, points */
    00462                                 /* Printer weave: */
    00463   short         m_left_margin;  /* Left margin, points */
    00464   short         m_right_margin; /* Right margin, points */
    00465   short         m_top_margin;   /* Absolute top margin, points */
    00466   short         m_bottom_margin;        /* Absolute bottom margin, points */
    00467                                 /* ROLL FEED: */
    00468                                 /* Softweave: */
    00469   short         roll_left_margin;       /* Left margin, points */
    00470   short         roll_right_margin;      /* Right margin, points */
    00471   short         roll_top_margin;        /* Absolute top margin, points */
    00472   short         roll_bottom_margin;     /* Absolute bottom margin, points */
    00473                                 /* Printer weave: */
    00474   short         m_roll_left_margin;     /* Left margin, points */
    00475   short         m_roll_right_margin;    /* Right margin, points */
    00476   short         m_roll_top_margin;      /* Absolute top margin, points */
    00477   short         m_roll_bottom_margin;   /* Absolute bottom margin, points */
    00478                                 /* Print directly to CD */
    00479   short         cd_x_offset;    /* Center of CD (horizontal offset) */
    00480   short         cd_y_offset;    /* Center of CD (vertical offset) */
    00481   short         cd_page_width;  /* Width of "page" when printing to CD */
    00482   short         cd_page_height; /* Height of "page" when printing to CD */
    00483 /*****************************************************************************/
    00484   /* Parameters for escputil */
    00485   short         alignment_passes;
    00486   short         alignment_choices;
    00487   short         alternate_alignment_passes;
    00488   short         alternate_alignment_choices;
    00489 /*****************************************************************************/
    00490   const short *dot_sizes;       /* Vector of dot sizes for resolutions */
    00491   const float *densities;       /* List of densities for each printer */
    00492   const escp2_drop_list_t *drops; /* Drop sizes */
    00493 /*****************************************************************************/
    00494   const res_t *const *reslist;
    00495   const inkgroup_t *inkgroup;
    00496 /*****************************************************************************/
    00497   const short *bits;
    00498   const short *base_resolutions;
    00499   const input_slot_list_t *input_slots;
    00500 /*****************************************************************************/
    00501   const quality_list_t *quality_list;
    00502   const stp_raw_t *preinit_sequence;
    00503   const stp_raw_t *postinit_remote_sequence;
    00504 /*****************************************************************************/
    00505   const printer_weave_list_t *const printer_weaves;
    00506 } stpi_escp2_printer_t;
    00507
    00508 extern const stpi_escp2_printer_t stpi_escp2_model_capabilities[];
    00509 extern const int stpi_escp2_model_limit;
    00510
    00511 extern const escp2_drop_list_t stpi_escp2_simple_drops;
    00512 extern const escp2_drop_list_t stpi_escp2_spro10000_drops;
    00513 extern const escp2_drop_list_t stpi_escp2_variable_1_5pl_drops;
    00514 extern const escp2_drop_list_t stpi_escp2_variable_2pl_drops;
    00515 extern const escp2_drop_list_t stpi_escp2_variable_3pl_drops;
    00516 extern const escp2_drop_list_t stpi_escp2_variable_3pl_pigment_drops;
    00517 extern const escp2_drop_list_t stpi_escp2_variable_3pl_pmg_drops;
    00518 extern const escp2_drop_list_t stpi_escp2_variable_1440_4pl_drops;
    00519 extern const escp2_drop_list_t stpi_escp2_variable_ultrachrome_drops;
    00520 extern const escp2_drop_list_t stpi_escp2_variable_2880_4pl_drops;
    00521 extern const escp2_drop_list_t stpi_escp2_variable_6pl_drops;
    00522 extern const escp2_drop_list_t stpi_escp2_variable_2000p_drops;
    00523 extern const escp2_drop_list_t stpi_escp2_variable_x80_6pl_drops;
    00524
    00525 extern const paperlist_t stpi_escp2_standard_paper_list;
    00526 extern const paperlist_t stpi_escp2_durabrite_paper_list;
    00527 extern const paperlist_t stpi_escp2_ultrachrome_paper_list;
    00528
    00529 extern const paper_adjustment_list_t stpi_escp2_standard_paper_adjustment_list;
    00530 extern const paper_adjustment_list_t stpi_escp2_durabrite_paper_adjustment_list;
    00531 extern const paper_adjustment_list_t stpi_escp2_photo_paper_adjustment_list;
    00532 extern const paper_adjustment_list_t stpi_escp2_photo2_paper_adjustment_list;
    00533 extern const paper_adjustment_list_t stpi_escp2_photo3_paper_adjustment_list;
    00534 extern const paper_adjustment_list_t stpi_escp2_sp960_paper_adjustment_list;
    00535 extern const paper_adjustment_list_t stpi_escp2_ultrachrome_photo_paper_adjustment_list;
    00536 extern const paper_adjustment_list_t stpi_escp2_ultrachrome_matte_paper_adjustment_list;
    00537
    00538 extern const res_t *const stpi_escp2_superfine_reslist[];
    00539 extern const res_t *const stpi_escp2_no_printer_weave_reslist[];
    00540 extern const res_t *const stpi_escp2_pro_reslist[];
    00541 extern const res_t *const stpi_escp2_sp5000_reslist[];
    00542 extern const res_t *const stpi_escp2_720dpi_reslist[];
    00543 extern const res_t *const stpi_escp2_720dpi_soft_reslist[];
    00544 extern const res_t *const stpi_escp2_g3_720dpi_reslist[];
    00545 extern const res_t *const stpi_escp2_1440dpi_reslist[];
    00546 extern const res_t *const stpi_escp2_2880dpi_reslist[];
    00547 extern const res_t *const stpi_escp2_2880_1440dpi_reslist[];
    00548 extern const res_t *const stpi_escp2_g3_reslist[];
    00549 extern const res_t *const stpi_escp2_sc500_reslist[];
    00550 extern const res_t *const stpi_escp2_sc640_reslist[];
    00551
    00552 extern const inkgroup_t stpi_escp2_cmy_inkgroup;
    00553 extern const inkgroup_t stpi_escp2_standard_inkgroup;
    00554 extern const inkgroup_t stpi_escp2_c80_inkgroup;
    00555 extern const inkgroup_t stpi_escp2_c64_inkgroup;
    00556 extern const inkgroup_t stpi_escp2_x80_inkgroup;
    00557 extern const inkgroup_t stpi_escp2_photo_gen1_inkgroup;
    00558 extern const inkgroup_t stpi_escp2_photo_gen2_inkgroup;
    00559 extern const inkgroup_t stpi_escp2_photo_gen3_inkgroup;
    00560 extern const inkgroup_t stpi_escp2_photo_pigment_inkgroup;
    00561 extern const inkgroup_t stpi_escp2_photo7_japan_inkgroup;
    00562 extern const inkgroup_t stpi_escp2_ultrachrome_inkgroup;
    00563 extern const inkgroup_t stpi_escp2_f360_photo_inkgroup;
    00564 extern const inkgroup_t stpi_escp2_f360_photo7_japan_inkgroup;
    00565 extern const inkgroup_t stpi_escp2_f360_ultrachrome_inkgroup;
    00566 extern const inkgroup_t stpi_escp2_cmykrb_inkgroup;
    00567
    00568 extern const escp2_inkname_t stpi_escp2_default_black_inkset;
    00569
    00570 extern const printer_weave_list_t stpi_escp2_standard_printer_weave_list;
    00571 extern const printer_weave_list_t stpi_escp2_sp2200_printer_weave_list;
    00572 extern const printer_weave_list_t stpi_escp2_pro7000_printer_weave_list;
    00573 extern const printer_weave_list_t stpi_escp2_pro7500_printer_weave_list;
    00574 extern const printer_weave_list_t stpi_escp2_pro7600_printer_weave_list;
    00575
    00576 typedef struct
    00577 {
    00578   /* Basic print head parameters */
    00579   int nozzles;                  /* Number of nozzles */
    00580   int min_nozzles;              /* Fewest nozzles we're allowed to use */
    00581   int nozzle_separation;        /* Nozzle separation, in dots */
    00582   int *head_offset;             /* Head offset (for C80-type printers) */
    00583   int max_head_offset;          /* Largest head offset */
    00584   int page_management_units;    /* Page management units (dpi) */
    00585   int vertical_units;           /* Vertical units (dpi) */
    00586   int horizontal_units;         /* Horizontal units (dpi) */
    00587   int micro_units;              /* Micro-units for horizontal positioning */
    00588   int unit_scale;               /* Scale factor for units */
    00589   int send_zero_pass_advance;   /* Send explicit command for zero advance */
    00590
    00591   /* Ink parameters */
    00592   int bitwidth;                 /* Number of bits per ink drop */
    00593   int drop_size;                /* ID of the drop size we're using */
    00594   int ink_resid;                /* Array index for the drop set we're using */
    00595   const escp2_inkname_t *inkname; /* Description of the ink set */
    00596
    00597   /* Ink channels */
    00598   int logical_channels;         /* Number of logical ink channels (e.g.CMYK) */
    00599   int physical_channels;        /* Number of physical channels (e.g. CcMmYK) */
    00600   int channels_in_use;          /* Number of channels we're using
    00601                                    FIXME merge with physical_channels! */
    00602   unsigned char **cols;         /* Output dithered data */
    00603   const physical_subchannel_t **channels; /* Description of each channel */
    00604
    00605   /* Miscellaneous printer control */
    00606   int use_black_parameters;     /* Can we use (faster) black head parameters */
    00607   int use_fast_360;             /* Can we use fast 360 DPI 4 color mode */
    00608   int advanced_command_set;     /* Uses one of the advanced command sets */
    00609   int use_extended_commands;    /* Do we use the extended commands? */
    00610   const input_slot_t *input_slot; /* Input slot description */
    00611   const paper_t *paper_type;    /* Paper type */
    00612   const paper_adjustment_t *paper_adjustment;   /* Paper adjustments */
    00613   const inkgroup_t *ink_group;  /* Which set of inks */
    00614   const stp_raw_t *init_sequence; /* Initialization sequence */
    00615   const stp_raw_t *deinit_sequence; /* De-initialization sequence */
    00616   model_featureset_t command_set; /* Which command set this printer supports */
    00617   int variable_dots;            /* Print supports variable dot sizes */
    00618   int has_vacuum;               /* Printer supports vacuum command */
    00619   int has_graymode;             /* Printer supports fast grayscale mode */
    00620   int base_separation;          /* Basic unit of separation */
    00621   int resolution_scale;         /* Scale factor for ESC(D command */
    00622   int printing_resolution;      /* Printing resolution for this resolution */
    00623   int separation_rows;          /* Row separation scaling */
    00624   int pseudo_separation_rows;   /* Special row separation for some printers */
    00625   int extra_720dpi_separation;  /* Special separation needed at 720 DPI */
    00626
    00627   /* weave parameters */
    00628   int horizontal_passes;        /* Number of horizontal passes required
    00629                                    to print a complete row */
    00630   int physical_xdpi;            /* Horizontal distance between dots in pass */
    00631   const res_t *res;             /* Description of the printing resolution */
    00632   const printer_weave_t *printer_weave; /* Printer weave parameters */
    00633   int use_printer_weave;        /* Use the printer weaving mechanism */
    00634
    00635   /* page parameters */         /* Indexed from top left */
    00636   int page_left;                /* Left edge of page (points) */
    00637   int page_right;               /* Right edge of page (points) */
    00638   int page_top;                 /* Top edge of page (points) */
    00639   int page_bottom;              /* Bottom edge of page (points) */
    00640   int page_width;               /* Page width (points) */
    00641   int page_height;              /* Page height (points) */
    00642   int page_true_height;         /* Physical page height (points) */
    00643   int cd_x_offset;              /* CD X offset (micro units) */
    00644   int cd_y_offset;              /* CD Y offset (micro units) */
    00645   int cd_outer_radius;          /* CD radius (micro units) */
    00646   int cd_inner_radius;          /* CD radius (micro units) */
    00647
    00648   /* Image parameters */        /* Indexed from top left */
    00649   int image_height;             /* Height of printed region (points) */
    00650   int image_width;              /* Width of printed region (points) */
    00651   int image_top;                /* First printed row (points) */
    00652   int image_left;               /* Left edge of image (points) */
    00653   int image_scaled_width;       /* Width of physical printed region (dots) */
    00654   int image_printed_width;      /* Width of printed region (dots) */
    00655   int image_scaled_height;      /* Height of physical printed region (dots) */
    00656   int image_printed_height;     /* Height of printed region (dots) */
    00657   int image_left_position;      /* Left dot position of image */
    00658
    00659   /* Transitory state */
    00660   int printed_something;        /* Have we actually printed anything? */
    00661   int initial_vertical_offset;  /* Vertical offset for C80-type printers */
    00662   int printing_initial_vertical_offset; /* Vertical offset, for print cmd */
    00663   int last_color;               /* Last color we printed */
    00664   int last_pass_offset;         /* Starting row of last pass we printed */
    00665   int last_pass;                /* Last pass printed */
    00666
    00667 } escp2_privdata_t;
    00668
    00669 extern void stpi_escp2_init_printer(stp_vars_t *v);
    00670 extern void stpi_escp2_deinit_printer(stp_vars_t *v);
    00671 extern void stpi_escp2_flush_pass(stp_vars_t *v, int passno,
    00672                                   int vertical_subpass);
    00673 extern void stpi_escp2_terminate_page(stp_vars_t *v);
    00674
    00675 #ifdef TEST_UNCOMPRESSED
    00676 #define COMPRESSION (0)
    00677 #define FILLFUNC stp_fill_uncompressed
    00678 #define COMPUTEFUNC stp_compute_uncompressed_linewidth
    00679 #define PACKFUNC stp_pack_uncompressed
    00680 #else
    00681 #define COMPRESSION (1)
    00682 #define FILLFUNC stp_fill_tiff
    00683 #define COMPUTEFUNC stp_compute_tiff_linewidth
    00684 #define PACKFUNC stp_pack_tiff
    00685 #endif
    00686
    00687 #endif /* GIMP_PRINT_INTERNAL_ESCP2_H */
    00688 /*
    00689  * End of "$Id: print-escp2_8h-source.html,v 1.1.1.2 2004/12/22 23:49:07 jlovell Exp $".
    00690  */