summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@debian.org>2008-10-26 17:28:20 +0000
committerRoger Leigh <rleigh@debian.org>2008-10-26 17:28:20 +0000
commit9d82a443d65ea3e4e015ba6988208231fa8fdc77 (patch)
tree6bb518bb7ffbba8393cbca14bc68dea485932619 /src/main
parentf9238b191d14686b9beba78893dff0a8dff9c087 (diff)
Imported Upstream version 5.1.98.2
Diffstat (limited to 'src/main')
-rw-r--r--src/main/Makefile.am16
-rw-r--r--src/main/Makefile.in86
-rw-r--r--src/main/bit-ops.c2
-rw-r--r--src/main/canon-inks.h13
-rw-r--r--src/main/canon-modes.h4
-rw-r--r--src/main/canon-printers.h73
-rw-r--r--src/main/color-conversion.h4
-rw-r--r--src/main/curve.c45
-rw-r--r--src/main/dither-eventone.c711
-rw-r--r--src/main/dither-impl.h11
-rw-r--r--src/main/dither-inks.c3
-rw-r--r--src/main/dither-main.c17
-rw-r--r--src/main/dither-ordered.c319
-rw-r--r--src/main/escp2-channels.c296
-rw-r--r--src/main/escp2-driver.c2
-rw-r--r--src/main/escp2-inks.c32
-rw-r--r--src/main/escp2-papers.c19
-rw-r--r--src/main/escp2-resolutions.c18
-rw-r--r--src/main/module.c6
-rw-r--r--src/main/papers.xml178
-rw-r--r--src/main/print-canon.c19
-rw-r--r--src/main/print-color.c75
-rw-r--r--src/main/print-dither-matrices.c7
-rw-r--r--src/main/print-escp2-data.c513
-rw-r--r--src/main/print-escp2.c542
-rw-r--r--src/main/print-escp2.h19
-rw-r--r--src/main/print-lexmark.c2
-rw-r--r--src/main/print-olympus.c12
-rw-r--r--src/main/print-papers.c17
-rw-r--r--src/main/print-pcl.c112
-rw-r--r--src/main/print-ps.c824
-rw-r--r--src/main/print-raw.c2
-rw-r--r--src/main/print-util.c2
-rw-r--r--src/main/print-vars.c41
-rw-r--r--src/main/print-weave.c2
-rw-r--r--src/main/printers.c48
-rw-r--r--src/main/printers.xml61
-rw-r--r--src/main/sequence.c30
-rw-r--r--src/main/util.h4
-rw-r--r--src/main/xml.c2
-rw-r--r--src/main/xmlppd.c530
-rw-r--r--src/main/xmlppd.h46
42 files changed, 3492 insertions, 1273 deletions
diff --git a/src/main/Makefile.am b/src/main/Makefile.am
index 55b2868..077713f 100644
--- a/src/main/Makefile.am
+++ b/src/main/Makefile.am
@@ -1,4 +1,4 @@
-## $Id: Makefile.am,v 1.92.10.1 2007/03/02 12:01:20 rlk Exp $
+## $Id: Makefile.am,v 1.99 2008/04/28 02:06:44 rlk Exp $
## Copyright (C) 2000 Roger Leigh
##
## This program is free software; you can redistribute it and/or modify
@@ -25,8 +25,8 @@ include $(top_srcdir)/scripts/global.mk
## Variables
pkgconfigdatadir = $(libdir)/pkgconfig
-pkgxmldatadir = $(pkgdatadir)/$(VERSION)/xml
-pkgmoduledir = $(pkglibdir)/$(VERSION)/modules
+pkgxmldatadir = $(pkgdatadir)/@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@/xml
+pkgmoduledir = $(pkglibdir)/@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@/modules
## Programs
@@ -39,7 +39,7 @@ pkgmodule_LTLIBRARIES = \
print-lexmark.la \
print-pcl.la \
print-ps.la \
- print-olympus.la \
+ print-dyesub.la \
print-raw.la
endif
@@ -77,11 +77,11 @@ print_lexmark_la_LDFLAGS = -module -avoid-version
print_pcl_la_SOURCES = print-pcl.c
print_pcl_la_LDFLAGS = -module -avoid-version
-print_ps_la_SOURCES = print-ps.c
+print_ps_la_SOURCES = print-ps.c xmlppd.c xmlppd.h
print_ps_la_LDFLAGS = -module -avoid-version
-print_olympus_la_SOURCES = print-olympus.c
-print_olympus_la_LDFLAGS = -module -avoid-version
+print_dyesub_la_SOURCES = print-olympus.c
+print_dyesub_la_LDFLAGS = -module -avoid-version
print_raw_la_SOURCES = print-raw.c
print_raw_la_LDFLAGS = -module -avoid-version
@@ -95,7 +95,7 @@ module_SOURCES = \
$(print_lexmark_la_SOURCES) \
$(print_pcl_la_SOURCES) \
$(print_ps_la_SOURCES) \
- $(print_olympus_la_SOURCES) \
+ $(print_dyesub_la_SOURCES) \
$(print_raw_la_SOURCES)
if !BUILD_MODULES
diff --git a/src/main/Makefile.in b/src/main/Makefile.in
index ef0e99e..3af179d 100644
--- a/src/main/Makefile.in
+++ b/src/main/Makefile.in
@@ -43,13 +43,12 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
subdir = src/main
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
- $(top_srcdir)/m4/gimp.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \
- $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
- $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/stp.m4 \
- $(top_srcdir)/m4/stp_cups.m4 $(top_srcdir)/m4/stp_gimp.m4 \
- $(top_srcdir)/m4/stp_option.m4 $(top_srcdir)/m4/stp_release.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/isc-posix.m4 \
+ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/progtest.m4 \
+ $(top_srcdir)/m4/stp.m4 $(top_srcdir)/m4/stp_cups.m4 \
+ $(top_srcdir)/m4/stp_gimp.m4 $(top_srcdir)/m4/stp_option.m4 \
+ $(top_srcdir)/m4/stp_release.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs
@@ -91,7 +90,7 @@ am__libgutenprint_la_SOURCES_DIST = array.c bit-ops.c channel.c \
canon-printers.h print-escp2.c escp2-driver.c print-escp2.h \
print-escp2-data.c escp2-channels.c escp2-inks.c \
escp2-papers.c escp2-resolutions.c print-lexmark.c print-pcl.c \
- print-ps.c print-olympus.c print-raw.c
+ print-ps.c xmlppd.c xmlppd.h print-olympus.c print-raw.c
am__objects_1 = mxml-attr.lo mxml-file.lo mxml-node.lo mxml-search.lo
am__objects_2 =
am__objects_3 = print-color.lo color-conversions.lo
@@ -101,7 +100,7 @@ am__objects_5 = print-escp2.lo escp2-driver.lo print-escp2-data.lo \
escp2-resolutions.lo
am__objects_6 = print-lexmark.lo
am__objects_7 = print-pcl.lo
-am__objects_8 = print-ps.lo
+am__objects_8 = print-ps.lo xmlppd.lo
am__objects_9 = print-olympus.lo
am__objects_10 = print-raw.lo
am__objects_11 = $(am__objects_3) $(am__objects_4) $(am__objects_5) \
@@ -128,6 +127,13 @@ print_canon_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(print_canon_la_LDFLAGS) $(LDFLAGS) -o $@
@BUILD_MODULES_TRUE@am_print_canon_la_rpath = -rpath $(pkgmoduledir)
+print_dyesub_la_LIBADD =
+am_print_dyesub_la_OBJECTS = print-olympus.lo
+print_dyesub_la_OBJECTS = $(am_print_dyesub_la_OBJECTS)
+print_dyesub_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(print_dyesub_la_LDFLAGS) $(LDFLAGS) -o $@
+@BUILD_MODULES_TRUE@am_print_dyesub_la_rpath = -rpath $(pkgmoduledir)
print_escp2_la_LIBADD =
am_print_escp2_la_OBJECTS = print-escp2.lo escp2-driver.lo \
print-escp2-data.lo escp2-channels.lo escp2-inks.lo \
@@ -144,13 +150,6 @@ print_lexmark_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(print_lexmark_la_LDFLAGS) $(LDFLAGS) -o $@
@BUILD_MODULES_TRUE@am_print_lexmark_la_rpath = -rpath $(pkgmoduledir)
-print_olympus_la_LIBADD =
-am_print_olympus_la_OBJECTS = print-olympus.lo
-print_olympus_la_OBJECTS = $(am_print_olympus_la_OBJECTS)
-print_olympus_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(print_olympus_la_LDFLAGS) $(LDFLAGS) -o $@
-@BUILD_MODULES_TRUE@am_print_olympus_la_rpath = -rpath $(pkgmoduledir)
print_pcl_la_LIBADD =
am_print_pcl_la_OBJECTS = print-pcl.lo
print_pcl_la_OBJECTS = $(am_print_pcl_la_OBJECTS)
@@ -159,7 +158,7 @@ print_pcl_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(print_pcl_la_LDFLAGS) $(LDFLAGS) -o $@
@BUILD_MODULES_TRUE@am_print_pcl_la_rpath = -rpath $(pkgmoduledir)
print_ps_la_LIBADD =
-am_print_ps_la_OBJECTS = print-ps.lo
+am_print_ps_la_OBJECTS = print-ps.lo xmlppd.lo
print_ps_la_OBJECTS = $(am_print_ps_la_OBJECTS)
print_ps_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
@@ -185,14 +184,14 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(color_traditional_la_SOURCES) $(libgutenprint_la_SOURCES) \
- $(print_canon_la_SOURCES) $(print_escp2_la_SOURCES) \
- $(print_lexmark_la_SOURCES) $(print_olympus_la_SOURCES) \
+ $(print_canon_la_SOURCES) $(print_dyesub_la_SOURCES) \
+ $(print_escp2_la_SOURCES) $(print_lexmark_la_SOURCES) \
$(print_pcl_la_SOURCES) $(print_ps_la_SOURCES) \
$(print_raw_la_SOURCES)
DIST_SOURCES = $(color_traditional_la_SOURCES) \
$(am__libgutenprint_la_SOURCES_DIST) $(print_canon_la_SOURCES) \
- $(print_escp2_la_SOURCES) $(print_lexmark_la_SOURCES) \
- $(print_olympus_la_SOURCES) $(print_pcl_la_SOURCES) \
+ $(print_dyesub_la_SOURCES) $(print_escp2_la_SOURCES) \
+ $(print_lexmark_la_SOURCES) $(print_pcl_la_SOURCES) \
$(print_ps_la_SOURCES) $(print_raw_la_SOURCES)
pkgconfigdataDATA_INSTALL = $(INSTALL_DATA)
pkgxmldataDATA_INSTALL = $(INSTALL_DATA)
@@ -248,27 +247,13 @@ FOOMATIC_PPDFILE = @FOOMATIC_PPDFILE@
GENPPD_LIBS = @GENPPD_LIBS@
GIMP2_CFLAGS = @GIMP2_CFLAGS@
GIMP2_LIBS = @GIMP2_LIBS@
-GIMPTOOL = @GIMPTOOL@
GIMPTOOL2_CHECK = @GIMPTOOL2_CHECK@
-GIMPTOOL_CHECK = @GIMPTOOL_CHECK@
-GIMP_CFLAGS = @GIMP_CFLAGS@
-GIMP_CFLAGS_NOUI = @GIMP_CFLAGS_NOUI@
-GIMP_DATA_DIR = @GIMP_DATA_DIR@
-GIMP_LIBS = @GIMP_LIBS@
-GIMP_LIBS_NOUI = @GIMP_LIBS_NOUI@
-GIMP_PLUGIN_DIR = @GIMP_PLUGIN_DIR@
-GLIB_CFLAGS = @GLIB_CFLAGS@
-GLIB_CONFIG = @GLIB_CONFIG@
-GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GNUCFLAGS = @GNUCFLAGS@
GREP = @GREP@
GTK2_CFLAGS = @GTK2_CFLAGS@
GTK2_LIBS = @GTK2_LIBS@
-GTK_CFLAGS = @GTK_CFLAGS@
-GTK_CONFIG = @GTK_CONFIG@
-GTK_LIBS = @GTK_LIBS@
GUTENPRINTUI2_BINARY_AGE = @GUTENPRINTUI2_BINARY_AGE@
GUTENPRINTUI2_CFLAGS = @GUTENPRINTUI2_CFLAGS@
GUTENPRINTUI2_CURRENT_INTERFACE = @GUTENPRINTUI2_CURRENT_INTERFACE@
@@ -276,13 +261,6 @@ GUTENPRINTUI2_INTERFACE_AGE = @GUTENPRINTUI2_INTERFACE_AGE@
GUTENPRINTUI2_LIBDEPS = @GUTENPRINTUI2_LIBDEPS@
GUTENPRINTUI2_LIBS = $(top_builddir)/src/gutenprintui2/libgutenprintui2.la
GUTENPRINTUI2_VERSION = @GUTENPRINTUI2_VERSION@
-GUTENPRINTUI_BINARY_AGE = @GUTENPRINTUI_BINARY_AGE@
-GUTENPRINTUI_CFLAGS = @GUTENPRINTUI_CFLAGS@
-GUTENPRINTUI_CURRENT_INTERFACE = @GUTENPRINTUI_CURRENT_INTERFACE@
-GUTENPRINTUI_INTERFACE_AGE = @GUTENPRINTUI_INTERFACE_AGE@
-GUTENPRINTUI_LIBDEPS = @GUTENPRINTUI_LIBDEPS@
-GUTENPRINTUI_LIBS = $(top_builddir)/src/gutenprintui/libgutenprintui.la
-GUTENPRINTUI_VERSION = @GUTENPRINTUI_VERSION@
GUTENPRINT_BINARY_AGE = @GUTENPRINT_BINARY_AGE@
GUTENPRINT_CFLAGS = @GUTENPRINT_CFLAGS@
GUTENPRINT_CURRENT_INTERFACE = @GUTENPRINT_CURRENT_INTERFACE@
@@ -387,16 +365,12 @@ docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
gimp2_plug_indir = @gimp2_plug_indir@
-gimp_plug_indir = @gimp_plug_indir@
gutenprint_cflags = @gutenprint_cflags@
gutenprint_libdeps = @gutenprint_libdeps@
gutenprint_libs = @gutenprint_libs@
gutenprintui2_cflags = @gutenprintui2_cflags@
gutenprintui2_libdeps = @gutenprintui2_libdeps@
gutenprintui2_libs = @gutenprintui2_libs@
-gutenprintui_cflags = @gutenprintui_cflags@
-gutenprintui_libdeps = @gutenprintui_libdeps@
-gutenprintui_libs = @gutenprintui_libs@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -425,9 +399,10 @@ target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(LOCAL_CPPFLAGS) $(GNUCFLAGS)
+GUTENPRINTUI_LIBS = $(top_builddir)/src/gutenprintui/libgutenprintui.la
pkgconfigdatadir = $(libdir)/pkgconfig
-pkgxmldatadir = $(pkgdatadir)/$(VERSION)/xml
-pkgmoduledir = $(pkglibdir)/$(VERSION)/modules
+pkgxmldatadir = $(pkgdatadir)/@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@/xml
+pkgmoduledir = $(pkglibdir)/@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@/modules
@BUILD_MODULES_TRUE@pkgmodule_LTLIBRARIES = \
@BUILD_MODULES_TRUE@ color-traditional.la \
@BUILD_MODULES_TRUE@ print-canon.la \
@@ -435,7 +410,7 @@ pkgmoduledir = $(pkglibdir)/$(VERSION)/modules
@BUILD_MODULES_TRUE@ print-lexmark.la \
@BUILD_MODULES_TRUE@ print-pcl.la \
@BUILD_MODULES_TRUE@ print-ps.la \
-@BUILD_MODULES_TRUE@ print-olympus.la \
+@BUILD_MODULES_TRUE@ print-dyesub.la \
@BUILD_MODULES_TRUE@ print-raw.la
color_traditional_la_SOURCES = \
@@ -468,10 +443,10 @@ print_lexmark_la_SOURCES = print-lexmark.c
print_lexmark_la_LDFLAGS = -module -avoid-version
print_pcl_la_SOURCES = print-pcl.c
print_pcl_la_LDFLAGS = -module -avoid-version
-print_ps_la_SOURCES = print-ps.c
+print_ps_la_SOURCES = print-ps.c xmlppd.c xmlppd.h
print_ps_la_LDFLAGS = -module -avoid-version
-print_olympus_la_SOURCES = print-olympus.c
-print_olympus_la_LDFLAGS = -module -avoid-version
+print_dyesub_la_SOURCES = print-olympus.c
+print_dyesub_la_LDFLAGS = -module -avoid-version
print_raw_la_SOURCES = print-raw.c
print_raw_la_LDFLAGS = -module -avoid-version
lib_LTLIBRARIES = libgutenprint.la
@@ -482,7 +457,7 @@ module_SOURCES = \
$(print_lexmark_la_SOURCES) \
$(print_pcl_la_SOURCES) \
$(print_ps_la_SOURCES) \
- $(print_olympus_la_SOURCES) \
+ $(print_dyesub_la_SOURCES) \
$(print_raw_la_SOURCES)
@BUILD_MODULES_FALSE@libgutenprint_modules = $(module_SOURCES)
@@ -651,12 +626,12 @@ libgutenprint.la: $(libgutenprint_la_OBJECTS) $(libgutenprint_la_DEPENDENCIES)
$(libgutenprint_la_LINK) -rpath $(libdir) $(libgutenprint_la_OBJECTS) $(libgutenprint_la_LIBADD) $(LIBS)
print-canon.la: $(print_canon_la_OBJECTS) $(print_canon_la_DEPENDENCIES)
$(print_canon_la_LINK) $(am_print_canon_la_rpath) $(print_canon_la_OBJECTS) $(print_canon_la_LIBADD) $(LIBS)
+print-dyesub.la: $(print_dyesub_la_OBJECTS) $(print_dyesub_la_DEPENDENCIES)
+ $(print_dyesub_la_LINK) $(am_print_dyesub_la_rpath) $(print_dyesub_la_OBJECTS) $(print_dyesub_la_LIBADD) $(LIBS)
print-escp2.la: $(print_escp2_la_OBJECTS) $(print_escp2_la_DEPENDENCIES)
$(print_escp2_la_LINK) $(am_print_escp2_la_rpath) $(print_escp2_la_OBJECTS) $(print_escp2_la_LIBADD) $(LIBS)
print-lexmark.la: $(print_lexmark_la_OBJECTS) $(print_lexmark_la_DEPENDENCIES)
$(print_lexmark_la_LINK) $(am_print_lexmark_la_rpath) $(print_lexmark_la_OBJECTS) $(print_lexmark_la_LIBADD) $(LIBS)
-print-olympus.la: $(print_olympus_la_OBJECTS) $(print_olympus_la_DEPENDENCIES)
- $(print_olympus_la_LINK) $(am_print_olympus_la_rpath) $(print_olympus_la_OBJECTS) $(print_olympus_la_LIBADD) $(LIBS)
print-pcl.la: $(print_pcl_la_OBJECTS) $(print_pcl_la_DEPENDENCIES)
$(print_pcl_la_LINK) $(am_print_pcl_la_rpath) $(print_pcl_la_OBJECTS) $(print_pcl_la_LIBADD) $(LIBS)
print-ps.la: $(print_ps_la_OBJECTS) $(print_ps_la_DEPENDENCIES)
@@ -718,6 +693,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sequence.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/string-list.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlppd.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
diff --git a/src/main/bit-ops.c b/src/main/bit-ops.c
index ab111ca..a110adf 100644
--- a/src/main/bit-ops.c
+++ b/src/main/bit-ops.c
@@ -1,5 +1,5 @@
/*
- * "$Id: bit-ops.c,v 1.9.8.2 2007/05/12 19:14:27 faust3 Exp $"
+ * "$Id: bit-ops.c,v 1.12 2007/03/08 13:34:27 faust3 Exp $"
*
* Softweave calculator for Gutenprint.
*
diff --git a/src/main/canon-inks.h b/src/main/canon-inks.h
index a3a3fbb..1cd69fc 100644
--- a/src/main/canon-inks.h
+++ b/src/main/canon-inks.h
@@ -304,6 +304,19 @@ static const canon_inkset_t canon_9_C3M3Y2K2_c_inkset[] = {
{0,0.0,NULL}
};
+/* iP6000D */
+static const canon_inkset_t canon_9_C3M3Y3K3_inkset[] = {
+ {'C',1.0,&canon_2b_3l_ink},
+ {'M',1.0,&canon_2b_3l_ink},
+ {'Y',1.0,&canon_2b_3l_ink},
+ {'K',1.0,&canon_2b_3l_ink},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL}
+};
+
/* iP4000 default print mode (quality 2) */
static const canon_inkset_t canon_9_C3M3Y2K2k3_c_inkset[] = {
{'C',1.0,&canon_2b_3l_c_ink},
diff --git a/src/main/canon-modes.h b/src/main/canon-modes.h
index 815481b..0397688 100644
--- a/src/main/canon-modes.h
+++ b/src/main/canon-modes.h
@@ -321,6 +321,10 @@ static const canon_mode_t canon_PIXMA_iP4200_modes[] = {
};
DECLARE_MODES(canon_PIXMA_iP4200,2);
+static const canon_mode_t canon_PIXMA_iP6000_modes[] = {
+ { 600, 600,CANON_INK_CMYK,"600x600dpi",N_("600x600 DPI"),INKSET(9_C3M3Y3K3),MODE_FLAG_EXTENDED_T,NULL,1.0,1.0,NULL,NULL,NULL,2},
+};
+DECLARE_MODES(canon_PIXMA_iP6000,0);
static const canon_mode_t canon_PIXMA_iP6700_modes[] = {
{ 600, 600,CANON_INK_CMYK,"600x600dpi",N_("600x600 DPI"),INKSET(19_C3M3Y3k3),MODE_FLAG_EXTENDED_T,NULL,1.0,1.0,NULL,NULL,NULL,2},
diff --git a/src/main/canon-printers.h b/src/main/canon-printers.h
index b136a41..cd44195 100644
--- a/src/main/canon-printers.h
+++ b/src/main/canon-printers.h
@@ -46,6 +46,7 @@ typedef struct canon_caps {
const char *lum_adjustment;
const char *hue_adjustment;
const char *sat_adjustment;
+ const char *channel_order; /* (in gutenprint notation) 0123 => KCMY, 1230 => CMYK etc. */
} canon_cap_t;
static const char standard_sat_adjustment[] =
@@ -164,6 +165,8 @@ static const char* control_cmd_MULTIPASS_MP150[] = {
NULL
};
+static const char iP4500_channel_order[STP_NCOLORS] = {1,2,3,0}; /* CMYK */
+
static const canon_cap_t canon_model_capabilities[] =
{
/* the first printer is used as default in case something has gone wrong in printers.xml */
@@ -177,6 +180,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_PIXMA_iP4000_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
/* ******************************** */
@@ -204,6 +208,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_default_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
@@ -217,6 +222,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_default_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
@@ -230,6 +236,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_default_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
{ /* Canon BJC 85 *//* heads: BC-20 BC-21 BC-22 */
@@ -242,6 +249,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_default_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
@@ -255,6 +263,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_default_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
@@ -268,6 +277,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_default_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
@@ -281,6 +291,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_default_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
@@ -294,6 +305,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_default_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
@@ -307,6 +319,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_default_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
{ /* Canon BJC 8200 *//* heads: BC-50 */
@@ -319,6 +332,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_default_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
{ /* Canon S500 */
@@ -331,6 +345,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_default_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
@@ -351,6 +366,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_default_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
{ /* Canon BJC 240 *//* heads: BC-02 BC-05 BC-06 */
@@ -363,6 +379,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_default_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
{ /* Canon BJC 250 *//* heads: BC-02 BC-05 BC-06 */
@@ -375,6 +392,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_default_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
{ /* Canon BJC 1000 *//* heads: BC-02 BC-05 BC-06 */
@@ -387,6 +405,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_default_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
{ /* Canon BJC 2000 *//* heads: BC-20 BC-21 BC-22 BC-29 */
@@ -399,6 +418,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_default_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
{ /* Canon BJC 3000 *//* heads: BC-30 BC-33 BC-34 */
@@ -411,6 +431,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_default_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
{ /* Canon BJC 6100 *//* heads: BC-30/BC-31 BC-32/BC-31 */
@@ -423,6 +444,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_default_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
{ /* Canon BJC 7000 *//* heads: BC-60/BC-61 BC-60/BC-62 ??????? */
@@ -435,6 +457,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_default_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
{ /* Canon BJC i560 */
@@ -447,6 +470,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_default_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
{ /* Canon BJC 7100 *//* heads: BC-60/BC-61 BC-60/BC-62 ??????? */
@@ -459,6 +483,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_default_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
{ /* Canon BJC i80 *//* heads: BC-60/BC-61 BC-60/BC-62 ??????? */
@@ -471,6 +496,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_default_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
@@ -491,6 +517,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_default_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
{ /* Canon BJC 5500 *//* heads: BC-20 BC-21 BC-29 */
@@ -503,6 +530,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_default_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
{ /* Canon BJC 6500 *//* heads: BC-30/BC-31 BC-32/BC-31 */
@@ -515,6 +543,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_default_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
{ /* Canon BJC 8500 *//* heads: BC-80/BC-81 BC-82/BC-81 */
@@ -527,6 +556,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_default_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
{ /* Canon PIXMA iP2000 */
@@ -539,6 +569,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_PIXMA_iP4000_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
{ /* Canon PIXMA iP3000 */
@@ -551,6 +582,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_PIXMA_iP4000_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
{ /* Canon PIXMA iP4000 */
@@ -563,6 +595,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_PIXMA_iP4000_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
{ /* PIXMA MP740 (== iP4000 without duplex) */
@@ -576,6 +609,7 @@ static const canon_cap_t canon_model_capabilities[] =
NULL,
NULL,
NULL,
+ NULL
},
{ /* Canon PIXMA iP5300, MP610 */
"PIXMA iP5300", 3, /*model, model_id*/
@@ -587,6 +621,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_PIXMA_iP4000_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
{ /* Canon PIXMA iP4500 */
@@ -594,12 +629,13 @@ static const canon_cap_t canon_model_capabilities[] =
842, 17*72, /* max paper width and height */
10, 10, 15, 15, /*border_left, border_right, border_top, border_bottom */
&canon_PIXMA_iP4000_slotlist,
- CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_r|CANON_CAP_px|CANON_CAP_I,0x64,control_cmd_PIXMA_iP4000, /*features */
+ CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_r|CANON_CAP_px|CANON_CAP_I,0x61,control_cmd_MULTIPASS_MP150, /*features */
&canon_PIXMA_iP5300_modelist,
&canon_PIXMA_iP4000_paperlist,
NULL,
NULL,
- NULL
+ NULL,
+ iP4500_channel_order
},
{ /* Canon PIXMA iP4200 */
"PIXMA iP4200", 3, /*model, model_id*/
@@ -614,6 +650,19 @@ static const canon_cap_t canon_model_capabilities[] =
iP4200_sat_adjustment
},
{ /* Canon PIXMA iP6700 */
+ "PIXMA iP6000", 3, /*model, model_id*/
+ 842, 17*72, /* max paper width and height */
+ 10, 10, 15, 15, /*border_left, border_right, border_top, border_bottom */
+ &canon_PIXMA_iP4000_slotlist,
+ CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_r|CANON_CAP_px,0x64,control_cmd_PIXMA_iP4000, /*features */
+ &canon_PIXMA_iP6000_modelist,
+ &canon_PIXMA_iP4000_paperlist,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+ },
+ { /* Canon PIXMA iP6700 */
"PIXMA iP6700", 3, /*model, model_id*/
842, 17*72, /* max paper width and height */
10, 10, 15, 15, /*border_left, border_right, border_top, border_bottom */
@@ -623,6 +672,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_PIXMA_iP4000_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
{ /* Canon PIXMA iX5000 */
@@ -630,11 +680,25 @@ static const canon_cap_t canon_model_capabilities[] =
842, 17*72, /* max paper width and height */
10, 10, 15, 15, /*border_left, border_right, border_top, border_bottom */
&canon_PIXMA_iP4000_slotlist,
- CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_r|CANON_CAP_px,0x61,control_cmd_PIXMA_iP4000, /*features */
+ CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_r|CANON_CAP_px|CANON_CAP_I,0x61,control_cmd_PIXMA_iP4000, /*features */
+ &canon_PIXMA_iX5000_modelist,
+ &canon_PIXMA_iP4000_paperlist,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+ },
+ { /* Canon PIXMA MP520 */
+ "PIXMA MP520", 3, /*model, model_id*/
+ 842, 17*72, /* max paper width and height */
+ 10, 10, 15, 15, /*border_left, border_right, border_top, border_bottom */
+ &canon_PIXMA_iP4000_slotlist,
+ CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_r|CANON_CAP_px|CANON_CAP_I,0x61,control_cmd_PIXMA_iP4000, /*features */
&canon_PIXMA_iX5000_modelist,
&canon_PIXMA_iP4000_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
{ /* Canon PIXMA Pro9500 */
@@ -647,6 +711,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_PIXMA_iP4000_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
{ /* Canon PIXMA iP8500 */
@@ -659,6 +724,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_PIXMA_iP4000_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
{ /* Canon MULTIPASS MP150 */
@@ -671,6 +737,7 @@ static const canon_cap_t canon_model_capabilities[] =
&canon_PIXMA_iP4000_paperlist,
NULL,
NULL,
+ NULL,
NULL
},
};
diff --git a/src/main/color-conversion.h b/src/main/color-conversion.h
index ab04380..5e4f1c3 100644
--- a/src/main/color-conversion.h
+++ b/src/main/color-conversion.h
@@ -1,5 +1,5 @@
/*
- * "$Id: color-conversion.h,v 1.11 2005/09/17 21:54:33 rlk Exp $"
+ * "$Id: color-conversion.h,v 1.12 2008/01/21 23:19:39 rlk Exp $"
*
* Gutenprint color management module - traditional Gimp-Print algorithm.
*
@@ -150,9 +150,7 @@ typedef struct
stp_cached_curve_t contrast_correction;
stp_cached_curve_t user_color_correction;
stp_cached_curve_t channel_curves[STP_CHANNEL_LIMIT];
- stp_cached_curve_t hue_angle;
double gamma_values[STP_CHANNEL_LIMIT];
- double hue_angles[STP_CHANNEL_LIMIT];
double print_gamma;
double app_gamma;
double screen_gamma;
diff --git a/src/main/curve.c b/src/main/curve.c
index 3820dea..e65900b 100644
--- a/src/main/curve.c
+++ b/src/main/curve.c
@@ -1,5 +1,5 @@
/*
- * "$Id: curve.c,v 1.52 2006/09/12 19:03:32 easysw Exp $"
+ * "$Id: curve.c,v 1.53 2008/01/21 23:19:39 rlk Exp $"
*
* Print plug-in driver utility functions for the GIMP.
*
@@ -469,6 +469,49 @@ stp_curve_create_copy(const stp_curve_t *curve)
return ret;
}
+void
+stp_curve_reverse(stp_curve_t *dest, const stp_curve_t *source)
+{
+ check_curve(dest);
+ check_curve(source);
+ curve_dtor(dest);
+ dest->curve_type = source->curve_type;
+ dest->wrap_mode = source->wrap_mode;
+ dest->gamma = source->gamma;
+ if (source->piecewise)
+ {
+ const double *source_data;
+ size_t size;
+ double *new_data;
+ int i;
+ stp_sequence_get_data(source->seq, &size, &source_data);
+ new_data = stp_malloc(sizeof(double) * size);
+ for (i = 0; i < size; i += 2)
+ {
+ int j = size - i - 2;
+ new_data[i] = 1.0 - source_data[j];
+ new_data[i + 1] = source_data[j + 1];
+ }
+ dest->seq = stp_sequence_create();
+ stp_sequence_set_data(dest->seq, size, new_data);
+ stp_free(new_data);
+ }
+ else
+ dest->seq = stp_sequence_create_reverse(source->seq);
+ dest->piecewise = source->piecewise;
+ dest->recompute_interval = 1;
+}
+
+stp_curve_t *
+stp_curve_create_reverse(const stp_curve_t *curve)
+{
+ stp_curve_t *ret;
+ check_curve(curve);
+ ret = stp_curve_create(curve->wrap_mode);
+ stp_curve_reverse(ret, curve);
+ return ret;
+}
+
int
stp_curve_set_bounds(stp_curve_t *curve, double low, double high)
{
diff --git a/src/main/dither-eventone.c b/src/main/dither-eventone.c
index 51eb10b..2b983e0 100644
--- a/src/main/dither-eventone.c
+++ b/src/main/dither-eventone.c
@@ -1,5 +1,5 @@
/*
- * "$Id: dither-eventone.c,v 1.40 2004/09/17 18:38:18 rleigh Exp $"
+ * "$Id: dither-eventone.c,v 1.42 2008/02/19 01:13:46 rlk Exp $"
*
* EvenTone dither implementation for Gimp-Print
*
@@ -55,6 +55,8 @@ typedef struct
int physical_aspect;
int diff_factor;
stpi_dither_channel_t *dummy_channel;
+ double transition; /* Exponential scaling for transition region */
+ stp_dither_matrix_impl_t transition_matrix;
} eventone_t;
typedef struct shade_segment
@@ -86,14 +88,17 @@ free_eventone_data(stpi_dither_t *d)
STP_SAFE_FREE(CHANNEL(d, i).aux_data);
}
}
- if (et->dummy_channel) {
- stpi_dither_channel_t *dc = et->dummy_channel;
- shade_distance_t *shade = (shade_distance_t *) dc->aux_data;
- STP_SAFE_FREE(shade->et_dis);
- STP_SAFE_FREE(dc->aux_data);
- stpi_dither_channel_destroy(dc);
- STP_SAFE_FREE(et->dummy_channel);
- }
+ if (et->dummy_channel)
+ {
+ stpi_dither_channel_t *dc = et->dummy_channel;
+ shade_distance_t *shade = (shade_distance_t *) dc->aux_data;
+ STP_SAFE_FREE(shade->et_dis);
+ STP_SAFE_FREE(dc->aux_data);
+ stpi_dither_channel_destroy(dc);
+ STP_SAFE_FREE(et->dummy_channel);
+ }
+ if (d->stpi_dither_type & D_UNITONE)
+ stp_dither_matrix_destroy(&(et->transition_matrix));
STP_SAFE_FREE(et);
}
@@ -105,20 +110,26 @@ et_setup(stpi_dither_t *d)
eventone_t *et = stp_zalloc(sizeof(eventone_t));
int xa, ya;
int i;
- for (i = 0; i < CHANNEL_COUNT(d); i++) {
- CHANNEL(d, i).error_rows = 1;
- CHANNEL(d, i).errs = stp_zalloc(1 * sizeof(int *));
- CHANNEL(d, i).errs[0] = stp_zalloc(size * sizeof(int));
- }
- if (d->stpi_dither_type & D_UNITONE) {
- stpi_dither_channel_t *dc = stp_zalloc(sizeof(stpi_dither_channel_t));
- stp_dither_matrix_clone(&(d->dither_matrix), &(dc->dithermat), 0, 0);
- stp_dither_matrix_clone(&(d->transition_matrix), &(dc->pick), 0, 0);
- dc->error_rows = 1;
- dc->errs = stp_zalloc(1 * sizeof(int *));
- dc->errs[0] = stp_zalloc(size * sizeof(int));
- et->dummy_channel = dc;
- }
+ for (i = 0; i < CHANNEL_COUNT(d); i++)
+ {
+ CHANNEL(d, i).error_rows = 1;
+ CHANNEL(d, i).errs = stp_zalloc(1 * sizeof(int *));
+ CHANNEL(d, i).errs[0] = stp_zalloc(size * sizeof(int));
+ }
+ if (d->stpi_dither_type & D_UNITONE)
+ {
+ stpi_dither_channel_t *dc = stp_zalloc(sizeof(stpi_dither_channel_t));
+ stp_dither_matrix_clone(&(d->dither_matrix), &(dc->dithermat), 0, 0);
+ et->transition = 0.7;
+ stp_dither_matrix_destroy(&(et->transition_matrix));
+ stp_dither_matrix_copy(&(d->dither_matrix), &(et->transition_matrix));
+ stp_dither_matrix_scale_exponentially(&(et->transition_matrix), et->transition);
+ stp_dither_matrix_clone(&(et->transition_matrix), &(dc->pick), 0, 0);
+ dc->error_rows = 1;
+ dc->errs = stp_zalloc(1 * sizeof(int *));
+ dc->errs[0] = stp_zalloc(size * sizeof(int));
+ et->dummy_channel = dc;
+ }
xa = d->x_aspect / d->y_aspect;
if (xa == 0)
@@ -136,30 +147,30 @@ et_setup(stpi_dither_t *d)
et->unitone_aspect = UNITONE_C2 / (xa * ya);
et->d_sq.r_sq = 0;
- for (i = 0; i < CHANNEL_COUNT(d); i++) {
- int x;
- shade_distance_t *shade = stp_zalloc(sizeof(shade_distance_t));
- shade->dis = et->d_sq;
- shade->et_dis = stp_malloc(sizeof(distance_t) * d->dst_width);
- if (CHANNEL(d, i).darkness > .1)
- shade->share_this_channel = 1;
- else
- shade->share_this_channel = 0;
- for (x = 0; x < d->dst_width; x++) {
- shade->et_dis[x] = et->d_sq;
+ for (i = 0; i < CHANNEL_COUNT(d); i++)
+ {
+ int x;
+ shade_distance_t *shade = stp_zalloc(sizeof(shade_distance_t));
+ shade->dis = et->d_sq;
+ shade->et_dis = stp_malloc(sizeof(distance_t) * d->dst_width);
+ if (CHANNEL(d, i).darkness > .1)
+ shade->share_this_channel = 1;
+ else
+ shade->share_this_channel = 0;
+ for (x = 0; x < d->dst_width; x++)
+ shade->et_dis[x] = et->d_sq;
+ CHANNEL(d, i).aux_data = shade;
}
- CHANNEL(d, i).aux_data = shade;
- }
- if (et->dummy_channel) {
- int x;
- shade_distance_t *shade = stp_zalloc(sizeof(shade_distance_t));
- shade->dis = et->d_sq;
- shade->et_dis = stp_malloc(sizeof(distance_t) * d->dst_width);
- for (x = 0; x < d->dst_width; x++) {
- shade->et_dis[x] = et->d_sq;
+ if (et->dummy_channel)
+ {
+ int x;
+ shade_distance_t *shade = stp_zalloc(sizeof(shade_distance_t));
+ shade->dis = et->d_sq;
+ shade->et_dis = stp_malloc(sizeof(distance_t) * d->dst_width);
+ for (x = 0; x < d->dst_width; x++)
+ shade->et_dis[x] = et->d_sq;
+ et->dummy_channel->aux_data = shade;
}
- et->dummy_channel->aux_data = shade;
- }
et->physical_aspect = d->y_aspect / d->x_aspect;
if (et->physical_aspect >= 4)
@@ -183,27 +194,27 @@ et_initializer(stpi_dither_t *d, int duplicate_line, int zero_mask)
et_setup(d);
et = (eventone_t *) (d->aux_data);
- if (!duplicate_line) {
- if ((zero_mask & ((1 << CHANNEL_COUNT(d)) - 1)) !=
- ((1 << CHANNEL_COUNT(d)) - 1)) {
- d->last_line_was_empty = 0;
- } else {
- d->last_line_was_empty++;
+ if (!duplicate_line)
+ {
+ if ((zero_mask & ((1 << CHANNEL_COUNT(d)) - 1)) !=
+ ((1 << CHANNEL_COUNT(d)) - 1))
+ d->last_line_was_empty = 0;
+ else
+ d->last_line_was_empty++;
}
- } else if (d->last_line_was_empty) {
+ else if (d->last_line_was_empty)
d->last_line_was_empty++;
- }
- if (d->last_line_was_empty >= 5) {
+ if (d->last_line_was_empty >= 5)
return 0;
- } else if (d->last_line_was_empty == 4) {
- if (et->dummy_channel) {
- memset(et->dummy_channel->errs[0], 0, d->dst_width * sizeof(int));
+ else if (d->last_line_was_empty == 4)
+ {
+ if (et->dummy_channel)
+ memset(et->dummy_channel->errs[0], 0, d->dst_width * sizeof(int));
+ for (i = 0; i < CHANNEL_COUNT(d); i++)
+ memset(CHANNEL(d, i).errs[0], 0, d->dst_width * sizeof(int));
+ return 0;
}
- for (i = 0; i < CHANNEL_COUNT(d); i++)
- memset(CHANNEL(d, i).errs[0], 0, d->dst_width * sizeof(int));
- return 0;
- }
for (i = 0; i < CHANNEL_COUNT(d); i++)
CHANNEL(d, i).v = 0;
if (et->dummy_channel)
@@ -216,12 +227,13 @@ advance_eventone_pre(shade_distance_t *sp, eventone_t *et, int x)
{
distance_t *etd = &sp->et_dis[x];
int t = sp->dis.r_sq + sp->dis.dx;
- if (t <= etd->r_sq) { /* Do eventone calculations */
- sp->dis.r_sq = t; /* Nearest pixel same as last one */
- sp->dis.dx += et->d2x;
- } else {
+ if (t <= etd->r_sq)
+ { /* Do eventone calculations */
+ sp->dis.r_sq = t; /* Nearest pixel same as last one */
+ sp->dis.dx += et->d2x;
+ }
+ else
sp->dis = *etd; /* Nearest pixel is from a previous line */
- }
}
static inline void
@@ -232,16 +244,16 @@ eventone_update(stpi_dither_channel_t *dc, eventone_t *et,
distance_t *etd = &sp->et_dis[x];
int t = etd->r_sq + etd->dy; /* r^2 from dot above */
int u = sp->dis.r_sq + sp->dis.dy; /* r^2 from dot on this line */
- if (u < t) { /* If dot from this line is close */
- t = u; /* Use it instead */
- etd->dx = sp->dis.dx;
- etd->dy = sp->dis.dy;
- }
+ if (u < t)
+ { /* If dot from this line is close */
+ t = u; /* Use it instead */
+ etd->dx = sp->dis.dx;
+ etd->dy = sp->dis.dy;
+ }
etd->dy += et->d2y;
- if (t > 65535) { /* Do some hard limiting */
- t = 65535;
- }
+ if (t > 65535)
+ t = 65535; /* Do some hard limiting */
etd->r_sq = t;
}
@@ -255,7 +267,7 @@ diffuse_error(stpi_dither_channel_t *dc, eventone_t *et, int x, int direction)
* -- rlk 20031101
*/
#if 0
-/* int fraction = (dc->v + (et->diff_factor>>1)) / et->diff_factor; */
+ /* int fraction = (dc->v + (et->diff_factor>>1)) / et->diff_factor; */
int frac_2 = dc->v + dc->v;
int frac_3 = frac_2 + dc->v;
dc->errs[0][x + MAX_SPREAD] = frac_3;
@@ -277,16 +289,17 @@ eventone_adjust(stpi_dither_channel_t *dc, eventone_t *et, int dither_point,
return 0;
else if (dither_point >= 65535)
return 65535;
- if (desired == 0) {
+ if (desired == 0)
dither_point = 0;
- } else {
- shade_distance_t *shade = (shade_distance_t *) dc->aux_data;
- dither_point += shade->dis.r_sq * et->aspect - (EVEN_C1 * 65535) / desired;
- if (dither_point > 65535)
- dither_point = 65535;
- else if (dither_point < 0)
- dither_point = 0;
- }
+ else
+ {
+ shade_distance_t *shade = (shade_distance_t *) dc->aux_data;
+ dither_point += shade->dis.r_sq * et->aspect - (EVEN_C1 * 65535) / desired;
+ if (dither_point > 65535)
+ dither_point = 65535;
+ else if (dither_point < 0)
+ dither_point = 0;
+ }
return dither_point;
}
@@ -298,13 +311,14 @@ unitone_adjust(stpi_dither_channel_t *dc, eventone_t *et,
return INT_MIN;
else if (dither_point >= 65535)
return dither_point;
- if (desired == 0) {
+ if (desired == 0)
dither_point = INT_MIN;
- } else {
- shade_distance_t *shade = (shade_distance_t *) dc->aux_data;
- dither_point += shade->dis.r_sq * et->unitone_aspect -
- (UNITONE_C1 * 65535u) / desired;
- }
+ else
+ {
+ shade_distance_t *shade = (shade_distance_t *) dc->aux_data;
+ dither_point += shade->dis.r_sq * et->unitone_aspect -
+ (UNITONE_C1 * 65535u) / desired;
+ }
return dither_point;
}
@@ -326,12 +340,13 @@ find_segment(stpi_dither_channel_t *dc, unsigned inkval,
int i;
stpi_ink_defn_t *ip;
- for (i=0, ip = dc->ink_list; i < dc->nlevels - 1; i++, ip++) {
- if (ip->value > inkval)
- break;
- lower->bits = ip->bits;
- lower->range = ip->value;
- }
+ for (i=0, ip = dc->ink_list; i < dc->nlevels - 1; i++, ip++)
+ {
+ if (ip->value > inkval)
+ break;
+ lower->bits = ip->bits;
+ lower->range = ip->value;
+ }
upper->bits = ip->bits;
upper->range = ip->value;
@@ -373,10 +388,11 @@ print_ink(stpi_dither_t *d, unsigned char *tptr, const stpi_ink_defn_t *ink,
tptr[length] |= bit;
return;
default:
- for (j=1; j <= ink->bits; j+=j, tptr += length) {
- if (j & ink->bits)
- *tptr |= bit;
- }
+ for (j=1; j <= ink->bits; j+=j, tptr += length)
+ {
+ if (j & ink->bits)
+ *tptr |= bit;
+ }
return;
}
}
@@ -393,8 +409,8 @@ stpi_dither_et(stp_vars_t *v,
stpi_dither_t *d = (stpi_dither_t *) stp_get_component_data(v, "Dither");
eventone_t *et;
- int x,
- length;
+ int x;
+ int length;
unsigned char bit;
int i;
@@ -407,90 +423,100 @@ stpi_dither_et(stp_vars_t *v,
return;
et = (eventone_t *) d->aux_data;
+ if (d->stpi_dither_type & D_UNITONE)
+ stp_dither_matrix_set_row(&(et->transition_matrix), row);
length = (d->dst_width + 7) / 8;
- if (row & 1) {
- direction = 1;
- x = 0;
- terminate = d->dst_width;
- d->ptr_offset = 0;
- } else {
- direction = -1;
- x = d->dst_width - 1;
- terminate = -1;
- d->ptr_offset = length - 1;
- raw += channel_count * (d->src_width - 1);
- }
+ if (row & 1)
+ {
+ direction = 1;
+ x = 0;
+ terminate = d->dst_width;
+ d->ptr_offset = 0;
+ }
+ else
+ {
+ direction = -1;
+ x = d->dst_width - 1;
+ terminate = -1;
+ d->ptr_offset = length - 1;
+ raw += channel_count * (d->src_width - 1);
+ }
bit = 1 << (7 - (x & 7));
xstep = channel_count * (d->src_width / d->dst_width);
xmod = d->src_width % d->dst_width;
xerror = (xmod * x) % d->dst_width;
- for (; x != terminate; x += direction) {
+ for (; x != terminate; x += direction)
+ {
- int point_error = 0;
- int comparison = 32768;
+ int point_error = 0;
+ int comparison = 32768;
- if (d->stpi_dither_type & D_ORDERED_BASE)
- comparison += (ditherpoint(d, &(d->dither_matrix), x) / 16) - 2048;
+ if (d->stpi_dither_type & D_ORDERED_BASE)
+ comparison += (ditherpoint(d, &(d->dither_matrix), x) / 16) - 2048;
- for (i=0; i < channel_count; i++) {
- if (CHANNEL(d, i).ptr)
+ for (i=0; i < channel_count; i++)
{
- int inkspot;
- int range_point;
- stpi_dither_channel_t *dc = &CHANNEL(d, i);
- shade_distance_t *sp = (shade_distance_t *) dc->aux_data;
- stpi_ink_defn_t *inkp;
- stpi_ink_defn_t lower, upper;
-
- advance_eventone_pre(sp, et, x);
-
- /*
- * Find which are the two candidate dot sizes.
- * Rather than use the absolute value of the point to compute
- * the error, we will use the relative value of the point within
- * the range to find the two candidate dot sizes.
- */
- range_point =
- find_segment_and_ditherpoint(dc, raw[i], &lower, &upper);
-
- /* Incorporate error data from previous line */
- dc->v += 2 * range_point + (dc->errs[0][x + MAX_SPREAD] + 8) / 16;
- inkspot = dc->v - range_point;
-
- point_error += eventone_adjust(dc, et, inkspot, range_point);
-
- /* Determine whether to print the larger or smaller dot */
- inkp = &lower;
- if (point_error >= comparison) {
- point_error -= 65535;
- inkp = &upper;
- dc->v -= 131070;
- sp->dis = et->d_sq;
- }
-
- /* Adjust the error to reflect the dot choice */
- if (inkp->bits) {
- if (!mask || (*(mask + d->ptr_offset) & bit)) {
- set_row_ends(dc, x);
-
- /* Do the printing */
- print_ink(d, dc->ptr, inkp, bit, length);
+ if (CHANNEL(d, i).ptr)
+ {
+ int inkspot;
+ int range_point;
+ stpi_dither_channel_t *dc = &CHANNEL(d, i);
+ shade_distance_t *sp = (shade_distance_t *) dc->aux_data;
+ stpi_ink_defn_t *inkp;
+ stpi_ink_defn_t lower, upper;
+
+ advance_eventone_pre(sp, et, x);
+
+ /*
+ * Find which are the two candidate dot sizes.
+ * Rather than use the absolute value of the point to compute
+ * the error, we will use the relative value of the point within
+ * the range to find the two candidate dot sizes.
+ */
+ range_point =
+ find_segment_and_ditherpoint(dc, raw[i], &lower, &upper);
+
+ /* Incorporate error data from previous line */
+ dc->v += 2 * range_point + (dc->errs[0][x + MAX_SPREAD] + 8) / 16;
+ inkspot = dc->v - range_point;
+
+ point_error += eventone_adjust(dc, et, inkspot, range_point);
+
+ /* Determine whether to print the larger or smaller dot */
+ inkp = &lower;
+ if (point_error >= comparison)
+ {
+ point_error -= 65535;
+ inkp = &upper;
+ dc->v -= 131070;
+ sp->dis = et->d_sq;
+ }
+
+ /* Adjust the error to reflect the dot choice */
+ if (inkp->bits)
+ {
+ if (!mask || (*(mask + d->ptr_offset) & bit))
+ {
+ set_row_ends(dc, x);
+
+ /* Do the printing */
+ print_ink(d, dc->ptr, inkp, bit, length);
+ }
+ }
+
+ /* Spread the error around to the adjacent dots */
+ eventone_update(dc, et, x, direction);
+ diffuse_error(dc, et, x, direction);
}
- }
-
- /* Spread the error around to the adjacent dots */
- eventone_update(dc, et, x, direction);
- diffuse_error(dc, et, x, direction);
}
+ if (direction == 1)
+ ADVANCE_UNIDIRECTIONAL(d, bit, raw, channel_count, xerror, xstep, xmod);
+ else
+ ADVANCE_REVERSE(d, bit, raw, channel_count, xerror, xstep, xmod);
}
- if (direction == 1)
- ADVANCE_UNIDIRECTIONAL(d, bit, raw, channel_count, xerror, xstep, xmod);
- else
- ADVANCE_REVERSE(d, bit, raw, channel_count, xerror, xstep, xmod);
- }
if (direction == -1)
stpi_dither_reverse_row_ends(d);
}
@@ -506,8 +532,8 @@ stpi_dither_ut(stp_vars_t *v,
stpi_dither_t *d = (stpi_dither_t *) stp_get_component_data(v, "Dither");
eventone_t *et;
- int x,
- length;
+ int x;
+ int length;
unsigned char bit;
int i;
@@ -517,10 +543,11 @@ stpi_dither_ut(stp_vars_t *v,
int channel_count = CHANNEL_COUNT(d);
stpi_dither_channel_t *ddc;
- if (channel_count == 1) {
- stpi_dither_et(v, row, raw, duplicate_line, zero_mask, mask);
- return;
- }
+ if (channel_count == 1)
+ {
+ stpi_dither_et(v, row, raw, duplicate_line, zero_mask, mask);
+ return;
+ }
if (!et_initializer(d, duplicate_line, zero_mask))
return;
@@ -530,181 +557,201 @@ stpi_dither_ut(stp_vars_t *v,
length = (d->dst_width + 7) / 8;
- if (row & 1) {
- direction = 1;
- x = 0;
- terminate = d->dst_width;
- d->ptr_offset = 0;
- } else {
- direction = -1;
- x = d->dst_width - 1;
- terminate = -1;
- d->ptr_offset = length - 1;
- raw += channel_count * (d->src_width - 1);
- }
+ if (row & 1)
+ {
+ direction = 1;
+ x = 0;
+ terminate = d->dst_width;
+ d->ptr_offset = 0;
+ }
+ else
+ {
+ direction = -1;
+ x = d->dst_width - 1;
+ terminate = -1;
+ d->ptr_offset = length - 1;
+ raw += channel_count * (d->src_width - 1);
+ }
bit = 1 << (7 - (x & 7));
xstep = channel_count * (d->src_width / d->dst_width);
xmod = d->src_width % d->dst_width;
xerror = (xmod * x) % d->dst_width;
- for (; x != terminate; x += direction) {
-
- shade_distance_t *ssp = (shade_distance_t *) ddc->aux_data;
- int point_error = 0;
- int total_error = 0;
- int channels_to_print = 0;
- int print_all_channels = 0;
- int maximum_value = 0;
- int comparison = 32768;
- stpi_dither_channel_t *best_channel = NULL;
- stpi_dither_channel_t *second_best_channel = NULL;
- int best_channel_value = INT_MIN;
- int second_best_channel_value = INT_MIN;
- int random_value = ditherpoint(d, &(d->dither_matrix), x);
-
- if (d->stpi_dither_type & D_ORDERED_BASE)
- comparison += (random_value / 16) - 2048;
-
-
- ddc->b = 0;
- advance_eventone_pre(ssp, et, x);
-
- for (i=0; i < channel_count; i++) {
- stpi_dither_channel_t *dc = &CHANNEL(d, i);
- if (dc->ptr) {
- shade_distance_t *sp = (shade_distance_t *) dc->aux_data;
-
- advance_eventone_pre(sp, et, x);
-
- /*
- * Find which are the two candidate dot sizes.
- * Rather than use the absolute value of the point to compute
- * the error, we will use the relative value of the point within
- * the range to find the two candidate dot sizes.
- */
- dc->b = find_segment_and_ditherpoint(dc, raw[i],
- &(sp->lower), &(sp->upper));
- if (sp->share_this_channel) {
- if (dc->b > maximum_value)
- maximum_value = dc->b;
- ddc->b += dc->b;
+ for (; x != terminate; x += direction)
+ {
+
+ shade_distance_t *ssp = (shade_distance_t *) ddc->aux_data;
+ int point_error = 0;
+ int total_error = 0;
+ int channels_to_print = 0;
+ int print_all_channels = 0;
+ int maximum_value = 0;
+ int comparison = 32768;
+ stpi_dither_channel_t *best_channel = NULL;
+ stpi_dither_channel_t *second_best_channel = NULL;
+ int best_channel_value = INT_MIN;
+ int second_best_channel_value = INT_MIN;
+ int random_value = ditherpoint(d, &(d->dither_matrix), x);
+
+ if (d->stpi_dither_type & D_ORDERED_BASE)
+ comparison += (random_value / 16) - 2048;
+
+
+ ddc->b = 0;
+ advance_eventone_pre(ssp, et, x);
+
+ for (i=0; i < channel_count; i++)
+ {
+ stpi_dither_channel_t *dc = &CHANNEL(d, i);
+ if (dc->ptr)
+ {
+ shade_distance_t *sp = (shade_distance_t *) dc->aux_data;
+
+ advance_eventone_pre(sp, et, x);
+
+ /*
+ * Find which are the two candidate dot sizes.
+ * Rather than use the absolute value of the point to compute
+ * the error, we will use the relative value of the point within
+ * the range to find the two candidate dot sizes.
+ */
+ dc->b = find_segment_and_ditherpoint(dc, raw[i],
+ &(sp->lower), &(sp->upper));
+ if (sp->share_this_channel)
+ {
+ if (dc->b > maximum_value)
+ maximum_value = dc->b;
+ ddc->b += dc->b;
+ }
+ /* Incorporate error data from previous line */
+ dc->v += 2 * dc->b + (dc->errs[0][x + MAX_SPREAD] + 8) / 16;
+ dc->o = unitone_adjust(dc, et, dc->v - dc->b, dc->b);
+ }
}
- /* Incorporate error data from previous line */
- dc->v += 2 * dc->b + (dc->errs[0][x + MAX_SPREAD] + 8) / 16;
- dc->o = unitone_adjust(dc, et, dc->v - dc->b, dc->b);
- }
- }
#if 0
- if ((2 * (ddc->b - maximum_value)) < (3 * maximum_value))
- print_all_channels = 1;
+ if ((2 * (ddc->b - maximum_value)) < (3 * maximum_value))
+ print_all_channels = 1;
#endif
- if (ddc->b > 131070)
- print_all_channels = 1;
- else if (ddc->b > 65535) {
- ddc->b -= 65535;
- channels_to_print = 1;
- }
+ if (ddc->b > 131070)
+ print_all_channels = 1;
+ else if (ddc->b > 65535)
+ {
+ ddc->b -= 65535;
+ channels_to_print = 1;
+ }
- if (ddc->b > 65535) {
- ddc->b = 65535;
- }
+ if (ddc->b > 65535)
+ ddc->b = 65535;
- ddc->v += 2 * ddc->b + (ddc->errs[0][x + MAX_SPREAD] + 8) / 16;
- total_error += eventone_adjust(ddc, et, ddc->v - ddc->b, ddc->b);
- if (total_error >= comparison) {
- channels_to_print += 1;
- }
+ ddc->v += 2 * ddc->b + (ddc->errs[0][x + MAX_SPREAD] + 8) / 16;
+ total_error += eventone_adjust(ddc, et, ddc->v - ddc->b, ddc->b);
+ if (total_error >= comparison)
+ channels_to_print += 1;
- if (!print_all_channels) {
- for (i=0; i < channel_count; i++) {
- stpi_dither_channel_t *dc = &CHANNEL(d, i);
- shade_distance_t *sp = (shade_distance_t *) dc->aux_data;
+ if (!print_all_channels)
+ {
+ for (i=0; i < channel_count; i++)
+ {
+ stpi_dither_channel_t *dc = &CHANNEL(d, i);
+ shade_distance_t *sp = (shade_distance_t *) dc->aux_data;
- if (dc->ptr) {
-
- if (sp->share_this_channel) {
- if (dc->o > best_channel_value) {
- second_best_channel = best_channel;
- best_channel = dc;
- second_best_channel_value = best_channel_value;
- if (dc->o >= 32768)
- best_channel_value = INT_MAX;
- else
- best_channel_value = dc->o;
- } else if (dc->o > second_best_channel_value) {
- second_best_channel = dc;
- if (dc->o >= 32768)
- second_best_channel_value = INT_MAX;
- else
- second_best_channel_value = dc->o;
+ if (dc->ptr)
+ {
+
+ if (sp->share_this_channel)
+ {
+ if (dc->o > best_channel_value)
+ {
+ second_best_channel = best_channel;
+ best_channel = dc;
+ second_best_channel_value = best_channel_value;
+ if (dc->o >= 32768)
+ best_channel_value = INT_MAX;
+ else
+ best_channel_value = dc->o;
+ }
+ else if (dc->o > second_best_channel_value)
+ {
+ second_best_channel = dc;
+ if (dc->o >= 32768)
+ second_best_channel_value = INT_MAX;
+ else
+ second_best_channel_value = dc->o;
+ }
+ }
+ }
}
- }
}
- }
- }
- for (i=0; i < channel_count; i++) {
- stpi_dither_channel_t *dc = &CHANNEL(d, i);
- if (dc->ptr) {
-
- /* Determine whether to print the larger or smaller dot */
- shade_distance_t *sp = (shade_distance_t *) dc->aux_data;
- stpi_ink_defn_t *inkp = &(sp->lower);
-
- if (dc->o < 0)
- dc->o = 0;
- else if (dc->o > 65535)
- dc->o = 65535;
- if (print_all_channels || !sp->share_this_channel) {
- point_error += dc->o;
- if (point_error >= comparison) {
- point_error -= 65535;
- inkp = &(sp->upper);
- dc->v -= 131070;
- sp->dis = et->d_sq;
- }
- } else if ((channels_to_print >= 1 && best_channel == dc) ||
- (channels_to_print >= 2 && second_best_channel == dc)) {
- inkp = &(sp->upper);
- dc->v -= 131070;
- sp->dis = et->d_sq;
- }
- if (inkp->bits) {
- if (!mask || (*(mask + d->ptr_offset) & bit)) {
- set_row_ends(dc, x);
-
- /* Do the printing */
- print_ink(d, dc->ptr, inkp, bit, length);
- }
+ for (i=0; i < channel_count; i++)
+ {
+ stpi_dither_channel_t *dc = &CHANNEL(d, i);
+ if (dc->ptr)
+ {
+ /* Determine whether to print the larger or smaller dot */
+ shade_distance_t *sp = (shade_distance_t *) dc->aux_data;
+ stpi_ink_defn_t *inkp = &(sp->lower);
+
+ if (dc->o < 0)
+ dc->o = 0;
+ else if (dc->o > 65535)
+ dc->o = 65535;
+ if (print_all_channels || !sp->share_this_channel)
+ {
+ point_error += dc->o;
+ if (point_error >= comparison)
+ {
+ point_error -= 65535;
+ inkp = &(sp->upper);
+ dc->v -= 131070;
+ sp->dis = et->d_sq;
+ }
+ }
+ else if ((channels_to_print >= 1 && best_channel == dc) ||
+ (channels_to_print >= 2 && second_best_channel == dc))
+ {
+ inkp = &(sp->upper);
+ dc->v -= 131070;
+ sp->dis = et->d_sq;
+ }
+ if (inkp->bits)
+ {
+ if (!mask || (*(mask + d->ptr_offset) & bit))
+ {
+ set_row_ends(dc, x);
+
+ /* Do the printing */
+ print_ink(d, dc->ptr, inkp, bit, length);
+ }
+ }
+ }
+ }
+ if (total_error >= comparison)
+ {
+ ddc->v -= 131070;
+ total_error -= 65535;
+ ssp->dis = et->d_sq;
}
- }
- }
- if (total_error >= comparison) {
- ddc->v -= 131070;
- total_error -= 65535;
- ssp->dis = et->d_sq;
- }
-
- eventone_update(ddc, et, x, direction);
- diffuse_error(ddc, et, x, direction);
- for (i=0; i < channel_count; i++) {
- stpi_dither_channel_t *dc = &CHANNEL(d, i);
- if (dc->ptr) {
- /* Spread the error around to the adjacent dots */
- eventone_update(dc, et, x, direction);
- diffuse_error(dc, et, x, direction);
- }
+ eventone_update(ddc, et, x, direction);
+ diffuse_error(ddc, et, x, direction);
+ for (i=0; i < channel_count; i++)
+ {
+ stpi_dither_channel_t *dc = &CHANNEL(d, i);
+ if (dc->ptr)
+ {
+ /* Spread the error around to the adjacent dots */
+ eventone_update(dc, et, x, direction);
+ diffuse_error(dc, et, x, direction);
+ }
+ }
+ if (direction == 1)
+ ADVANCE_UNIDIRECTIONAL(d, bit, raw, channel_count, xerror, xstep, xmod);
+ else
+ ADVANCE_REVERSE(d, bit, raw, channel_count, xerror, xstep, xmod);
}
-
-
- if (direction == 1)
- ADVANCE_UNIDIRECTIONAL(d, bit, raw, channel_count, xerror, xstep, xmod);
- else
- ADVANCE_REVERSE(d, bit, raw, channel_count, xerror, xstep, xmod);
- }
if (direction == -1)
stpi_dither_reverse_row_ends(d);
}
diff --git a/src/main/dither-impl.h b/src/main/dither-impl.h
index e297464..28f9832 100644
--- a/src/main/dither-impl.h
+++ b/src/main/dither-impl.h
@@ -1,5 +1,5 @@
/*
- * "$Id: dither-impl.h,v 1.25.18.1 2007/12/15 20:35:44 rlk Exp $"
+ * "$Id: dither-impl.h,v 1.32 2008/02/18 14:20:17 rlk Exp $"
*
* Internal implementation of dither algorithms
*
@@ -57,7 +57,10 @@ extern "C" {
#define D_HYBRID_EVENTONE (D_ORDERED_BASE | D_EVENTONE)
#define D_HYBRID_UNITONE (D_ORDERED_BASE | D_UNITONE)
#define D_HYBRID_EVENBETTER (D_ORDERED_BASE | D_EVENBETTER)
-#define D_PREDITHERED 128
+#define D_PREDITHERED 256
+#define D_ORDERED_NEW 512
+#define D_ORDERED_SEGMENTED 1024
+#define D_ORDERED_SEGMENTED_NEW (D_ORDERED_SEGMENTED | D_ORDERED_NEW)
#define D_INVALID -2
#define DITHER_FAST_STEPS (6)
@@ -148,7 +151,6 @@ typedef struct dither
int x_aspect; /* Aspect ratio numerator */
int y_aspect; /* Aspect ratio denominator */
- double transition; /* Exponential scaling for transition region */
int *offset0_table;
int *offset1_table;
@@ -163,7 +165,6 @@ typedef struct dither
* some things */
stp_dither_matrix_impl_t dither_matrix;
- stp_dither_matrix_impl_t transition_matrix;
stpi_dither_channel_t *channel;
unsigned channel_count;
unsigned total_channel_count;
@@ -259,5 +260,5 @@ do \
#endif /* GUTENPRINT_INTERNAL_DITHER_IMPL_H */
/*
- * End of "$Id: dither-impl.h,v 1.25.18.1 2007/12/15 20:35:44 rlk Exp $".
+ * End of "$Id: dither-impl.h,v 1.32 2008/02/18 14:20:17 rlk Exp $".
*/
diff --git a/src/main/dither-inks.c b/src/main/dither-inks.c
index f7568e3..d69cf48 100644
--- a/src/main/dither-inks.c
+++ b/src/main/dither-inks.c
@@ -1,5 +1,5 @@
/*
- * "$Id: dither-inks.c,v 1.25 2004/09/17 18:38:18 rleigh Exp $"
+ * "$Id: dither-inks.c,v 1.26 2008/02/18 14:20:17 rlk Exp $"
*
* Print plug-in driver utility functions for the GIMP.
*
@@ -114,7 +114,6 @@ initialize_channel(stp_vars_t *v, int channel, int subchannel)
assert(idx >= 0);
memset(dc, 0, sizeof(stpi_dither_channel_t));
stp_dither_matrix_clone(&(d->dither_matrix), &(dc->dithermat), 0, 0);
- stp_dither_matrix_clone(&(d->transition_matrix), &(dc->pick), 0, 0);
shade.dot_sizes = &dot;
shade.value = 1.0;
shade.numsizes = 1;
diff --git a/src/main/dither-main.c b/src/main/dither-main.c
index 77211c3..b9ba80a 100644
--- a/src/main/dither-main.c
+++ b/src/main/dither-main.c
@@ -1,5 +1,5 @@
/*
- * "$Id: dither-main.c,v 1.52.8.1 2007/12/15 20:35:44 rlk Exp $"
+ * "$Id: dither-main.c,v 1.59 2008/02/18 14:20:17 rlk Exp $"
*
* Dither routine entrypoints
*
@@ -62,10 +62,13 @@ static const stpi_dither_algorithm_t dither_algos[] =
#endif
{ "Adaptive", N_ ("Adaptive Hybrid"), D_ADAPTIVE_HYBRID },
{ "Ordered", N_ ("Ordered"), D_ORDERED },
+ { "OrderedNew", N_ ("Ordered New"), D_ORDERED_NEW },
{ "Fast", N_ ("Fast"), D_FAST },
{ "VeryFast", N_ ("Very Fast"), D_VERY_FAST },
{ "Floyd", N_ ("Hybrid Floyd-Steinberg"), D_FLOYD_HYBRID },
- { "Predithered", N_ ("Predithered Input"), D_PREDITHERED }
+ { "Predithered", N_ ("Predithered Input"), D_PREDITHERED },
+ { "Segmented", N_ ("Drop Size Segmented"), D_ORDERED_SEGMENTED },
+ { "SegmentedNew", N_ ("Drop Size Segmented New"),D_ORDERED_SEGMENTED_NEW }
};
static const int num_dither_algos = sizeof(dither_algos)/sizeof(stpi_dither_algorithm_t);
@@ -175,6 +178,9 @@ stpi_set_dither_function(stp_vars_t *v)
if (color_correction && strcmp(color_correction, "Predithered") == 0)
d->stpi_dither_type = D_PREDITHERED;
+ else if (color_correction && strcmp(color_correction, "Raw") != 0 &&
+ algorithm && strcmp(algorithm, "Segmented") == 0)
+ d->stpi_dither_type = D_ORDERED;
else if (algorithm && strcmp(algorithm, "None") != 0)
{
for (i = 0; i < num_dither_algos; i++)
@@ -255,6 +261,9 @@ stpi_set_dither_function(stp_vars_t *v)
case D_VERY_FAST:
RETURN_DITHERFUNC(stpi_dither_very_fast, v);
case D_ORDERED:
+ case D_ORDERED_SEGMENTED:
+ case D_ORDERED_NEW:
+ case D_ORDERED_SEGMENTED_NEW:
case D_FAST:
RETURN_DITHERFUNC(stpi_dither_ordered, v);
case D_HYBRID_EVENTONE:
@@ -323,7 +332,6 @@ stpi_dither_free(void *vd)
STP_SAFE_FREE(d->offset0_table);
STP_SAFE_FREE(d->offset1_table);
stp_dither_matrix_destroy(&(d->dither_matrix));
- stp_dither_matrix_destroy(&(d->transition_matrix));
stp_free(d->channel);
stp_free(d->channel_index);
stp_free(d->subchannel_count);
@@ -356,7 +364,6 @@ stp_dither_init(stp_vars_t *v, stp_image_t *image, int out_width,
d->y_aspect = 1;
}
d->ditherfunc = stpi_set_dither_function(v);
- d->transition = 1.0;
d->adaptive_limit = .75 * 65535;
/*
@@ -399,7 +406,6 @@ stp_dither_init(stp_vars_t *v, stp_image_t *image, int out_width,
stp_abort();
}
}
- stp_dither_set_transition(v, 0.7);
d->src_width = in_width;
d->dst_width = out_width;
@@ -467,7 +473,6 @@ stp_dither_internal(stp_vars_t *v, int row, const unsigned short *input,
stpi_dither_t *d = (stpi_dither_t *) stp_get_component_data(v, "Dither");
stpi_dither_finalize(v);
stp_dither_matrix_set_row(&(d->dither_matrix), row);
- stp_dither_matrix_set_row(&(d->transition_matrix), row);
for (i = 0; i < CHANNEL_COUNT(d); i++)
{
CHANNEL(d, i).ptr = CHANNEL(d, i).ptr;
diff --git a/src/main/dither-ordered.c b/src/main/dither-ordered.c
index a355b41..ca119c1 100644
--- a/src/main/dither-ordered.c
+++ b/src/main/dither-ordered.c
@@ -1,5 +1,5 @@
/*
- * "$Id: dither-ordered.c,v 1.17.18.1 2007/12/15 20:35:44 rlk Exp $"
+ * "$Id: dither-ordered.c,v 1.28 2008/02/18 14:20:17 rlk Exp $"
*
* Ordered dither algorithm
*
@@ -33,6 +33,184 @@
#include <gutenprint/gutenprint-intl-internal.h>
#include "dither-impl.h"
#include "dither-inlined-functions.h"
+#include <assert.h>
+
+
+typedef struct {
+ size_t channels;
+ double *drops;
+ unsigned short *lut;
+} stpi_new_ordered_t;
+
+typedef struct {
+ unsigned short shift;
+ unsigned short mask;
+ unsigned short x_mask;
+ stpi_new_ordered_t *ord_new;
+} stpi_ordered_t;
+
+static int
+compare_channels(const stpi_dither_channel_t *dc1,
+ const stpi_dither_channel_t *dc2)
+{
+ int i;
+ if (dc1->nlevels != dc2->nlevels)
+ return 0;
+ for (i = 0; i < dc1->nlevels; i++)
+ if (dc1->ranges[i].upper->value != dc2->ranges[i].upper->value)
+ return 0;
+ return 1;
+}
+
+const static double dp_fraction = 0.5;
+
+static void
+init_dither_channel_new(stpi_dither_channel_t *dc, stp_vars_t *v)
+{
+ int i, j, k;
+ double bp = 0;
+ double lbp = 0;
+ double lower_bottom = 0;
+ double lower_middle = 0;
+ double lower_top = 0;
+ double upper_bottom = 0;
+ double upper_middle = 0;
+ double upper_top = 0;
+
+ double *breakpoints;
+ double *val;
+ unsigned short *data;
+ stpi_new_ordered_t *ord = stp_malloc(sizeof(stpi_new_ordered_t));
+ ((stpi_ordered_t *) (dc->aux_data))->ord_new = ord;
+ ord->channels = dc->nlevels - 1;
+ ord->drops = stp_malloc(sizeof(double) * (ord->channels + 1));
+ breakpoints = stp_malloc(sizeof(double) * (ord->channels + 1));
+ val = stp_malloc(sizeof(double) * ord->channels);
+ data = stp_malloc(sizeof(unsigned short) * 65536 * ord->channels);
+ ord->lut = data;
+ for (j = 0; j < ord->channels; j++)
+ {
+ stpi_dither_segment_t *dd = &(dc->ranges[j]);
+ ord->drops[j] = (double) dd->upper->value / 65535.0;
+ }
+ ord->drops[ord->channels] = 1;
+ for (j = 0; j < ord->channels; j++)
+ {
+ if (j == 0)
+ breakpoints[j] = 65535 * ord->drops[j] * dp_fraction;
+ else
+ breakpoints[j] = 65535 * ((ord->drops[j] * dp_fraction) +
+ (ord->drops[j - 1] * (1.0 - dp_fraction)));
+ stp_dprintf(STP_DBG_INK, v, " size %.3f bp %5.0f\n",
+ ord->drops[j], breakpoints[j]);
+ }
+ breakpoints[ord->channels] = 65535;
+ j = 0;
+ for (i = 0; i <= ord->channels; i++)
+ {
+ lbp = bp;
+ bp = breakpoints[i];
+ lower_bottom = upper_middle;
+ upper_bottom = 0;
+ lower_middle = upper_top;
+ lower_top = 0;
+ if (i == ord->channels)
+ upper_top = 0;
+ else
+ upper_top = 65535 * dp_fraction;
+ if (i > 0)
+ upper_middle = 65535 - upper_top;
+ while (j <= bp)
+ {
+ double range_point = (j - lbp) / (bp - lbp);
+ double uv, mv, lv;
+ int total_ink = 0;
+ for (k = 0; k < ord->channels; k++)
+ val[k] = 0;
+ uv = lower_top + (upper_top - lower_top) * range_point;
+ mv = lower_middle + (upper_middle - lower_middle) * range_point;
+ lv = lower_bottom + (upper_bottom - lower_bottom) * range_point;
+
+ if (i < ord->channels)
+ val[i] = (unsigned short) uv;
+ if (i > 0)
+ val[i - 1] = (unsigned short) mv;
+ if (i > 1)
+ val[i - 2] = (unsigned short) lv;
+ for (k = ord->channels - 1; k >= 0; k--)
+ {
+ total_ink += val[k];
+ if (total_ink > 65535)
+ total_ink = 65535;
+ data[k] = total_ink;
+ }
+ if ((stp_get_debug_level() & STP_DBG_INK) && (j % 257 == 0))
+ {
+ stp_dprintf(STP_DBG_INK, v, " %5d:", j);
+ for (k = 0; k < ord->channels; k++)
+ stp_dprintf(STP_DBG_INK, v, " %9.3f", val[k]);
+ stp_dprintf(STP_DBG_INK, v, " ");
+ for (k = 0; k < ord->channels; k++)
+ stp_dprintf(STP_DBG_INK, v, " %9.3f", breakpoints[k]);
+ stp_dprintf(STP_DBG_INK, v, " ");
+ for (k = 0; k < ord->channels; k++)
+ stp_dprintf(STP_DBG_INK, v, " %5d", data[k]);
+ stp_dprintf(STP_DBG_INK, v, "\n");
+ }
+ data += ord->channels;
+ j++;
+ }
+ }
+ stp_free(breakpoints);
+ stp_free(val);
+}
+
+static inline void
+print_color_ordered_new(const stpi_dither_t *d, stpi_dither_channel_t *dc,
+ int val, int x, int y, unsigned char bit, int length)
+{
+ int i;
+ int j;
+ unsigned bits;
+ int levels = dc->nlevels - 1;
+ unsigned dpoint = ditherpoint(d, &(dc->dithermat), x);
+ const stpi_ordered_t *o = (const stpi_ordered_t *) dc->aux_data;
+ const stpi_new_ordered_t *ord = (const stpi_new_ordered_t *) o->ord_new;
+ unsigned short swhere = (unsigned short) val;
+ unsigned short *where = ord ? ord->lut + (val * levels) : &swhere;
+ /*
+ * Look for the appropriate range into which the input value falls.
+ * Notice that we use the input, not the error, to decide what dot type
+ * to print (if any). We actually use the "density" input to permit
+ * the caller to use something other that simply the input value, if it's
+ * desired to use some function of overall density, rather than just
+ * this color's input, for this purpose.
+ */
+ for (i = levels - 1; i >= 0; i--)
+ {
+ if (dpoint < where[i])
+ {
+ stpi_dither_segment_t *dd = &(dc->ranges[i]);
+ bits = dd->upper->bits;
+ if (bits)
+ {
+ unsigned char *tptr = dc->ptr + d->ptr_offset;
+
+ /*
+ * Lay down all of the bits in the pixel.
+ */
+ set_row_ends(dc, x);
+ for (j = 1; j <= bits; j += j, tptr += length)
+ {
+ if (j & bits)
+ tptr[0] |= bit;
+ }
+
+ }
+ return;
+ }
+ }
+}
static inline void
print_color_ordered(const stpi_dither_t *d, stpi_dither_channel_t *dc, int val,
@@ -90,6 +268,76 @@ print_color_ordered(const stpi_dither_t *d, stpi_dither_channel_t *dc, int val,
}
}
+static void
+free_dither_ordered(stpi_dither_t *d)
+{
+ int i;
+ stpi_dither_channel_t *dc0 = &CHANNEL(d, 0);
+ stpi_ordered_t *o0 = dc0->aux_data;
+ stpi_new_ordered_t *no0;
+ if (o0)
+ no0 = o0->ord_new;
+ for (i = CHANNEL_COUNT(d) - 1; i >= 0 ; i--)
+ {
+ stpi_dither_channel_t *dc = &CHANNEL(d, i);
+ if (dc->aux_data)
+ {
+ stpi_ordered_t *ord = (stpi_ordered_t *) dc->aux_data;
+ if (ord->ord_new && (i == 0 || ord->ord_new != no0))
+ {
+ stpi_new_ordered_t *no = (stpi_new_ordered_t *) ord->ord_new;
+ if (no->drops)
+ stp_free(no->drops);
+ if (no->lut)
+ stp_free(no->lut);
+ stp_free(no);
+ }
+ stp_free(dc->aux_data);
+ dc->aux_data = NULL;
+ }
+ }
+ stp_free(d->aux_data);
+}
+
+static void
+init_dither_ordered(stpi_dither_t *d, stp_vars_t *v)
+{
+ int i;
+ d->aux_data = stp_malloc(1);
+ d->aux_freefunc = &free_dither_ordered;
+ stp_dprintf(STP_DBG_INK, v, "init_dither_ordered\n");
+ for (i = 0; i < CHANNEL_COUNT(d); i++)
+ {
+ stpi_dither_channel_t *dc = &CHANNEL(d, i);
+ stpi_ordered_t *s;
+ dc->aux_data = stp_malloc(sizeof(stpi_ordered_t));
+ s = (stpi_ordered_t *) dc->aux_data;
+ s->ord_new = NULL;
+ if (d->stpi_dither_type & D_ORDERED_SEGMENTED)
+ {
+ s->shift = 16 - dc->signif_bits;
+ s->mask = ((1 << dc->signif_bits) - 1) << s->shift;
+ s->x_mask = ~(s->mask);
+ stp_dprintf(STP_DBG_INK, v, " channel %d: shift %d mask 0x%x x_mask 0x%x\n",
+ i, s->shift, s->mask, s->x_mask);
+ }
+ if (d->stpi_dither_type & D_ORDERED_NEW)
+ {
+ if (dc->nlevels < 2)
+ stp_dprintf(STP_DBG_INK, v, " channel %d ignored\n", i);
+ else if (i == 0 || !compare_channels(&CHANNEL(d, 0), dc))
+ {
+ stp_dprintf(STP_DBG_INK, v, " channel %d\n", i);
+ init_dither_channel_new(dc, v);
+ }
+ else
+ {
+ stp_dprintf(STP_DBG_INK, v, " channel %d duplicated from channel 0\n", i);
+ s->ord_new = ((stpi_ordered_t *) (CHANNEL(d, 0).aux_data))->ord_new;
+ }
+ }
+ }
+}
void
stpi_dither_ordered(stp_vars_t *v,
@@ -105,6 +353,7 @@ stpi_dither_ordered(stp_vars_t *v,
unsigned char bit;
int i;
int one_bit_only = 1;
+ int one_level_only = 1;
int xerror, xstep, xmod;
@@ -122,9 +371,14 @@ stpi_dither_ordered(stp_vars_t *v,
for (i = 0; i < CHANNEL_COUNT(d); i++)
{
stpi_dither_channel_t *dc = &(CHANNEL(d, i));
+ if (dc->nlevels != 1)
+ one_level_only = 0;
if (dc->nlevels != 1 || dc->ranges[0].upper->bits != 1)
one_bit_only = 0;
}
+ if (! one_bit_only && ! d->aux_data &&
+ (d->stpi_dither_type & (D_ORDERED_SEGMENTED | D_ORDERED_NEW)))
+ init_dither_ordered(d, v);
if (one_bit_only)
{
@@ -146,7 +400,51 @@ stpi_dither_ordered(stp_vars_t *v,
xerror, xstep, xmod);
}
}
- else
+ else if (d->stpi_dither_type & D_ORDERED_SEGMENTED)
+ {
+ for (x = 0; x < d->dst_width; x ++)
+ {
+ if (!mask || (*(mask + d->ptr_offset) & bit))
+ {
+ for (i = 0; i < CHANNEL_COUNT(d); i++)
+ {
+ stpi_dither_channel_t *dc = &CHANNEL(d, i);
+ stpi_ordered_t *s = (stpi_ordered_t *) dc->aux_data;
+ unsigned short bits = raw[i] >> s->shift;
+ unsigned short val = raw[i] << dc->signif_bits;
+ val |= val >> s->shift;
+
+ if (bits)
+ {
+ if (val &&
+ val >= ditherpoint(d, &(CHANNEL(d, i).dithermat), x))
+ {
+ int j;
+ unsigned char *tptr = dc->ptr + d->ptr_offset;
+ set_row_ends(dc, x);
+ for (j = 1; j <= bits; j += j, tptr += length)
+ {
+ if (j & bits)
+ tptr[0] |= bit;
+ }
+ }
+ }
+ else if (CHANNEL(d, i).ptr && val)
+ {
+ if (d->stpi_dither_type & D_ORDERED_NEW)
+ print_color_ordered_new(d, &(CHANNEL(d, i)), val, x,
+ row, bit, length);
+ else
+ print_color_ordered(d, &(CHANNEL(d, i)), val, x,
+ row, bit, length);
+ }
+ }
+ }
+ ADVANCE_UNIDIRECTIONAL(d, bit, raw, CHANNEL_COUNT(d),
+ xerror, xstep, xmod);
+ }
+ }
+ else if (one_level_only || !(d->stpi_dither_type == D_ORDERED_NEW))
{
for (x = 0; x != d->dst_width; x ++)
{
@@ -163,4 +461,21 @@ stpi_dither_ordered(stp_vars_t *v,
xstep, xmod);
}
}
+ else
+ {
+ for (x = 0; x != d->dst_width; x ++)
+ {
+ if (!mask || (*(mask + d->ptr_offset) & bit))
+ {
+ for (i = 0; i < CHANNEL_COUNT(d); i++)
+ {
+ if (CHANNEL(d, i).ptr && raw[i])
+ print_color_ordered_new(d, &(CHANNEL(d, i)), raw[i], x,
+ row, bit, length);
+ }
+ }
+ ADVANCE_UNIDIRECTIONAL(d, bit, raw, CHANNEL_COUNT(d), xerror,
+ xstep, xmod);
+ }
+ }
}
diff --git a/src/main/escp2-channels.c b/src/main/escp2-channels.c
index 1a8cc5d..1ca2c94 100644
--- a/src/main/escp2-channels.c
+++ b/src/main/escp2-channels.c
@@ -1,5 +1,5 @@
/*
- * "$Id: escp2-channels.c,v 1.62.8.3 2007/12/29 20:42:26 rlk Exp $"
+ * "$Id: escp2-channels.c,v 1.75 2008/02/27 00:43:37 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
@@ -285,380 +285,380 @@ static hue_curve_t picturemate_blue_curve =
static const physical_subchannel_t standard_black_subchannels[] =
{
- { 0, -1, 0, 0, "BlackDensity", NULL }
+ { 0, -1, 0, 0, "BlackDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(standard_black);
static const physical_subchannel_t f360_black_subchannels[] =
{
- { 0, 0, 1, 0, "BlackDensity", NULL }
+ { 0, 0, 1, 0, "BlackDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(f360_black);
static const physical_subchannel_t x80_black_subchannels[] =
{
- { 0, -1, 48, 0, "BlackDensity", NULL }
+ { 0, -1, 48, 0, "BlackDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(x80_black);
static const physical_subchannel_t c80_black_subchannels[] =
{
- { 0, -1, 0, 0, "BlackDensity", NULL }
+ { 0, -1, 0, 0, "BlackDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(c80_black);
static const physical_subchannel_t c120_black_subchannels[] =
{
- { 0, 4, 0, 2, "BlackDensity", NULL, { 0, 0x40 } }
+ { 0, 4, 0, 2, "BlackDensity", NULL, NULL, NULL, { 0, 0x40 } }
};
DECLARE_INK_CHANNEL(c120_black);
static const physical_subchannel_t c64_black_subchannels[] =
{
- { 0, -1, 0, 0, "BlackDensity", NULL }
+ { 0, -1, 0, 0, "BlackDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(c64_black);
static const physical_subchannel_t standard_cyan_subchannels[] =
{
- { 2, -1, 0, 0, "CyanDensity", NULL }
+ { 2, -1, 0, 0, "CyanDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(standard_cyan);
static const physical_subchannel_t f360_standard_cyan_subchannels[] =
{
- { 2, -1, 1, 0, "CyanDensity", NULL }
+ { 2, -1, 1, 0, "CyanDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(f360_standard_cyan);
static const physical_subchannel_t r800_cyan_subchannels[] =
{
- { 2, -1, 1, 0, "CyanDensity", NULL }
+ { 2, -1, 1, 0, "CyanDensity", NULL, NULL, NULL }
};
DECLARE_EXTENDED_INK_CHANNEL(r800_cyan);
static const physical_subchannel_t picturemate_cyan_subchannels[] =
{
- { 2, -1, 0, 0, "CyanDensity", NULL }
+ { 2, -1, 0, 0, "CyanDensity", NULL, NULL, NULL }
};
DECLARE_EXTENDED_INK_CHANNEL(picturemate_cyan);
static const physical_subchannel_t cx3650_standard_cyan_subchannels[] =
{
- { 2, -1, 2, 0, "CyanDensity", NULL }
+ { 2, -1, 2, 0, "CyanDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(cx3650_standard_cyan);
static const physical_subchannel_t x80_cyan_subchannels[] =
{
- { 2, -1, 96, 0, "CyanDensity", NULL }
+ { 2, -1, 96, 0, "CyanDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(x80_cyan);
static const physical_subchannel_t c80_cyan_subchannels[] =
{
- { 2, -1, 0, 0, "CyanDensity", NULL }
+ { 2, -1, 0, 0, "CyanDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(c80_cyan);
static const physical_subchannel_t c120_cyan_subchannels[] =
{
- { 2, -1, 0, 0, "CyanDensity", NULL }
+ { 2, -1, 0, 0, "CyanDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(c120_cyan);
static const physical_subchannel_t c64_cyan_subchannels[] =
{
- { 2, -1, 0, 0, "CyanDensity", NULL }
+ { 2, -1, 0, 0, "CyanDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(c64_cyan);
static const physical_subchannel_t standard_magenta_subchannels[] =
{
- { 1, -1, 0, 0, "MagentaDensity", NULL }
+ { 1, -1, 0, 0, "MagentaDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(standard_magenta);
static const physical_subchannel_t r800_magenta_subchannels[] =
{
- { 1, -1, 0, 0, "MagentaDensity", NULL }
+ { 1, -1, 0, 0, "MagentaDensity", NULL, NULL, NULL }
};
DECLARE_EXTENDED_INK_CHANNEL(r800_magenta);
static const physical_subchannel_t picturemate_magenta_subchannels[] =
{
- { 1, -1, 0, 0, "MagentaDensity", NULL }
+ { 1, -1, 0, 0, "MagentaDensity", NULL, NULL, NULL }
};
DECLARE_EXTENDED_INK_CHANNEL(picturemate_magenta);
static const physical_subchannel_t f360_standard_magenta_subchannels[] =
{
- { 1, -1, 1, 0, "MagentaDensity", NULL }
+ { 1, -1, 1, 0, "MagentaDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(f360_standard_magenta);
static const physical_subchannel_t x80_magenta_subchannels[] =
{
- { 1, -1, 48, 0, "MagentaDensity", NULL }
+ { 1, -1, 48, 0, "MagentaDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(x80_magenta);
static const physical_subchannel_t c80_magenta_subchannels[] =
{
- { 1, -1, 120, 0, "MagentaDensity", NULL }
+ { 1, -1, 120, 0, "MagentaDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(c80_magenta);
static const physical_subchannel_t c120_magenta_subchannels[] =
{
- { 1, -1, 120, 0, "MagentaDensity", NULL }
+ { 1, -1, 120, 0, "MagentaDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(c120_magenta);
static const physical_subchannel_t c64_magenta_subchannels[] =
{
- { 1, -1, 90, 0, "MagentaDensity", NULL }
+ { 1, -1, 90, 0, "MagentaDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(c64_magenta);
static const physical_subchannel_t standard_yellow_subchannels[] =
{
- { 4, -1, 0, 0, "YellowDensity", NULL }
+ { 4, -1, 0, 0, "YellowDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(standard_yellow);
static const physical_subchannel_t x80_yellow_subchannels[] =
{
- { 4, -1, 0, 0, "YellowDensity", NULL }
+ { 4, -1, 0, 0, "YellowDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(x80_yellow);
static const physical_subchannel_t c80_yellow_subchannels[] =
{
- { 4, -1, 240, 0, "YellowDensity", NULL }
+ { 4, -1, 240, 0, "YellowDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(c80_yellow);
static const physical_subchannel_t c120_yellow_subchannels[] =
{
- { 4, -1, 240, 0, "YellowDensity", NULL }
+ { 4, -1, 240, 0, "YellowDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(c120_yellow);
static const physical_subchannel_t c64_yellow_subchannels[] =
{
- { 4, -1, 180, 0, "YellowDensity", NULL }
+ { 4, -1, 180, 0, "YellowDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(c64_yellow);
static const physical_subchannel_t f360_standard_yellow_subchannels[] =
{
- { 4, -1, 1, 0, "YellowDensity", NULL }
+ { 4, -1, 1, 0, "YellowDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(f360_standard_yellow);
static const physical_subchannel_t r800_yellow_subchannels[] =
{
- { 4, -1, 1, 0, "YellowDensity", NULL }
+ { 4, -1, 1, 0, "YellowDensity", NULL, NULL, NULL }
};
DECLARE_EXTENDED_INK_CHANNEL(r800_yellow);
static const physical_subchannel_t picturemate_yellow_subchannels[] =
{
- { 4, -1, 0, 0, "YellowDensity", NULL }
+ { 4, -1, 0, 0, "YellowDensity", NULL, NULL, NULL }
};
DECLARE_EXTENDED_INK_CHANNEL(picturemate_yellow);
static const physical_subchannel_t r800_red_subchannels[] =
{
- { 7, -1, 0, 0, "RedDensity", NULL }
+ { 7, -1, 0, 0, "RedDensity", NULL, NULL, NULL }
};
DECLARE_EXTENDED_INK_CHANNEL(r800_red);
static const physical_subchannel_t picturemate_red_subchannels[] =
{
- { 7, -1, 0, 0, "RedDensity", NULL }
+ { 7, -1, 0, 0, "RedDensity", NULL, NULL, NULL }
};
DECLARE_EXTENDED_INK_CHANNEL(picturemate_red);
static const physical_subchannel_t r800_blue_subchannels[] =
{
- { 8, -1, 1, 0, "BlueDensity", NULL }
+ { 8, -1, 1, 0, "BlueDensity", NULL, NULL, NULL }
};
DECLARE_EXTENDED_INK_CHANNEL(r800_blue);
static const physical_subchannel_t picturemate_blue_subchannels[] =
{
- { 8, -1, 1, 0, "BlueDensity", NULL }
+ { 8, -1, 1, 0, "BlueDensity", NULL, NULL, NULL }
};
DECLARE_EXTENDED_INK_CHANNEL(picturemate_blue);
static const physical_subchannel_t standard_gloss_subchannels[] =
{
- { 9, -1, 0, 0, "GlossDensity", NULL }
+ { 9, -1, 0, 0, "GlossDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(standard_gloss);
static const physical_subchannel_t f360_gloss_subchannels[] =
{
- { 9, -1, 1, 0, "GlossDensity", NULL }
+ { 9, -1, 1, 0, "GlossDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(f360_gloss);
static const physical_subchannel_t standard_photo_black_subchannels[] =
{
- { 0, 4, 0, 0, "BlackDensity", NULL }
+ { 0, 4, 0, 0, "BlackDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(standard_photo_black);
static const physical_subchannel_t f360_photo_black_subchannels[] =
{
- { 0, 4, 1, 0, "BlackDensity", NULL }
+ { 0, 4, 1, 0, "BlackDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(f360_photo_black);
static const physical_subchannel_t r800_matte_black_subchannels[] =
{
- { 0, 0, 0, 0, "BlackDensity", NULL }
+ { 0, 0, 0, 0, "BlackDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(r800_matte_black);
static const physical_subchannel_t photo_black_subchannels[] =
{
- { 0, 0, 0, 0, "BlackDensity", NULL }
+ { 0, 0, 0, 0, "BlackDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(photo_black);
static const physical_subchannel_t extended_black_subchannels[] =
{
- { 0, 1, 0, 0, "BlackDensity", NULL }
+ { 0, 1, 0, 0, "BlackDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(extended_black);
static const physical_subchannel_t f360_extended_black_subchannels[] =
{
- { 0, 1, 1, 0, "BlackDensity", NULL }
+ { 0, 1, 1, 0, "BlackDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(f360_extended_black);
static const physical_subchannel_t photo_cyan_subchannels[] =
{
- { 2, 0, 0, 0, "CyanDensity", NULL },
- { 2, 1, 0, 0, "CyanDensity", "LightCyanTransition" }
+ { 2, 0, 0, 0, "CyanDensity", "LightCyanTransition", NULL, NULL },
+ { 2, 1, 0, 0, "CyanDensity", "LightCyanTransition", "LightCyanValue", "LightCyanScale" }
};
DECLARE_INK_CHANNEL(photo_cyan);
static const physical_subchannel_t extended_cyan_subchannels[] =
{
- { 2, 1, 0, 0, "CyanDensity", NULL }
+ { 2, 1, 0, 0, "CyanDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(extended_cyan);
static const physical_subchannel_t f360_extended_cyan_subchannels[] =
{
- { 2, 1, 1, 0, "CyanDensity", NULL }
+ { 2, 1, 1, 0, "CyanDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(f360_extended_cyan);
static const physical_subchannel_t photo_magenta_subchannels[] =
{
- { 1, 0, 0, 0, "MagentaDensity", NULL },
- { 1, 1, 0, 0, "MagentaDensity", "LightMagentaTransition" }
+ { 1, 0, 0, 0, "MagentaDensity", "LightMagentaTransition", NULL, NULL },
+ { 1, 1, 0, 0, "MagentaDensity", "LightMagentaTransition", "LightMagentaValue", "LightMagentaScale" }
};
DECLARE_INK_CHANNEL(photo_magenta);
static const physical_subchannel_t extended_magenta_subchannels[] =
{
- { 1, 1, 0, 0, "MagentaDensity", NULL }
+ { 1, 1, 0, 0, "MagentaDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(extended_magenta);
static const physical_subchannel_t f360_extended_magenta_subchannels[] =
{
- { 1, 1, 1, 0, "MagentaDensity", NULL }
+ { 1, 1, 1, 0, "MagentaDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(f360_extended_magenta);
static const physical_subchannel_t photo_yellow_subchannels[] =
{
- { 4, 0, 0, 0, "YellowDensity", NULL }
+ { 4, 0, 0, 0, "YellowDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(photo_yellow);
static const physical_subchannel_t f360_photo_yellow_subchannels[] =
{
- { 4, 0, 1, 0, "YellowDensity", NULL }
+ { 4, 0, 1, 0, "YellowDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(f360_photo_yellow);
static const physical_subchannel_t j_extended_yellow_subchannels[] =
{
- { 4, 2, 0, 0, "YellowDensity", NULL }
+ { 4, 2, 0, 0, "YellowDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(j_extended_yellow);
static const physical_subchannel_t extended_photo3_black_subchannels[] =
{
- { 0, 3, 0, 0, "BlackDensity", NULL }
+ { 0, 3, 0, 0, "BlackDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(extended_photo3_black);
static const physical_subchannel_t f360_extended_photo3_black_subchannels[] =
{
- { 0, 3, 1, 0, "BlackDensity", NULL }
+ { 0, 3, 1, 0, "BlackDensity", NULL, NULL, NULL }
};
DECLARE_INK_CHANNEL(f360_extended_photo3_black);
@@ -666,200 +666,200 @@ DECLARE_INK_CHANNEL(f360_extended_photo3_black);
/* For Japanese 7-color printers, with dark yellow */
static const physical_subchannel_t photo2_yellow_subchannels[] =
{
- { 4, 2, 0, 0, "YellowDensity", NULL },
- { 4, 0, 0, 0, "YellowDensity", "DarkYellowTransition" }
+ { 4, 2, 0, 0, "YellowDensity", "DarkYellowTransition", NULL, NULL },
+ { 4, 0, 0, 0, "YellowDensity", "DarkYellowTransition", "DarkYellowValue", "DarkYellowScale" }
};
DECLARE_INK_CHANNEL(photo2_yellow);
static const physical_subchannel_t f360_photo2_yellow_subchannels[] =
{
- { 4, 2, 0, 0, "YellowDensity", NULL },
- { 4, 0, 1, 0, "YellowDensity", "DarkYellowTransition" }
+ { 4, 2, 0, 0, "YellowDensity", "DarkYellowTransition", NULL, NULL },
+ { 4, 0, 1, 0, "YellowDensity", "DarkYellowTransition", "DarkYellowValue", "DarkYellowScale" }
};
DECLARE_INK_CHANNEL(f360_photo2_yellow);
static const physical_subchannel_t photo2_black_subchannels[] =
{
- { 0, 0, 0, 0, "BlackDensity", NULL },
- { 0, 1, 0, 0, "BlackDensity", "GrayTransition" }
+ { 0, 0, 0, 0, "BlackDensity", "GrayTransition", NULL, NULL },
+ { 0, 1, 0, 0, "BlackDensity", "GrayTransition", "GrayValue", "GrayScale" }
};
DECLARE_INK_CHANNEL(photo2_black);
static const physical_subchannel_t f360_photo2_black_subchannels[] =
{
- { 0, 0, 1, 0, "BlackDensity", NULL },
- { 0, 1, 0, 0, "BlackDensity", "GrayTransition" }
+ { 0, 0, 1, 0, "BlackDensity", "GrayTransition", NULL, NULL },
+ { 0, 1, 0, 0, "BlackDensity", "GrayTransition", "GrayValue", "GrayScale" }
};
DECLARE_INK_CHANNEL(f360_photo2_black);
static const physical_subchannel_t photo3_black_subchannels[] =
{
- { 0, 0, 0, 0, "BlackDensity", NULL },
- { 0, 1, 0, 0, "BlackDensity", "DarkGrayTransition" },
- { 0, 3, 0, 0, "BlackDensity", "LightGrayTransition" }
+ { 0, 0, 0, 0, "BlackDensity", "GrayTransition", NULL, NULL },
+ { 0, 1, 0, 0, "BlackDensity", "GrayTransition", "DarkGrayValue", "DarkGrayScale" },
+ { 0, 3, 0, 0, "BlackDensity", "GrayTransition", "LightGrayValue", "LightGrayScale" }
};
DECLARE_INK_CHANNEL(photo3_black);
static const physical_subchannel_t f360_photo3_black_subchannels[] =
{
- { 0, 0, 1, 0, "BlackDensity", NULL },
- { 0, 1, 0, 0, "BlackDensity", "DarkGrayTransition" },
- { 0, 3, 1, 0, "BlackDensity", "LightGrayTransition" }
+ { 0, 0, 1, 0, "BlackDensity", NULL, NULL, NULL },
+ { 0, 1, 0, 0, "BlackDensity", "DarkGrayTransition", "DarkGrayValue", "DarkGrayScale" },
+ { 0, 3, 1, 0, "BlackDensity", "LightGrayTransition", "LightGrayValue", "LightGrayScale" }
};
DECLARE_INK_CHANNEL(f360_photo3_black);
static const physical_subchannel_t quadtone_subchannels[] =
{
- { 0, -1, 0, 0, "BlackDensity", NULL },
- { 2, -1, 0, 0, "BlackDensity", "Gray3Transition" },
- { 1, -1, 0, 0, "BlackDensity", "Gray2Transition" },
- { 4, -1, 0, 0, "BlackDensity", "Gray1Transition" },
+ { 0, -1, 0, 0, "BlackDensity", "GrayTransition", NULL, NULL },
+ { 2, -1, 0, 0, "BlackDensity", "GrayTransition", "Gray3Value", "Gray3Scale" },
+ { 1, -1, 0, 0, "BlackDensity", "GrayTransition", "Gray2Value", "Gray2Scale" },
+ { 4, -1, 0, 0, "BlackDensity", "GrayTransition", "Gray1Value", "Gray1Scale" },
};
DECLARE_INK_CHANNEL(quadtone);
static const physical_subchannel_t c80_quadtone_subchannels[] =
{
- { 0, -1, 0, 0, "BlackDensity", NULL },
- { 2, -1, 0, 0, "BlackDensity", "Gray3Transition" },
- { 1, -1, 120, 0, "BlackDensity", "Gray2Transition" },
- { 4, -1, 240, 0, "BlackDensity", "Gray1Transition" },
+ { 0, -1, 0, 0, "BlackDensity", "GrayTransition", NULL, NULL },
+ { 2, -1, 0, 0, "BlackDensity", "GrayTransition", "Gray3Value", "Gray3Scale" },
+ { 1, -1, 120, 0, "BlackDensity", "GrayTransition", "Gray2Value", "Gray2Scale" },
+ { 4, -1, 240, 0, "BlackDensity", "GrayTransition", "Gray1Value", "Gray1Scale" },
};
DECLARE_INK_CHANNEL(c80_quadtone);
static const physical_subchannel_t c120_quadtone_subchannels[] =
{
- { 0, 4, 0, 0, "BlackDensity", NULL },
- { 2, -1, 0, 0, "BlackDensity", "Gray3Transition" },
- { 1, -1, 120, 0, "BlackDensity", "Gray2Transition" },
- { 4, -1, 240, 0, "BlackDensity", "Gray1Transition" },
+ { 0, 4, 0, 0, "BlackDensity", "GrayTransition", NULL, NULL },
+ { 2, -1, 0, 0, "BlackDensity", "GrayTransition", "Gray3Value", "Gray3Scale" },
+ { 1, -1, 120, 0, "BlackDensity", "GrayTransition", "Gray2Value", "Gray2Scale" },
+ { 4, -1, 240, 0, "BlackDensity", "GrayTransition", "Gray1Value", "Gray1Scale" },
};
DECLARE_INK_CHANNEL(c120_quadtone);
static const physical_subchannel_t c64_quadtone_subchannels[] =
{
- { 0, -1, 0, 0, "BlackDensity", NULL },
- { 2, -1, 0, 0, "BlackDensity", "Gray3Transition" },
- { 1, -1, 90, 0, "BlackDensity", "Gray2Transition" },
- { 4, -1, 180, 0, "BlackDensity", "Gray1Transition" },
+ { 0, -1, 0, 0, "BlackDensity", "GrayTransition", NULL, NULL },
+ { 2, -1, 0, 0, "BlackDensity", "Gray3Transition", "Gray3Value", "Gray3Scale" },
+ { 1, -1, 90, 0, "BlackDensity", "Gray2Transition", "Gray2Value", "Gray2Scale" },
+ { 4, -1, 180, 0, "BlackDensity", "Gray1Transition", "Gray1Value", "Gray1Scale" },
};
DECLARE_INK_CHANNEL(c64_quadtone);
static const physical_subchannel_t f360_quadtone_subchannels[] =
{
- { 0, -1, 0, 0, "BlackDensity", NULL },
- { 2, -1, 1, 0, "BlackDensity", "Gray3Transition" },
- { 1, -1, 1, 0, "BlackDensity", "Gray2Transition" },
- { 4, -1, 0, 0, "BlackDensity", "Gray1Transition" },
+ { 0, -1, 0, 0, "BlackDensity", "GrayTransition", NULL, NULL },
+ { 2, -1, 1, 0, "BlackDensity", "GrayTransition", "Gray3Value", "Gray3Scale" },
+ { 1, -1, 1, 0, "BlackDensity", "GrayTransition", "Gray2Value", "Gray2Scale" },
+ { 4, -1, 0, 0, "BlackDensity", "GrayTransition", "Gray1Value", "Gray1Scale" },
};
DECLARE_INK_CHANNEL(f360_quadtone);
static const physical_subchannel_t cx3650_quadtone_subchannels[] =
{
- { 0, -1, 0, 0, "BlackDensity", NULL },
- { 2, -1, 2, 0, "BlackDensity", "Gray3Transition" },
- { 1, -1, 1, 0, "BlackDensity", "Gray2Transition" },
- { 4, -1, 0, 0, "BlackDensity", "Gray1Transition" },
+ { 0, -1, 0, 0, "BlackDensity", "GrayTransition", NULL, NULL },
+ { 2, -1, 2, 0, "BlackDensity", "GrayTransition", "Gray3Value", "Gray3Scale" },
+ { 1, -1, 1, 0, "BlackDensity", "GrayTransition", "Gray2Value", "Gray2Scale" },
+ { 4, -1, 0, 0, "BlackDensity", "GrayTransition", "Gray1Value", "Gray1Scale" },
};
DECLARE_INK_CHANNEL(cx3650_quadtone);
static const physical_subchannel_t f360_photo_cyan_subchannels[] =
{
- { 2, 0, 1, 0, "CyanDensity", NULL },
- { 2, 1, 0, 0, "CyanDensity", "LightCyanTransition" }
+ { 2, 0, 1, 0, "CyanDensity", "LightCyanTransition", NULL, NULL },
+ { 2, 1, 0, 0, "CyanDensity", "LightCyanTransition", "LightCyanValue", "LightCyanScale" }
};
DECLARE_INK_CHANNEL(f360_photo_cyan);
static const physical_subchannel_t f360x_photo_cyan_subchannels[] =
{
- { 2, 0, 0, 0, "CyanDensity", NULL },
- { 2, 1, 1, 0, "CyanDensity", "LightCyanTransition" }
+ { 2, 0, 0, 0, "CyanDensity", "LightCyanTransition", NULL, NULL },
+ { 2, 1, 1, 0, "CyanDensity", "LightCyanTransition", "LightCyanValue", "LightCyanScale" }
};
DECLARE_INK_CHANNEL(f360x_photo_cyan);
static const physical_subchannel_t f360_photo_magenta_subchannels[] =
{
- { 1, 0, 1, 0, "MagentaDensity", NULL },
- { 1, 1, 0, 0, "MagentaDensity", "LightMagentaTransition" }
+ { 1, 0, 1, 0, "MagentaDensity", "LightMagentaTransition", NULL, NULL },
+ { 1, 1, 0, 0, "MagentaDensity", "LightMagentaTransition", "LightMagentaValue", "LightMagentaScale" }
};
DECLARE_INK_CHANNEL(f360_photo_magenta);
static const physical_subchannel_t f360x_photo_magenta_subchannels[] =
{
- { 1, 0, 0, 0, "MagentaDensity", NULL },
- { 1, 1, 1, 0, "MagentaDensity", "LightMagentaTransition" }
+ { 1, 0, 0, 0, "MagentaDensity", "LightMagentaTransition", NULL, NULL },
+ { 1, 1, 1, 0, "MagentaDensity", "LightMagentaTransition", "LightMagentaValue", "LightMagentaScale" }
};
DECLARE_INK_CHANNEL(f360x_photo_magenta);
static const physical_subchannel_t claria_black_subchannels[] =
{
- { 0, 0, 0, 0, "BlackDensity", NULL },
+ { 0, 0, 0, 0, "BlackDensity", NULL, NULL, NULL },
};
DECLARE_INK_CHANNEL(claria_black);
static const physical_subchannel_t claria_yellow_subchannels[] =
{
- { 4, 0, 2, 0, "YellowDensity", NULL },
+ { 4, 0, 2, 0, "YellowDensity", NULL, NULL, NULL },
};
DECLARE_INK_CHANNEL(claria_yellow);
static const physical_subchannel_t claria_cyan_subchannels[] =
{
- { 2, 0, 0, 0, "CyanDensity", NULL },
+ { 2, 0, 0, 0, "CyanDensity", NULL, NULL, NULL },
};
DECLARE_INK_CHANNEL(claria_cyan);
static const physical_subchannel_t claria_photo_cyan_subchannels[] =
{
- { 2, 0, 0, 0, "CyanDensity", NULL },
- { 2, 1, 2, 0, "CyanDensity", "LightCyanTransition" },
+ { 2, 0, 0, 0, "CyanDensity", "LightCyanTransition", NULL, NULL },
+ { 2, 1, 2, 0, "CyanDensity", "LightCyanTransition", "LightCyanValue", "LightCyanScale" },
};
DECLARE_INK_CHANNEL(claria_photo_cyan);
static const physical_subchannel_t extended_claria_cyan_subchannels[] =
{
- { 2, 1, 2, 0, "CyanDensity", "LightCyanTransition" },
+ { 2, 1, 2, 0, "CyanDensity", NULL, NULL, NULL },
};
DECLARE_INK_CHANNEL(extended_claria_cyan);
static const physical_subchannel_t claria_magenta_subchannels[] =
{
- { 1, 0, 2, 0, "MagentaDensity", NULL },
+ { 1, 0, 2, 0, "MagentaDensity", NULL, NULL, NULL },
};
DECLARE_INK_CHANNEL(claria_magenta);
static const physical_subchannel_t claria_photo_magenta_subchannels[] =
{
- { 1, 0, 2, 0, "MagentaDensity", NULL },
- { 1, 1, 0, 0, "MagentaDensity", "LightMagentaTransition" },
+ { 1, 0, 2, 0, "MagentaDensity", "LightMagentaTransition", NULL, NULL },
+ { 1, 1, 0, 0, "MagentaDensity", "LightMagentaTransition", "LightMagentaValue", "LightMagentaScale" },
};
DECLARE_INK_CHANNEL(claria_photo_magenta);
static const physical_subchannel_t extended_claria_magenta_subchannels[] =
{
- { 1, 1, 0, 0, "MagentaDensity", "LightMagentaTransition" },
+ { 1, 1, 0, 0, "MagentaDensity", NULL, NULL, NULL },
};
DECLARE_INK_CHANNEL(extended_claria_magenta);
@@ -1453,6 +1453,20 @@ static const escp2_inkname_t claria_four_color_standard_inkset =
&claria_cmyk_channel_set
};
+static const ink_channel_t *const four_color_picturemate_channels[] =
+{
+ &photo_black_channel, &picturemate_cyan_channel,
+ &picturemate_magenta_channel, &picturemate_yellow_channel
+};
+
+DECLARE_CHANNEL_SET(four_color_picturemate);
+
+static const escp2_inkname_t four_color_picturemate_inkset =
+{
+ "CMYK", N_("Four Color Photo"), INKSET_CMYK,
+ &four_color_picturemate_channel_set
+};
+
/*
****************************************************************
@@ -2116,6 +2130,12 @@ static const escp2_inkname_t claria_four_color_extended_inkset =
&claria_cmyk_channel_set
};
+static const escp2_inkname_t four_color_picturemate_extended_inkset =
+{
+ "PhysicalCMYK", N_("Four Color Raw"), INKSET_EXTENDED,
+ &four_color_picturemate_channel_set
+};
+
static const escp2_inkname_t four_color_r800_extended_inkset =
{
"PhysicalCMYKGloss", N_("Four Color Raw"), INKSET_EXTENDED,
@@ -2795,14 +2815,25 @@ static const escp2_inkname_t *const cmykrb_photo_ink_types[] =
DECLARE_INKLIST("cmykrbphoto", cmykrb_photo, cmykrb_photo,
N_("Photo Black"), r800, r800_photo, standard);
-static const escp2_inkname_t *const picturemate_photo_ink_types[] =
+static const escp2_inkname_t *const picturemate_6_photo_ink_types[] =
{
&six_color_picturemate_inkset,
+ &four_color_picturemate_inkset,
&six_color_picturemate_extended_inkset,
+ &four_color_picturemate_extended_inkset,
+};
+
+DECLARE_INKLIST("picturemate_6", picturemate_6, picturemate_6_photo,
+ N_("Standard"), picturemate, picturemate_6, standard);
+
+static const escp2_inkname_t *const picturemate_4_photo_ink_types[] =
+{
+ &four_color_picturemate_inkset,
+ &four_color_picturemate_extended_inkset,
};
-DECLARE_INKLIST("picturemate", picturemate, picturemate_photo,
- N_("Standard"), picturemate, picturemate, standard);
+DECLARE_INKLIST("picturemate_4", picturemate_4, picturemate_4_photo,
+ N_("Standard"), picturemate, picturemate_4, standard);
#define DECLARE_INKGROUP(name) \
@@ -2968,12 +2999,19 @@ static const inklist_t *const cmykrb_group[] =
DECLARE_INKGROUP(cmykrb);
-static const inklist_t *const picturemate_group[] =
+static const inklist_t *const picturemate_4_group[] =
{
- &picturemate_inklist,
+ &picturemate_4_inklist,
};
-DECLARE_INKGROUP(picturemate);
+DECLARE_INKGROUP(picturemate_4);
+
+static const inklist_t *const picturemate_6_group[] =
+{
+ &picturemate_6_inklist,
+};
+
+DECLARE_INKGROUP(picturemate_6);
static const inklist_t *const claria_group[] =
{
@@ -3010,7 +3048,8 @@ static const ink_t the_inks[] =
{ "f360_ultrachrome", &f360_ultrachrome_inkgroup },
{ "f360_ultrachrome_k3", &f360_ultrachrome_k3_inkgroup },
{ "cmykrb", &cmykrb_inkgroup },
- { "picturemate", &picturemate_inkgroup },
+ { "picturemate_6", &picturemate_6_inkgroup },
+ { "picturemate_4", &picturemate_4_inkgroup },
{ "claria", &claria_inkgroup },
};
@@ -3172,7 +3211,7 @@ static const char *r800_channel_names[] =
DECLARE_CHANNEL_LIST(r800);
-static const char *picturemate_channel_names[] =
+static const char *picturemate_6_channel_names[] =
{
N_("Yellow"),
N_("Magenta"),
@@ -3182,7 +3221,17 @@ static const char *picturemate_channel_names[] =
N_("Blue"),
};
-DECLARE_CHANNEL_LIST(picturemate);
+DECLARE_CHANNEL_LIST(picturemate_6);
+
+static const char *picturemate_4_channel_names[] =
+{
+ N_("Yellow"),
+ N_("Magenta"),
+ N_("Cyan"),
+ N_("Black"),
+};
+
+DECLARE_CHANNEL_LIST(picturemate_4);
static const char *r2400_channel_names[] =
{
@@ -3209,7 +3258,8 @@ static const channel_t the_channels[] =
{ "cx3800", &cx3800_channel_name_list },
{ "mfp2005", &mfp2005_channel_name_list },
{ "photo", &photo_channel_name_list },
- { "picturemate", &picturemate_channel_name_list },
+ { "picturemate_6", &picturemate_6_channel_name_list },
+ { "picturemate_4", &picturemate_4_channel_name_list },
{ "pm_950c", &pm_950c_channel_name_list },
{ "r2400", &r2400_channel_name_list },
{ "sp1400", &sp1400_channel_name_list },
diff --git a/src/main/escp2-driver.c b/src/main/escp2-driver.c
index 4e0ecbd..af8e005 100644
--- a/src/main/escp2-driver.c
+++ b/src/main/escp2-driver.c
@@ -1,5 +1,5 @@
/*
- * "$Id: escp2-driver.c,v 1.30.6.3 2007/12/30 05:37:55 rlk Exp $"
+ * "$Id: escp2-driver.c,v 1.38 2007/12/30 05:38:44 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
diff --git a/src/main/escp2-inks.c b/src/main/escp2-inks.c
index e3d93a6..b772744 100644
--- a/src/main/escp2-inks.c
+++ b/src/main/escp2-inks.c
@@ -1,5 +1,5 @@
/*
- * "$Id: escp2-inks.c,v 1.46.10.3 2007/12/29 20:42:26 rlk Exp $"
+ * "$Id: escp2-inks.c,v 1.62 2008/02/03 03:41:43 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
@@ -152,21 +152,21 @@ static const escp2_dropsize_t escp2_r300_2880_1440_dropsizes =
* and 0x25. The economy settings (0x10 and 0x0) don't provide any
* bigger drops. We get quite smooth output at 720x360 and 360 DPI, and
* even 360x180 is surprisingly smooth.
- * Roy Harrington estimates the drop sizes are:
+ * Roy Harrington's estimates in first column; my remeasurements in second:
*
- * 1 1.5 pl
- * 2 2.4 pl
- * 3 6.3 pl
- * 4 12 pl (rlk estimate)
- * 5 21 pl
+ * 1 1.5 pl 1.5 pl
+ * 2 2.4 pl 1.8 pl
+ * 3 6.3 pl 4.5 pl
+ * 4 12 pl (rlk estimate) 8.0 pl
+ * 5 21 pl 11 pl (+/- 1 pl)
*/
static const escp2_dropsize_t escp2_claria_720_dropsizes =
- { "claria_720", 3, { 0.071, 0.3, 1.0 } };
+ { "claria_720", 3, { 0.125, 0.42, 1.0 } };
static const escp2_dropsize_t escp2_claria_1440_dropsizes =
- { "claria_1440", 3, { 0.23, 0.37, 1.0 } };
+ { "claria_1440", 3, { 0.338, 0.40, 1.0 } };
static const escp2_dropsize_t escp2_claria_2880_dropsizes =
- { "claria_2880", 2, { 0.62, 1.0 } };
+ { "claria_2880", 2, { 0.833, 1.0 } };
static const escp2_dropsize_t escp2_claria_5760_dropsizes =
{ "claria_5760", 1, { 1.0 } };
@@ -183,13 +183,13 @@ static const escp2_dropsize_t escp2_claria_5760_dropsizes =
*/
static const escp2_dropsize_t escp2_claria_1400_720_dropsizes =
- { "claria_1400_720", 3, { 0.3, 0.57, 1.0 } };
+ { "claria_1400_720", 3, { 0.42, 0.67, 1.0 } };
static const escp2_dropsize_t escp2_claria_1400_1440_720_dropsizes =
- { "claria_1400_1440_720", 3, { 0.071, 0.3, 1.0 } };
+ { "claria_1400_1440_720", 3, { 0.125, 0.42, 1.0 } };
static const escp2_dropsize_t escp2_claria_1400_1440_dropsizes =
- { "claria_1400_1440", 3, { 0.23, 0.37, 1.0 } };
+ { "claria_1400_1440", 3, { 0.338, 0.40, 1.0 } };
static const escp2_dropsize_t escp2_claria_1400_2880_dropsizes =
- { "claria_1400_2880", 2, { 0.62, 1.0 } };
+ { "claria_1400_2880", 2, { 0.833, 1.0 } };
static const escp2_dropsize_t escp2_claria_1400_5760_dropsizes =
{ "claria_1400_5760", 1, { 1.0 } };
@@ -376,7 +376,7 @@ static const escp2_drop_list_t claria_drops =
&escp2_claria_720_dropsizes,
&escp2_claria_720_dropsizes,
&escp2_claria_720_dropsizes,
- &escp2_claria_1440_dropsizes,
+ &escp2_claria_720_dropsizes,
&escp2_claria_1440_dropsizes,
&escp2_claria_2880_dropsizes,
&escp2_claria_5760_dropsizes,
@@ -389,7 +389,7 @@ static const escp2_drop_list_t claria_1400_drops =
&escp2_claria_1400_720_dropsizes,
&escp2_claria_1400_720_dropsizes,
&escp2_claria_1400_1440_720_dropsizes,
- &escp2_claria_1400_1440_dropsizes,
+ &escp2_claria_1400_1440_720_dropsizes,
&escp2_claria_1400_1440_dropsizes,
&escp2_claria_1400_2880_dropsizes,
&escp2_claria_1400_5760_dropsizes,
diff --git a/src/main/escp2-papers.c b/src/main/escp2-papers.c
index 1cdc837..42a9fe5 100644
--- a/src/main/escp2-papers.c
+++ b/src/main/escp2-papers.c
@@ -1,5 +1,5 @@
/*
- * "$Id: escp2-papers.c,v 1.99.8.3 2007/12/29 20:42:26 rlk Exp $"
+ * "$Id: escp2-papers.c,v 1.108 2008/02/27 00:43:37 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
@@ -1194,7 +1194,7 @@ static const paper_adjustment_t r800_matte_adjustments[] =
DECLARE_PAPER_ADJUSTMENTS(r800_matte);
-static const paper_adjustment_t picturemate_adjustments[] =
+static const paper_adjustment_t picturemate_6_adjustments[] =
{
{ "GlossyPhoto", 1.00, 1, 1, .02, 2.0, .882, 1, .250, 1, 1, 0.92,
r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj },
@@ -1202,7 +1202,17 @@ static const paper_adjustment_t picturemate_adjustments[] =
r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj },
};
-DECLARE_PAPER_ADJUSTMENTS(picturemate);
+DECLARE_PAPER_ADJUSTMENTS(picturemate_6);
+
+static const paper_adjustment_t picturemate_4_adjustments[] =
+{
+ { "GlossyPhoto", 1.00, 1, 1, .02, 2.0, .882, 1, .250, 1, 1, 0.92,
+ r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj },
+ { "Other", 0.878, .1, 1, .02, 2.0, .882, 1, .250, 1, 1, 1.0,
+ r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj },
+};
+
+DECLARE_PAPER_ADJUSTMENTS(picturemate_4);
static const paper_adjustment_t durabrite_adjustments[] =
{
@@ -1674,7 +1684,8 @@ static const paperadj_t the_adjustments[] =
{ "ultrachrome_k3_matte", &ultrachrome_k3_matte_paper_adjustment_list },
{ "r800_photo", &r800_photo_paper_adjustment_list },
{ "r800_matte", &r800_matte_paper_adjustment_list },
- { "picturemate", &picturemate_paper_adjustment_list },
+ { "picturemate_4", &picturemate_4_paper_adjustment_list },
+ { "picturemate_6", &picturemate_6_paper_adjustment_list },
{ "claria", &claria_paper_adjustment_list },
};
diff --git a/src/main/escp2-resolutions.c b/src/main/escp2-resolutions.c
index 17a480a..76d8313 100644
--- a/src/main/escp2-resolutions.c
+++ b/src/main/escp2-resolutions.c
@@ -1,5 +1,5 @@
/*
- * "$Id: escp2-resolutions.c,v 1.33.8.3 2007/12/15 20:35:44 rlk Exp $"
+ * "$Id: escp2-resolutions.c,v 1.44 2008/02/24 04:08:05 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
@@ -647,6 +647,21 @@ static const quality_t standard_qualities[] =
DECLARE_QUALITY_LIST(standard);
+static const quality_t v2880_qualities[] =
+{
+ { "FastEconomy", N_("Fast Economy"), 180, 90, 360, 120, 360, 90 },
+ { "Economy", N_("Economy"), 360, 180, 360, 240, 360, 180 },
+ { "Draft", N_("Draft"), 360, 360, 360, 360, 360, 360 },
+ { "Standard", N_("Standard"), 0, 0, 0, 0, 720, 360 },
+ { "High", N_("High"), 0, 0, 0, 0, 720, 720 },
+ { "Photo", N_("Photo"), 1440, 720, 2880, 720, 1440, 720 },
+ { "HighPhoto", N_("Super Photo"), 1440, 1440, 2880, 1440, 1440, 1440 },
+ { "UltraPhoto", N_("Ultra Photo"), 2880, 2880, 2880, 2880, 2880, 2880 },
+ { "Best", N_("Best"), 720, 360, 0, 0, -1, -1 },
+};
+
+DECLARE_QUALITY_LIST(v2880);
+
static const quality_t p1_5_qualities[] =
{
{ "FastEconomy", N_("Fast Economy"), 180, 90, 360, 120, 360, 90 },
@@ -686,6 +701,7 @@ static const qual_t the_qualities[] =
{ "standard", &standard_quality_list },
{ "p1_5", &p1_5_quality_list },
{ "picturemate", &picturemate_quality_list },
+ { "v2880", &v2880_quality_list },
};
const quality_list_t *
diff --git a/src/main/module.c b/src/main/module.c
index f2fdfe6..83d9037 100644
--- a/src/main/module.c
+++ b/src/main/module.c
@@ -1,5 +1,5 @@
/*
- * "$Id: module.c,v 1.25 2004/09/17 18:38:21 rleigh Exp $"
+ * "$Id: module.c,v 1.26 2006/09/28 15:40:05 m0m Exp $"
*
* Gutenprint module loader - load modules with libltdl/libdl.
*
@@ -62,7 +62,7 @@ extern stp_module_t print_escp2_LTX_stp_module_data;
extern stp_module_t print_lexmark_LTX_stp_module_data;
extern stp_module_t print_pcl_LTX_stp_module_data;
extern stp_module_t print_ps_LTX_stp_module_data;
-extern stp_module_t print_olympus_LTX_stp_module_data;
+extern stp_module_t print_dyesub_LTX_stp_module_data;
extern stp_module_t print_raw_LTX_stp_module_data;
extern stp_module_t color_traditional_LTX_stp_module_data;
@@ -76,7 +76,7 @@ static stp_module_t *static_modules[] =
&print_escp2_LTX_stp_module_data,
&print_pcl_LTX_stp_module_data,
&print_lexmark_LTX_stp_module_data,
- &print_olympus_LTX_stp_module_data,
+ &print_dyesub_LTX_stp_module_data,
&print_raw_LTX_stp_module_data,
&color_traditional_LTX_stp_module_data,
NULL
diff --git a/src/main/papers.xml b/src/main/papers.xml
index 97b6a40..6aff8fe 100644
--- a/src/main/papers.xml
+++ b/src/main/papers.xml
@@ -4,7 +4,7 @@
XML description of papers known to libgutenprint.
It should be edited by hand.
- "$Id: papers.xml,v 1.21.8.2 2007/12/15 20:35:44 rlk Exp $"
+ "$Id: papers.xml,v 1.28 2008/04/15 00:08:20 rlk Exp $"
-->
<!--
@@ -81,6 +81,12 @@
<height value="360"/>
<unit value="english-extended"/>
</paper>
+ <paper name="w252h360">
+ <description value="3 1/2 x5"/>
+ <width value="252"/>
+ <height value="360"/>
+ <unit value="english-extended"/>
+ </paper>
<paper name="w288h432">
<description value="4x6"/>
<width value="288"/>
@@ -581,6 +587,15 @@
<width value="2599"/>
<height value="3676"/>
<unit value="metric-extended"/>
+ <type value="envelope"/>
+ </paper>
+ <paper name="C0_l">
+ <description value="C0 landscape"/>
+ <comment value="917mm x 1297mm landscape"/>
+ <width value="3676"/>
+ <height value="2599"/>
+ <unit value="metric-extended"/>
+ <type value="envelope"/>
</paper>
<paper name="C1">
<description value="C1"/>
@@ -588,6 +603,15 @@
<width value="1836"/>
<height value="2599"/>
<unit value="metric-extended"/>
+ <type value="envelope"/>
+ </paper>
+ <paper name="C1_l">
+ <description value="C1 landscape"/>
+ <comment value="648mm x 917mm landscape"/>
+ <width value="2599"/>
+ <height value="1836"/>
+ <unit value="metric-extended"/>
+ <type value="envelope"/>
</paper>
<paper name="C2">
<description value="C2"/>
@@ -595,6 +619,15 @@
<width value="1298"/>
<height value="1836"/>
<unit value="metric-extended"/>
+ <type value="envelope"/>
+ </paper>
+ <paper name="C2_l">
+ <description value="C2 landscape"/>
+ <comment value="458mm x 648mm landscape"/>
+ <width value="1836"/>
+ <height value="1298"/>
+ <unit value="metric-extended"/>
+ <type value="envelope"/>
</paper>
<paper name="C3">
<description value="C3"/>
@@ -602,6 +635,15 @@
<width value="918"/>
<height value="1298"/>
<unit value="metric-extended"/>
+ <type value="envelope"/>
+ </paper>
+ <paper name="C3_l">
+ <description value="C3 landscape"/>
+ <comment value="324mm x 458mm landscape"/>
+ <width value="1298"/>
+ <height value="918"/>
+ <unit value="metric-extended"/>
+ <type value="envelope"/>
</paper>
<paper name="C4">
<description value="C4"/>
@@ -609,6 +651,15 @@
<width value="649"/>
<height value="918"/>
<unit value="metric-extended"/>
+ <type value="envelope"/>
+ </paper>
+ <paper name="C4_l">
+ <description value="C4 landscape"/>
+ <comment value="229mm x 324mm landscape"/>
+ <width value="918"/>
+ <height value="649"/>
+ <unit value="metric-extended"/>
+ <type value="envelope"/>
</paper>
<paper name="C5">
<description value="C5"/>
@@ -616,6 +667,15 @@
<width value="459"/>
<height value="649"/>
<unit value="metric-extended"/>
+ <type value="envelope"/>
+ </paper>
+ <paper name="C5_l">
+ <description value="C5 landscape"/>
+ <comment value="162mm x 229mm landscape"/>
+ <width value="649"/>
+ <height value="459"/>
+ <unit value="metric-extended"/>
+ <type value="envelope"/>
</paper>
<paper name="w354h918">
<description value="B6-C4"/>
@@ -623,6 +683,15 @@
<width value="354"/>
<height value="918"/>
<unit value="metric-extended"/>
+ <type value="envelope"/>
+ </paper>
+ <paper name="w354h918_l">
+ <description value="B6-C4 landscape"/>
+ <comment value="125mm x 324mm landscape"/>
+ <width value="918"/>
+ <height value="354"/>
+ <unit value="metric-extended"/>
+ <type value="envelope"/>
</paper>
<paper name="C6">
<description value="C6"/>
@@ -630,6 +699,15 @@
<width value="323"/>
<height value="459"/>
<unit value="metric-extended"/>
+ <type value="envelope"/>
+ </paper>
+ <paper name="C6_l">
+ <description value="C6 landscape"/>
+ <comment value="114mm x 162mm landscape"/>
+ <width value="459"/>
+ <height value="323"/>
+ <unit value="metric-extended"/>
+ <type value="envelope"/>
</paper>
<paper name="DL">
<description value="DL"/>
@@ -637,6 +715,15 @@
<width value="311"/>
<height value="623"/>
<unit value="metric-extended"/>
+ <type value="envelope"/>
+ </paper>
+ <paper name="DL_l">
+ <description value="DL landscape"/>
+ <comment value="110mm x 220mm landscape"/>
+ <width value="623"/>
+ <height value="311"/>
+ <unit value="metric-extended"/>
+ <type value="envelope"/>
</paper>
<paper name="w229h459">
<description value="C7-6"/>
@@ -644,6 +731,15 @@
<width value="229"/>
<height value="459"/>
<unit value="metric-extended"/>
+ <type value="envelope"/>
+ </paper>
+ <paper name="w229h459_l">
+ <description value="C7-6 landscape"/>
+ <comment value="81mm x 162mm landscape"/>
+ <width value="459"/>
+ <height value="229"/>
+ <unit value="metric-extended"/>
+ <type value="envelope"/>
</paper>
<paper name="C7">
<description value="C7"/>
@@ -651,6 +747,15 @@
<width value="229"/>
<height value="323"/>
<unit value="metric-extended"/>
+ <type value="envelope"/>
+ </paper>
+ <paper name="C7_l">
+ <description value="C7 landscape"/>
+ <comment value="81mm x 114mm landscape"/>
+ <width value="323"/>
+ <height value="229"/>
+ <unit value="metric-extended"/>
+ <type value="envelope"/>
</paper>
<paper name="C8">
<description value="C8"/>
@@ -658,6 +763,15 @@
<width value="161"/>
<height value="229"/>
<unit value="metric-extended"/>
+ <type value="envelope"/>
+ </paper>
+ <paper name="C8_l">
+ <description value="C8 landscape"/>
+ <comment value="57mm x 81mm landscape"/>
+ <width value="229"/>
+ <height value="161"/>
+ <unit value="metric-extended"/>
+ <type value="envelope"/>
</paper>
<paper name="C9">
<description value="C9"/>
@@ -665,6 +779,15 @@
<width value="113"/>
<height value="161"/>
<unit value="metric-extended"/>
+ <type value="envelope"/>
+ </paper>
+ <paper name="C9_l">
+ <description value="C9 landscape"/>
+ <comment value="40mm x 57mm landscape"/>
+ <width value="161"/>
+ <height value="113"/>
+ <unit value="metric-extended"/>
+ <type value="envelope"/>
</paper>
<paper name="C10">
<description value="C10"/>
@@ -672,6 +795,15 @@
<width value="79"/>
<height value="113"/>
<unit value="metric-extended"/>
+ <type value="envelope"/>
+ </paper>
+ <paper name="C10_l">
+ <description value="C10 landscape"/>
+ <comment value="28mm x 40mm landscape"/>
+ <width value="113"/>
+ <height value="79"/>
+ <unit value="metric-extended"/>
+ <type value="envelope"/>
</paper>
<!-- GROUP: US CAD -->
<!--
@@ -894,18 +1026,42 @@
<width value="340"/>
<height value="666"/>
<unit value="metric-extended"/>
+ <type value="envelope"/>
+ </paper>
+ <paper name="w340h666_l">
+ <description value="Japanese long envelope #3 landscape"/>
+ <width value="666"/>
+ <height value="340"/>
+ <unit value="metric-extended"/>
+ <type value="envelope"/>
</paper>
<paper name="w255h581">
<description value="Japanese long envelope #4"/>
<width value="255"/>
<height value="581"/>
<unit value="metric-extended"/>
+ <type value="envelope"/>
+ </paper>
+ <paper name="w255h581_l">
+ <description value="Japanese long envelope #4 landscape"/>
+ <width value="581"/>
+ <height value="255"/>
+ <unit value="metric-extended"/>
+ <type value="envelope"/>
</paper>
<paper name="w680h941">
<description value="Japanese Kaku envelope #4"/>
<width value="680"/>
<height value="941"/>
<unit value="metric-extended"/>
+ <type value="envelope"/>
+ </paper>
+ <paper name="w680h941_l">
+ <description value="Japanese Kaku envelope #4 landscape"/>
+ <width value="941"/>
+ <height value="680"/>
+ <unit value="metric-extended"/>
+ <type value="envelope"/>
</paper>
<paper name="COM10">
<description value="Commercial 10"/>
@@ -913,6 +1069,15 @@
<width value="297"/>
<height value="684"/>
<unit value="english-extended"/>
+ <type value="envelope"/>
+ </paper>
+ <paper name="COM10_l">
+ <description value="Commercial 10 landscape"/>
+ <comment value="US Commercial 10 env landscape"/>
+ <width value="684"/>
+ <height value="297"/>
+ <unit value="english-extended"/>
+ <type value="envelope"/>
</paper>
<paper name="w315h414">
<description value="A2 Invitation"/>
@@ -927,6 +1092,15 @@
<width value="279"/>
<height value="540"/>
<unit value="english-extended"/>
+ <type value="envelope"/>
+ </paper>
+ <paper name="Monarch_l">
+ <description value="Monarch Envelope landscape"/>
+ <comment value="3.875in x 7.5in landscape"/>
+ <width value="540"/>
+ <height value="279"/>
+ <unit value="english-extended"/>
+ <type value="envelope"/>
</paper>
<paper name="w288h387">
<description value="4x5 3/8"/>
@@ -949,7 +1123,7 @@
</paper>
<paper name="w155h244">
<description value="Card"/>
- <comment value="86mm x 54mm"/>
+ <comment value="54mm x 86mm"/>
<width value="155"/>
<height value="244"/>
<unit value="metric-extended"/>
diff --git a/src/main/print-canon.c b/src/main/print-canon.c
index 5df9c9f..9a2080d 100644
--- a/src/main/print-canon.c
+++ b/src/main/print-canon.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-canon.c,v 1.190.2.5 2007/12/29 20:42:27 rlk Exp $"
+ * "$Id: print-canon.c,v 1.226 2008/04/20 13:39:16 faust3 Exp $"
*
* Print plug-in CANON BJL driver for the GIMP.
*
@@ -1579,6 +1579,8 @@ static int canon_setup_channel(stp_vars_t *v,canon_privdata_t* privdata,int chan
/* setup the dither channels */
static void canon_setup_channels(stp_vars_t *v,canon_privdata_t* privdata){
+ /* (in gutenprint notation) => KCMY, 1230 => CMYK etc. */
+ const char default_channel_order[STP_NCOLORS] = {0,1,2,3};
/* codes for the primary channels */
const char primary[STP_NCOLORS] = {'K','C','M','Y',};
/* codes for the subchannels */
@@ -1588,15 +1590,23 @@ static void canon_setup_channels(stp_vars_t *v,canon_privdata_t* privdata){
const char *secondary_density_control[STP_NCOLORS] = {NULL,"LightCyanTransition","LightMagentaTransition","LightYellowTransition"};
/* ink darkness for every channel */
const double ink_darkness[] = {1.0, 0.31 / .5, 0.61 / .97, 0.08};
+ const char* channel_order = default_channel_order;
+
+
int channel;
+ int channel_idx;
+
+ if(privdata->caps->channel_order)
+ channel_order = privdata->caps->channel_order;
/* loop through the dither channels */
- for(channel=0; channel < STP_NCOLORS ; channel++){
+ for(channel_idx = 0; channel_idx < STP_NCOLORS ; channel_idx++){
int i;
unsigned int subchannel = 0;
stp_shade_t* shades = NULL;
+ channel = channel_order[channel_idx];
if(channel == STP_ECOLOR_K && privdata->used_inks & CANON_INK_K_MASK){ /* black channel */
/* find K and k inks */
for(i=0;i<privdata->mode->num_inks;i++){
@@ -2114,6 +2124,11 @@ canon_do_print(stp_vars_t *v, stp_image_t *image)
canon_deinit_printer(v, &privdata);
+ /* canon_end_job does not get called for jobmode automatically */
+ if(!stp_get_string_parameter(v, "JobMode") ||
+ strcmp(stp_get_string_parameter(v, "JobMode"), "Page") == 0){
+ canon_end_job(v,image);
+ }
for(i=0;i< privdata.num_channels;i++)
if(privdata.channels[i].buf)
diff --git a/src/main/print-color.c b/src/main/print-color.c
index b6ffabd..0c7e592 100644
--- a/src/main/print-color.c
+++ b/src/main/print-color.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-color.c,v 1.135.8.2 2007/12/15 20:35:45 rlk Exp $"
+ * "$Id: print-color.c,v 1.139 2008/01/25 00:38:32 rlk Exp $"
*
* Gutenprint color management module - traditional Gutenprint algorithm.
*
@@ -416,6 +416,14 @@ static const float_param_t float_parameters[] =
RAW_GAMMA_CHANNEL(29),
RAW_GAMMA_CHANNEL(30),
RAW_GAMMA_CHANNEL(31),
+ {
+ {
+ "LUTDumpFile", N_("LUT dump file"), N_("Advanced Output Control"),
+ N_("Dump file for LUT for external color adjustment"),
+ STP_PARAMETER_TYPE_FILE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, -1, 1, 0
+ }, 0.0, 0.0, 0.0, CMASK_EVERY, 0, -1
+ },
};
static const int float_parameter_count =
@@ -1223,6 +1231,69 @@ setup_channel(stp_vars_t *v, int i, const channel_param_t *p)
compute_one_lut(lut, i);
}
+static void
+stpi_print_lut_curve(FILE *fp, const char *text, stp_cached_curve_t *c,
+ int reverse)
+{
+ if (stp_curve_cache_get_curve(c))
+ {
+ fprintf(fp, "%s: '", text);
+ if (reverse)
+ {
+ stp_curve_t *rev = stp_curve_create_reverse(stp_curve_cache_get_curve(c));
+ stp_curve_write(fp, rev);
+ stp_curve_destroy(rev);
+ }
+ else
+ stp_curve_write(fp, stp_curve_cache_get_curve(c));
+ fprintf(fp, "'\n");
+ }
+}
+
+static void
+stpi_do_dump_lut_to_file(stp_vars_t *v, FILE *fp)
+{
+ int i;
+ lut_t *lut = (lut_t *)(stp_get_component_data(v, "Color"));
+ const stp_curve_t *curve;
+ fprintf(fp, "Gutenprint LUT dump version 0\n\n");
+ fprintf(fp, "Input color description: '%s'\n", lut->input_color_description->name);
+ fprintf(fp, "Output color description: '%s'\n", lut->output_color_description->name);
+ fprintf(fp, "Color correction type: '%s'\n", lut->color_correction->name);
+ fprintf(fp, "Ink limit: %f\n", stp_get_float_parameter(v, "InkLimit"));
+ stpi_print_lut_curve(fp, "Brightness correction", &(lut->brightness_correction), 0);
+ stpi_print_lut_curve(fp, "Contrast correction", &(lut->contrast_correction), 0);
+ stpi_print_lut_curve(fp, "User color correction", &(lut->user_color_correction), 0);
+ for (i = 0; i < STP_CHANNEL_LIMIT; i++)
+ {
+ char buf[64];
+ sprintf(buf, "Channel %d curve", i);
+ stpi_print_lut_curve(fp, buf, &(lut->channel_curves[i]),
+ lut->invert_output && ! channel_is_synthesized(lut, i));
+ }
+ curve = stp_channel_get_gcr_curve(v);
+ if (curve)
+ {
+ fprintf(fp, "GCR curve: '");
+ stp_curve_write(fp, curve);
+ fprintf(fp, "'\n");
+ }
+}
+
+static void
+stpi_dump_lut_to_file(stp_vars_t *v, const char *dump_file)
+{
+ FILE *fp;
+ if (!dump_file)
+ return;
+ fp = fopen(dump_file, "w");
+ if (fp)
+ {
+ stp_dprintf(STP_DBG_LUT, v, "Dumping LUT to %s\n", dump_file);
+ stpi_do_dump_lut_to_file(v, fp);
+ (void) fclose(fp);
+ }
+}
static void
stpi_compute_lut(stp_vars_t *v)
@@ -1326,6 +1397,8 @@ stpi_compute_lut(stp_vars_t *v)
lut->input_color_description->color_id == COLOR_ID_RGB ||
lut->input_color_description->color_id == COLOR_ID_CMY))
initialize_gcr_curve(v);
+ if (stp_check_file_parameter(v, "LUTDumpFile", STP_PARAMETER_ACTIVE))
+ stpi_dump_lut_to_file(v, stp_get_file_parameter(v, "LUTDumpFile"));
}
static int
diff --git a/src/main/print-dither-matrices.c b/src/main/print-dither-matrices.c
index 0d30cbb..a6fc6df 100644
--- a/src/main/print-dither-matrices.c
+++ b/src/main/print-dither-matrices.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-dither-matrices.c,v 1.36 2006/03/19 00:19:09 rlk Exp $"
+ * "$Id: print-dither-matrices.c,v 1.37 2008/02/18 14:20:17 rlk Exp $"
*
* Print plug-in driver utility functions for the GIMP.
*
@@ -380,7 +380,6 @@ postinit_matrix(stp_vars_t *v, int x_shear, int y_shear)
x_n * i, y_n * j);
color++;
}
- stp_dither_set_transition(v, d->transition);
}
void
@@ -435,11 +434,7 @@ stp_dither_set_transition(stp_vars_t *v, double exponent)
unsigned y_n = d->dither_matrix.y_size / rc;
for (i = 0; i < CHANNEL_COUNT(d); i++)
stp_dither_matrix_destroy(&(CHANNEL(d, i).pick));
- stp_dither_matrix_destroy(&(d->transition_matrix));
- stp_dither_matrix_copy(&(d->dither_matrix), &(d->transition_matrix));
- d->transition = exponent;
if (exponent < .999 || exponent > 1.001)
- stp_dither_matrix_scale_exponentially(&(d->transition_matrix), exponent);
for (i = 0; i < rc; i++)
for (j = 0; j < rc; j++)
if (color < CHANNEL_COUNT(d))
diff --git a/src/main/print-escp2-data.c b/src/main/print-escp2-data.c
index e8aa6c4..9a7ff60 100644
--- a/src/main/print-escp2-data.c
+++ b/src/main/print-escp2-data.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-escp2-data.c,v 1.202.6.4 2007/12/29 20:42:27 rlk Exp $"
+ * "$Id: print-escp2-data.c,v 1.246 2008/02/27 00:43:37 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
@@ -80,10 +80,10 @@ static const escp2_dot_size_t p1_5pl_dotsizes =
{ 0x10, 0x10, 0x10, 0x11, 0x12, 0x13, 0x13, 0x13, 0x13 };
static const escp2_dot_size_t claria_dotsizes =
-{ 0x33, 0x33, 0x24, 0x24, 0x24, 0x25, 0x25, 0x25, 0x25 };
+{ 0x33, 0x33, 0x24, 0x24, 0x24, 0x24, 0x25, 0x25, 0x25 };
static const escp2_dot_size_t claria_1400_dotsizes =
-{ 0x33, 0x33, 0x21, 0x21, 0x33, 0x25, 0x25, 0x25, 0x25 };
+{ 0x33, 0x33, 0x21, 0x21, 0x33, 0x33, 0x25, 0x25, 0x25 };
static const escp2_dot_size_t c2pl_dotsizes =
{ 0x12, 0x12, 0x12, 0x11, 0x13, -1, 0x10, 0x10, 0x10 };
@@ -208,7 +208,7 @@ static const escp2_base_resolutions_t c1_5_base_res =
{ 360, 360, 720, 720, 720, 720, 720, 720, 720 };
static const escp2_base_resolutions_t claria_1400_base_res =
-{ 360, 360, 720, 720, 360, 720, 720, 720, 720 };
+{ 360, 360, 720, 720, 360, 360, 720, 720, 720 };
static const escp2_base_resolutions_t stc900_base_res =
{ 360, 360, 360, 360, 180, 180, 360, 360, 360 };
@@ -269,10 +269,10 @@ static const escp2_densities_t p1_5pl_densities =
{ 2.8, 1.4, 1.00, 1.000, 0.869, 0.942, 0.471, 0.500, 0.530 };
static const escp2_densities_t claria_densities =
-{ 2.8, 1.4, 2.00, 1.000, 0.500, 0.812, 0.406, 0.546, 0.440 };
+{ 4.0, 4.0, 3.52, 1.760, 0.880, 0.440, 0.586, 0.733, 0.440 };
static const escp2_densities_t claria_1400_densities =
-{ 2.8, 1.4, 2.00, 1.000, 0.500, 0.812, 0.406, 0.546, 0.440 };
+{ 4.0, 4.0, 3.52, 1.760, 0.880, 0.440, 0.586, 0.733, 0.440 };
static const escp2_densities_t p3_5pl_densities =
{ 2.8, 1.4, 1.77, 0.886, 0.443, 0.221, 0.240, 0.293, 0.146 };
@@ -378,7 +378,7 @@ static const stp_raw_t sprx600_borderless_sequence = STP_RAW_STRING("SN\114\000\
static const stp_raw_t sprx620_borderless_sequence = STP_RAW_STRING("SN\114\000\000\011\026\000\000\000\000\000\000\000\003\000\000\001\260\004\336\004\064\001\000\002\000\000\000\000\064\010\150\020\030\025\310\031\340\075\314\020\214\012\024\005\214\000\012\001\054\001\000\000\017\017\017\017\017\017\017\017\004\012\004\017\017\017\017\017\006\004\000\001\001\001\000\000\367\007");
-static const stp_raw_t sc120_borderless_sequence = STP_RAW_STRING("SN\001\000\000US\003\000\000\000\002");
+static const stp_raw_t generic_borderless_sequence = STP_RAW_STRING("SN\001\000\000US\003\000\000\000\002");
#define INCH(x) (72 * x)
@@ -390,11 +390,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
15, 1, 4, 15, 1, 4, 15, 1, 4, 4,
360, 14400, -1, 720, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(44), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(44), INCH(2), INCH(2), INCH(17 / 2), INCH(44),
9, 9, 9, 40, 9, 9, 9, 40, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
1, 7, 0, 0,
g1_dotsizes, g1_densities, "simple",
@@ -408,11 +409,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
1, 1, 1, 1, 1, 1, 1, 1, 1, 4,
360, 14400, -1, 720, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(44), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(44), INCH(2), INCH(2), INCH(17 / 2), INCH(44),
9, 9, 9, 40, 9, 9, 9, 40, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
1, 7, 0, 0,
g2_dotsizes, g1_densities, "simple",
@@ -426,11 +428,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
1, 1, 1, 1, 1, 1, 1, 1, 1, 4,
360, 14400, -1, 720, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(17), INCH(44), INCH(2), INCH(2),
+ INCH(17), INCH(44), INCH(2), INCH(2), INCH(17), INCH(44),
9, 9, 9, 40, 9, 9, 9, 40, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
1, 7, 0, 0,
g1_dotsizes, sc1500_densities, "simple",
@@ -444,11 +447,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
32, 1, 4, 32, 1, 4, 32, 1, 4, 4,
360, 14400, -1, 1440, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 8, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(44), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(44), INCH(2), INCH(2), INCH(17 / 2), INCH(44),
8, 9, 0, 30, 8, 9, 0, 30, 8, 9, 0, 0, 8, 9, 0, 0, -1, -1, 0, 0, 0,
1, 7, 0, 0,
sc600_dotsizes, g3_densities, "simple",
@@ -462,11 +466,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
64, 1, 2, 64, 1, 2, 64, 1, 2, 4,
360, 14400, -1, 1440, 720, 180, 180,
0, 1, 4, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(44), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(44), INCH(2), INCH(2), INCH(17 / 2), INCH(44),
8, 9, 9, 40, 8, 9, 9, 40, 8, 9, 0, 0, 8, 9, 0, 0, -1, -1, 0, 0, 0,
1, 7, 0, 0,
g3_dotsizes, g3_densities, "simple",
@@ -480,11 +485,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
64, 1, 2, 64, 1, 2, 64, 1, 2, 4,
360, 14400, -1, 1440, 720, 180, 180,
0, 1, 4, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(44), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(44), INCH(2), INCH(2), INCH(17 / 2), INCH(44),
9, 9, 9, 40, 9, 9, 9, 40, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
1, 7, 0, 0,
g3_dotsizes, g3_densities, "simple",
@@ -498,11 +504,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
64, 1, 2, 64, 1, 2, 64, 1, 2, 4,
360, 14400, -1, 1440, 720, 180, 180,
0, 1, 4, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(17), INCH(44), INCH(2), INCH(2),
+ INCH(17), INCH(44), INCH(2), INCH(2), INCH(136 / 10), INCH(44),
8, 9, 9, 40, 8, 9, 9, 40, 8, 9, 0, 0, 8, 9, 0, 0, -1, -1, 0, 0, 0,
1, 7, 0, 0,
g3_dotsizes, g3_densities, "simple",
@@ -518,11 +525,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
32, 1, 4, 32, 1, 4, 32, 1, 4, 6,
360, 14400, -1, 1440, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 8, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(44), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(44), INCH(2), INCH(2), INCH(17 / 2), INCH(44),
9, 9, 0, 30, 9, 9, 0, 30, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
1, 15, 0, 0, /* Is it really 15 pairs??? */
sp700_dotsizes, sp700_densities, "simple",
@@ -536,11 +544,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_NO | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
32, 1, 4, 32, 1, 4, 32, 1, 4, 6,
360, 14400, -1, 1440, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 8, 1, 28800, 720 * 720,
- INCH(118 / 10), INCH(44), INCH(2), INCH(2),
+ INCH(118 / 10), INCH(44), INCH(2), INCH(2), INCH(118 / 10), INCH(44),
9, 9, 0, 30, 9, 9, 0, 30, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
1, 7, 0, 0,
sp700_dotsizes, sp700_densities, "simple",
@@ -554,11 +563,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
32, 1, 4, 32, 1, 4, 32, 1, 4, 6,
360, 14400, -1, 720, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 8, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(44), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(44), INCH(2), INCH(2), INCH(17 / 2), INCH(44),
9, 9, 0, 30, 9, 9, 0, 30, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
1, 7, 0, 0,
sp700_dotsizes, sp700_densities, "simple",
@@ -574,11 +584,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_NO | MODEL_COMMAND_1999 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
21, 1, 4, 21, 1, 4, 21, 1, 4, 4,
360, 14400, -1, 720, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 8, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(44), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(44), INCH(2), INCH(2), INCH(17 / 2), INCH(44),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
1, 15, 0, 0,
sc440_dotsizes, sc440_densities, "simple",
@@ -592,11 +603,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_NO | MODEL_COMMAND_1999 | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
32, 1, 4, 32, 1, 4, 32, 1, 4, 4,
360, 14400, -1, 1440, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 8, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(44), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(44), INCH(2), INCH(2), INCH(17 / 2), INCH(44),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
1, 15, 0, 0,
sc640_dotsizes, sc440_densities, "simple",
@@ -610,11 +622,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_1999 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
48, 1, 3, 144, 1, 1, 144, 1, 1, 4,
360, 14400, -1, 1440, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(44), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(44), INCH(2), INCH(2), INCH(17 / 2), INCH(44),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
3, 15, 0, 0,
c6pl_dotsizes, c6pl_densities, "variable_6pl",
@@ -628,11 +641,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_1999 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
96, 1, 2, 192, 1, 1, 192, 1, 1, 4,
360, 14400, -1, 1440, 720, 180, 180,
0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(44), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(44), INCH(2), INCH(2), INCH(17 / 2), INCH(44),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
3, 15, 0, 0,
c3pl_dotsizes, c3pl_densities, "variable_3pl",
@@ -646,11 +660,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_1999 | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
48, 1, 3, 48, 1, 3, 48, 1, 3, 6,
360, 14400, -1, 1440, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(44), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(44), INCH(2), INCH(2), INCH(17 / 2), INCH(44),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
3, 15, 0, 0,
c6pl_dotsizes, c6pl_densities, "variable_6pl",
@@ -664,11 +679,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_1999 | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
48, 1, 3, 48, 1, 3, 48, 1, 3, 6,
360, 14400, -1, 1440, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(13), INCH(44), INCH(2), INCH(2),
+ INCH(13), INCH(44), INCH(2), INCH(2), INCH(13), INCH(44),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
3, 15, 0, 0,
c6pl_dotsizes, c6pl_densities, "variable_6pl",
@@ -682,11 +698,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_1999 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
48, 1, 3, 144, 1, 1, 144, 1, 1, 4,
360, 14400, -1, 1440, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(44), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(44), INCH(2), INCH(2), INCH(17 / 2), INCH(44),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
3, 15, 0, 0,
c4pl_dotsizes, c4pl_densities, "variable_1440_4pl",
@@ -700,11 +717,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_1999 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
48, 1, 3, 144, 1, 1, 144, 1, 1, 4,
360, 14400, -1, 1440, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(13), INCH(44), INCH(2), INCH(2),
+ INCH(13), INCH(44), INCH(2), INCH(2), INCH(13), INCH(44),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
3, 15, 0, 0,
c4pl_dotsizes, c4pl_densities, "variable_1440_4pl",
@@ -718,11 +736,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_NO | MODEL_COMMAND_1999 | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
32, 1, 4, 32, 1, 4, 32, 1, 4, 4,
360, 14400, -1, 1440, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 8, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(44), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(44), INCH(2), INCH(2), INCH(17 / 2), INCH(44),
9, 9, 9, 9, 9, 9, 9, 26, 9, 9, 9, 0, 9, 9, 9, 0, -1, -1, 0, 0, 0,
1, 15, 0, 0,
sc660_dotsizes, sc660_densities, "simple",
@@ -736,11 +755,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_1999 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
48, 1, 3, 144, 1, 1, 144, 1, 1, 4,
360, 14400, -1, 1440, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(44), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(44), INCH(2), INCH(2), INCH(17 / 2), INCH(44),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
3, 15, 0, 0,
c4pl_dotsizes, c4pl_densities, "variable_1440_4pl",
@@ -754,11 +774,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_1999 | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
32, 1, 4, 32, 1, 4, 32, 1, 4, 6,
360, 14400, -1, 1440, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(44), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(44), INCH(2), INCH(2), INCH(17 / 2), INCH(44),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
3, 15, 0, 0,
sp720_dotsizes, c6pl_densities, "variable_6pl",
@@ -772,11 +793,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_YES |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
15, 15, 3, 48, 48, 3, 48, 48, 3, 4,
360, 14400, 360, 720, 720, 90, 90,
0, 1, 0, 0, 0, -99, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
3, 15, 0, 0,
sc480_dotsizes, sc480_densities, "variable_x80_6pl",
@@ -790,11 +812,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
48, 1, 3, 48, 1, 3, 48, 1, 3, 6,
360, 14400, -1, 1440, 720, 90, 90,
0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
3, 15, 0, 0,
c4pl_dotsizes, c4pl_densities, "variable_1440_4pl",
@@ -808,11 +831,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
48, 1, 3, 48, 1, 3, 48, 1, 3, 6,
360, 14400, -1, 1440, 720, 90, 90,
0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(13), INCH(1200), INCH(2), INCH(2),
+ INCH(13), INCH(1200), INCH(2), INCH(2), INCH(13), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
3, 15, 0, 0,
c4pl_dotsizes, c4pl_densities, "variable_1440_4pl",
@@ -826,11 +850,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
64, 1, 2, 64, 1, 2, 64, 1, 2, 4,
360, 14400, -1, 1440, 720, 180, 180,
0, 1, 4, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(17), INCH(44), INCH(2), INCH(2),
+ INCH(17), INCH(44), INCH(2), INCH(2), INCH(17), INCH(44),
8, 9, 9, 40, 8, 9, 9, 40, 8, 9, 0, 0, 8, 9, 0, 0, -1, -1, 0, 0, 0,
1, 7, 0, 0,
g3_dotsizes, g3_densities, "simple",
@@ -844,11 +869,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
32, 1, 4, 64, 1, 2, 64, 1, 2, 4,
360, 14400, -1, 1440, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
3, 15, 0, 0,
sc670_dotsizes, c6pl_densities, "variable_6pl",
@@ -862,11 +888,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
48, 1, 3, 144, 1, 1, 144, 1, 1, 6,
360, 14400, -1, 1440, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(13), INCH(1200), INCH(2), INCH(2),
+ INCH(13), INCH(1200), INCH(2), INCH(2), INCH(13), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
2, 15, 0, 0,
sp2000_dotsizes, sp2000_densities, "variable_2000p",
@@ -880,11 +907,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
64, 1, 2, 64, 1, 2, 64, 1, 2, 6,
360, 14400, -1, 1440, 720, 180, 180,
0, 1, 0, 0, 0, 0, 0, 4, 1, 28800, 720 * 720,
- INCH(13), INCH(44), INCH(2), INCH(2),
+ INCH(13), INCH(44), INCH(2), INCH(2), INCH(13), INCH(44),
9, 9, 0, 30, 9, 9, 0, 30, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
1, 7, 0, 0,
spro5000_dotsizes, sp700_densities, "simple",
@@ -898,11 +926,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_NO | MODEL_COMMAND_PRO | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
1, 1, 1, 1, 1, 1, 1, 1, 1, 6,
360, 14400, -1, 1440, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(24), INCH(1200), INCH(7), INCH(7),
+ INCH(24), INCH(1200), INCH(7), INCH(7), INCH(24), INCH(1200),
9, 9, 9, 40, 9, 9, 9, 40, 9, 9, 9, 9, 9, 9, 9, 9, -1, -1, 0, 0, 0,
1, 7, 0, 0,
spro_dye_dotsizes, spro_dye_densities, "simple",
@@ -916,11 +945,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_NO | MODEL_COMMAND_PRO | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_YES | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
1, 1, 1, 1, 1, 1, 1, 1, 1, 6,
360, 14400, -1, 1440, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(24), INCH(1200), INCH(7), INCH(7),
+ INCH(24), INCH(1200), INCH(7), INCH(7), INCH(24), INCH(1200),
9, 9, 9, 40, 9, 9, 9, 40, 9, 9, 9, 9, 9, 9, 9, 9, -1, -1, 0, 0, 0,
1, 7, 0, 0,
spro_pigment_dotsizes, spro_pigment_densities, "simple",
@@ -934,11 +964,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_NO | MODEL_COMMAND_PRO | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
1, 1, 1, 1, 1, 1, 1, 1, 1, 6,
360, 14400, -1, 1440, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(44), INCH(1200), INCH(7), INCH(7),
+ INCH(44), INCH(1200), INCH(7), INCH(7), INCH(44), INCH(1200),
9, 9, 9, 40, 9, 9, 9, 40, 9, 9, 9, 9, 9, 9, 9, 9, -1, -1, 0, 0, 0,
1, 7, 0, 0,
spro_dye_dotsizes, spro_dye_densities, "simple",
@@ -952,11 +983,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_NO | MODEL_COMMAND_PRO | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_YES | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
1, 1, 1, 1, 1, 1, 1, 1, 1, 6,
360, 14400, -1, 1440, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(44), INCH(1200), INCH(7), INCH(7),
+ INCH(44), INCH(1200), INCH(7), INCH(7), INCH(44), INCH(1200),
9, 9, 9, 40, 9, 9, 9, 40, 9, 9, 9, 9, 9, 9, 9, 9, -1, -1, 0, 0, 0,
1, 7, 0, 0,
spro_pigment_dotsizes, spro_pigment_densities, "simple",
@@ -970,11 +1002,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
48, 1, 3, 144, 1, 1, 144, 1, 1, 4,
360, 14400, -1, 2880, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
3, 15, 0, 0,
c4pl_dotsizes, c4pl_2880_densities, "variable_2880_4pl",
@@ -988,11 +1021,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
48, 1, 3, 144, 1, 1, 144, 1, 1, 4,
360, 14400, -1, 2880, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
3, 15, 0, 0,
c4pl_dotsizes, c4pl_2880_densities, "variable_2880_4pl",
@@ -1006,11 +1040,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
96, 1, 2, 192, 1, 1, 192, 1, 1, 4,
360, 14400, -1, 2880, 720, 180, 180,
38, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
3, 15, 0, 0,
c3pl_dotsizes, sc980_densities, "variable_3pl",
@@ -1024,11 +1059,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
48, 1, 3, 48, 1, 3, 48, 1, 3, 6,
360, 14400, -1, 2880, 720, 90, 90,
0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 24,
3, 15, 0, 0,
c4pl_dotsizes, c4pl_2880_densities, "variable_2880_4pl",
@@ -1042,11 +1078,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
48, 1, 3, 48, 1, 3, 48, 1, 3, 6,
360, 14400, -1, 2880, 720, 90, 90,
0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 24,
3, 15, 0, 0,
c4pl_dotsizes, c4pl_2880_densities, "variable_2880_4pl",
@@ -1060,11 +1097,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
48, 1, 3, 48, 1, 3, 48, 1, 3, 6,
360, 14400, -1, 2880, 720, 90, 90,
0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(13), INCH(1200), INCH(2), INCH(2),
+ INCH(13), INCH(1200), INCH(2), INCH(2), INCH(13), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 24,
3, 15, 0, 0,
c4pl_dotsizes, c4pl_2880_densities, "variable_2880_4pl",
@@ -1078,11 +1116,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_YES |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
15, 15, 3, 48, 48, 3, 48, 48, 3, 4,
360, 14400, 360, 1440, 720, 90, 90,
0, 1, 0, 0, 0, -99, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
3, 15, 0, 0,
sc480_dotsizes, sc480_densities, "variable_x80_6pl",
@@ -1096,11 +1135,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
16, 1, 4, 16, 1, 4, 16, 1, 4, 4,
360, 14400, -1, 720, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(13), INCH(1200), INCH(2), INCH(2),
+ INCH(13), INCH(1200), INCH(2), INCH(2), INCH(13), INCH(1200),
9, 9, 9, 40, 9, 9, 9, 40, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
1, 7, 0, 0,
g1_dotsizes, g1_densities, "simple",
@@ -1114,11 +1154,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_NO | MODEL_COMMAND_PRO | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_YES | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
1, 1, 1, 1, 1, 1, 1, 1, 1, 6,
360, 14400, -1, 1440, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(13), INCH(1200), INCH(2), INCH(2),
+ INCH(13), INCH(1200), INCH(2), INCH(2), INCH(13), INCH(1200),
9, 9, 9, 40, 9, 9, 9, 40, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
1, 7, 0, 0,
spro_pigment_dotsizes, spro_pigment_densities, "simple",
@@ -1132,11 +1173,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_NO | MODEL_COMMAND_PRO | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_YES | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
1, 1, 1, 1, 1, 1, 1, 1, 1, 6,
360, 14400, -1, 1440, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(44), INCH(1200), INCH(7), INCH(7),
+ INCH(44), INCH(1200), INCH(7), INCH(7), INCH(44), INCH(1200),
9, 9, 9, 40, 9, 9, 9, 40, 9, 9, 9, 9, 9, 9, 9, 9, -1, -1, 0, 0, 0,
1, 7, 0, 0,
spro10000_dotsizes, spro10000_densities, "spro10000",
@@ -1150,11 +1192,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_YES |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
15, 15, 3, 48, 48, 3, 48, 48, 3, 4,
360, 14400, -1, 720, 720, 90, 90,
0, 1, 0, 0, 0, -99, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
3, 15, 0, 0,
sc480_dotsizes, sc480_densities, "variable_x80_6pl",
@@ -1168,11 +1211,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_YES |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
15, 15, 3, 48, 48, 3, 48, 48, 3, 4,
360, 14400, -1, 1440, 720, 90, 90,
0, 1, 0, 0, 0, -99, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
3, 15, 0, 0,
sc480_dotsizes, sc480_densities, "variable_x80_6pl",
@@ -1186,11 +1230,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
60, 60, 2, 180, 180, 2, 180, 180, 2, 4,
360, 14400, -1, 2880, 1440, 360, 180,
0, 1, 0, 0, 0, -240, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
4, 15, 0, 0,
c3pl_pigment_dotsizes, c3pl_pigment_densities, "variable_3pl_pigment",
@@ -1204,11 +1249,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_NO| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
16, 1, 4, 16, 1, 4, 16, 1, 4, 4,
360, 14400, -1, 720, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(44), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(44), INCH(2), INCH(2), INCH(17 / 2), INCH(44),
9, 9, 9, 40, 9, 9, 9, 40, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
1, 7, 0, 0,
g1_dotsizes, g1_densities, "simple",
@@ -1222,11 +1268,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_YES |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
96, 96, 2, 96, 96, 2, 24, 24, 1, 6,
360, 14400, -1, 2880, 1440, 360, 180,
0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 0, 0, 24,
4, 15, 0, 0,
c2pl_dotsizes, c2pl_densities, "variable_2pl",
@@ -1240,11 +1287,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_H_ONLY | MODEL_VACUUM_NO | MODEL_FAST_360_YES |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_YES),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_YES |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
96, 96, 2, 96, 96, 2, 192, 192, 1, 7,
360, 14400, -1, 2880, 1440, 360, 180,
0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
- INCH(13), INCH(1200), INCH(2), INCH(2),
+ INCH(13), INCH(1200), INCH(2), INCH(2), INCH(13), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 0, 0, 0,
4, 15, 0, 0,
c4pl_pigment_dotsizes, c4pl_pigment_densities, "variable_ultrachrome",
@@ -1258,11 +1306,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_PRO | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_YES | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
1, 1, 1, 1, 1, 1, 1, 1, 1, 7,
360, 14400, -1, 2880, 1440, 360, 180,
0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 1440 * 1440,
- INCH(24), INCH(1200), INCH(7), INCH(7),
+ INCH(24), INCH(1200), INCH(7), INCH(7), INCH(24), INCH(1200),
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 0,
3, 15, 0, 0,
spro_c4pl_pigment_dotsizes, c4pl_pigment_densities, "variable_ultrachrome",
@@ -1276,11 +1325,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_PRO | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_YES | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
1, 1, 1, 1, 1, 1, 1, 1, 1, 7,
360, 14400, -1, 2880, 1440, 360, 180,
0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 1440 * 1440,
- INCH(44), INCH(1200), INCH(7), INCH(7),
+ INCH(44), INCH(1200), INCH(7), INCH(7), INCH(44), INCH(1200),
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 0,
3, 15, 0, 0,
spro_c4pl_pigment_dotsizes, c4pl_pigment_densities, "variable_ultrachrome",
@@ -1294,11 +1344,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
48, 1, 3, 48, 1, 3, 48, 1, 3, 6,
360, 14400, -1, 2880, 1440, 90, 90,
0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 24,
3, 15, 0, 0,
c4pl_dotsizes, c4pl_2880_densities, "variable_2880_4pl",
@@ -1312,11 +1363,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
48, 1, 3, 48, 1, 3, 48, 1, 3, 6,
360, 14400, -1, 2880, 1440, 90, 90,
0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 24,
3, 15, 0, 0,
c4pl_dotsizes, c4pl_2880_densities, "variable_2880_4pl",
@@ -1330,11 +1382,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
48, 1, 3, 144, 1, 1, 144, 1, 1, 4,
360, 14400, -1, 2880, 1440, 90, 90,
0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
3, 15, 0, 0,
c4pl_dotsizes, c4pl_2880_densities, "variable_2880_4pl",
@@ -1348,11 +1401,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_YES |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
96, 96, 2, 96, 96, 2, 24, 24, 1, 6,
360, 14400, -1, 2880, 1440, 360, 180,
0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 0, 0, 24,
4, 15, 0, 0,
c2pl_dotsizes, c2pl_densities, "variable_2pl",
@@ -1366,11 +1420,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_1999 | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
32, 1, 4, 32, 1, 4, 32, 1, 4, 6,
360, 14400, -1, 1440, 720, 90, 90,
0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(13), INCH(44), INCH(2), INCH(2),
+ INCH(13), INCH(44), INCH(2), INCH(2), INCH(13), INCH(44),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
3, 15, 0, 0,
sp720_dotsizes, c6pl_densities, "variable_6pl",
@@ -1384,11 +1439,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
59, 60, 2, 180, 180, 2, 180, 180, 2, 4,
360, 14400, -1, 2880, 1440, 360, 180,
0, 1, 0, 0, 0, -240, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
4, 15, 0, 0,
c3pl_pigment_dotsizes, c3pl_pigment_densities, "variable_3pl_pigment",
@@ -1402,11 +1458,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
15, 15, 3, 48, 48, 3, 48, 48, 3, 4,
360, 14400, -1, 1440, 720, 90, 90,
0, 1, 0, 0, 0, -99, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
3, 15, 0, 0,
c4pl_dotsizes, c4pl_densities, "variable_x80_6pl",
@@ -1420,11 +1477,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_YES |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
180, 180, 2, 360, 360, 1, 360, 360, 1, 7,
360, 14400, -1, 2880, 2880, 720, 360,
0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 24,
4, 15, 0, 0,
c1_8pl_dotsizes, c1_8pl_densities, "variable_2pl",
@@ -1438,11 +1496,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
90, 90, 2, 90, 90, 2, 90, 90, 2, 6,
360, 14400, -1, 2880, 2880, 720, 360,
0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 24,
4, 15, 0, 0,
c1_8pl_dotsizes, c1_8pl_densities, "variable_2pl",
@@ -1456,11 +1515,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_YES |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
15, 15, 3, 48, 48, 3, 48, 48, 3, 4,
360, 14400, -1, 2880, 720, 90, 90,
0, 1, 0, 0, 0, -99, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
3, 15, 0, 0,
c4pl_dotsizes, c4pl_densities, "variable_x80_6pl",
@@ -1474,11 +1534,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
59, 60, 2, 180, 180, 2, 180, 180, 2, 4,
360, 14400, -1, 2880, 1440, 360, 180,
0, 1, 0, 80, 42, -240, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 24,
4, 15, 0, 0,
c3pl_pigment_dotsizes, c3pl_pigment_densities, "variable_3pl_pigment",
@@ -1492,11 +1553,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
29, 30, 3, 90, 90, 3, 90, 90, 3, 4,
360, 14400, -1, 2880, 1440, 360, 120,
0, 1, 0, 80, 42, -180, 0, 0, 1, 28800, 1440 * 720,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 24,
4, 15, 0, 0,
c3pl_pigment_dotsizes, c3pl_pigment_densities, "variable_3pl_pigment",
@@ -1510,11 +1572,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
48, 1, 3, 48, 1, 3, 48, 1, 3, 6,
360, 14400, -1, 2880, 720, 90, 90,
0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, 399, 394, 595, 842, 24,
3, 15, 0, 0,
c4pl_dotsizes, c4pl_2880_densities, "variable_2880_4pl",
@@ -1528,11 +1591,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_FULL | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
90, 1, 3, 90, 1, 3, 90, 1, 3, 6,
360, 14400, -1, 2880, 1440, 360, 120,
0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 595, 842, 24,
4, 15, 0, 0,
p3pl_dotsizes, p3pl_densities, "variable_3pl_pmg",
@@ -1546,17 +1610,18 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_FULL | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
180, 1, 2, 180, 1, 2, 180, 1, 2, 8,
360, 28800, -1, 5760, 2880, 360, 180,
- 0, 1, 0, 80, 42, 0, 0, 0, 1, 180, 5760 * 2880,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ 180 * 2, 1, 0, 80, 42, 0, 0, 0, 1, 180, 5760 * 2880,
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 11, 9, 9, 0, 11, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 595, 842, 24,
4, 15, 0, 0,
p1_5pl_dotsizes, p1_5pl_densities, "variable_1_5pl",
"superfine", "cmykrb",
variable_bits, c1_5_base_res, "r1800",
- "p1_5", &new_init_sequence, &je_deinit_sequence,
+ "v2880", &new_init_sequence, &je_deinit_sequence,
&spr800_borderless_sequence, NULL, "r800"
},
/* 65: Stylus Photo CX4600 */
@@ -1564,11 +1629,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
90, 1, 3, 90, 1, 3, 90, 1, 3, 4,
360, 14400, -1, 5760, 1440, 360, 120,
0, 1, 0, 80, 42, 0, 0, 0, 1, 180, 1440 * 1440,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 595, 842, 0,
4, 15, 0, 0,
p3pl_dotsizes, p3pl_densities, "variable_3pl_pmg",
@@ -1582,11 +1648,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
29, 30, 3, 90, 90, 3, 90, 90, 3, 4,
360, 14400, -1, 2880, 1440, 360, 120,
0, 1, 0, 80, 42, -180, 0, 0, 1, 28800, 1440 * 720,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 24,
4, 15, 0, 0,
c3pl_pigment_dotsizes, c3pl_pigment_c66_densities, "variable_3pl_pigment_c66",
@@ -1600,17 +1667,18 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_FULL | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
180, 1, 2, 180, 1, 2, 180, 1, 2, 8,
360, 28800, -1, 5760, 2880, 360, 180,
- 0, 1, 0, 96, 42, 0, 0, 0, 1, 180, 5760 * 2880,
- INCH(13), INCH(1200), INCH(2), INCH(2),
+ 180 * 2, 1, 0, 96, 42, 0, 0, 0, 1, 180, 5760 * 2880,
+ INCH(13), INCH(1200), INCH(2), INCH(2), INCH(13), INCH(1200),
9, 9, 0, 11, 9, 9, 0, 11, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 595, 842, 24,
4, 15, 0, 0,
p1_5pl_dotsizes, p1_5pl_densities, "variable_1_5pl",
"superfine", "cmykrb",
variable_bits, c1_5_base_res, "r1800",
- "p1_5", &new_init_sequence, &je_deinit_sequence,
+ "v2880", &new_init_sequence, &je_deinit_sequence,
&spr800_borderless_sequence, NULL, "r800"
},
/* 68: PM-G820 */
@@ -1618,17 +1686,18 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_FULL | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
180, 1, 2, 180, 1, 2, 180, 1, 2, 8,
360, 14400, -1, 5760, 2880, 360, 180,
- 0, 1, 0, 80, 42, 0, 0, 0, 1, 180, 5760 * 2880,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ 180 * 2, 1, 0, 80, 42, 0, 0, 0, 1, 180, 5760 * 2880,
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 11, 9, 9, 0, 11, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 595, 842, 24,
4, 15, 0, 0,
p1_5pl_dotsizes, p1_5pl_densities, "variable_1_5pl",
- "superfine", "photo_gen3",
+ "superfine", "cmykrb",
variable_bits, c1_5_base_res, "cd_roll_feed",
- "standard", &new_init_sequence, &je_deinit_sequence,
+ "v2880", &new_init_sequence, &je_deinit_sequence,
&spr800_borderless_sequence, NULL, "r800"
},
/* 69: Stylus C86 */
@@ -1636,11 +1705,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
59, 60, 2, 180, 180, 2, 180, 180, 2, 4,
360, 14400, -1, 2880, 2880, 360, 180,
0, 1, 0, 80, 42, -240, 0, 0, 1, 28800, 1440 * 720,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 24,
4, 15, 0, 0,
c3pl_pigment_dotsizes, c3pl_pigment_densities, "variable_3pl_pigment",
@@ -1654,47 +1724,50 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_FULL | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
180, 1, 2, 180, 1, 2, 180, 1, 2, 6,
360, 28800, -1, 5760, 2880, 360, 180,
- 0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ 10, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 204, 263, 595, 842, 0,
4, 15, 0, 0,
p1_5pl_dotsizes, p1_5pl_densities, "variable_1_5pl",
"superfine", "photo_gen3",
variable_bits, c1_5_base_res, "rx700",
"p1_5", &new_init_sequence, &je_deinit_sequence,
- NULL, NULL, "rx700"
+ &generic_borderless_sequence, NULL, "rx700"
},
/* 71: Stylus Photo R2400 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_FULL | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_YES),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_YES |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
180, 1, 2, 180, 1, 2, 180, 1, 2, 8,
360, 14400, -1, 5760, 2880, 360, 180,
- 0, 1, 0, 80, 42, 0, 0, 0, 1, 180, 1440 * 1440,
- INCH(13), INCH(1200), INCH(2), INCH(2),
+ 10, 1, 0, 80, 42, 0, 0, 0, 1, 180, 1440 * 1440,
+ INCH(13), INCH(1200), INCH(2), INCH(2), INCH(13), INCH(1200),
9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 595, 842, 0,
4, 15, 0, 0,
p3_5pl_dotsizes, p3_5pl_densities, "variable_r2400",
"superfine", "f360_ultrachrome_k3",
variable_bits, c1_5_base_res, "r2400",
- "standard", &new_init_sequence, &je_deinit_sequence,
- NULL, NULL, "r2400"
+ "v2880", &new_init_sequence, &je_deinit_sequence,
+ &generic_borderless_sequence, NULL, "r2400"
},
/* 72: Stylus CX3700/3800/3810 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
29, 30, 3, 90, 90, 3, 90, 90, 3, 4,
360, 14400, -1, 2880, 1440, 360, 120,
0, 1, 0, 80, 42, -180, 0, 0, 1, 28800, 1440 * 720,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
4, 15, 0, 0,
c3pl_pigment_dotsizes, c3pl_pigment_c66_densities, "variable_3pl_pigment_c66",
@@ -1708,47 +1781,50 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_FULL | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
90, 1, 3, 90, 1, 3, 90, 1, 3, 6,
360, 28800, -1, 5760, 1440, 1440, 720,
0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
- INCH(4), INCH(1200), INCH(2), INCH(2),
+ INCH(4), INCH(1200), INCH(2), INCH(2), INCH(4), INCH(1200),
9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 595, 842, 0,
4, 15, 0, 0,
picturemate_dotsizes, picturemate_densities, "variable_picturemate",
- "picturemate", "picturemate",
+ "picturemate", "picturemate_6",
variable_bits, c1_5_base_res, "default",
"picturemate", &new_init_sequence, &je_deinit_sequence,
- NULL, NULL, "picturemate"
+ NULL, NULL, "picturemate_6"
},
/* 74: PM-A650 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
90, 90, 3, 90, 90, 3, 90, 90, 3, 4,
360, 14400, -1, 5760, 1440, 360, 120,
0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 0,
4, 15, 0, 0,
c3pl_pigment_dotsizes, c3pl_pigment_c66_densities, "variable_3pl_pigment_c66",
"superfine", "c64",
variable_bits, variable_base_res, "cd_roll_feed",
"standard", &new_init_sequence, &je_deinit_sequence,
- NULL, NULL, "standard"
+ &generic_borderless_sequence, NULL, "standard"
},
/* 75: Japanese PM-A750 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_YES |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
90, 90, 3, 90, 90, 3, 90, 90, 3, 4,
360, 14400, -1, 5760, 1440, 360, 120,
0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 0, 0, 0,
4, 15, 0, 0,
c2pl_dotsizes, c2pl_densities, "variable_2pl",
@@ -1762,47 +1838,50 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_NO |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_YES |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
90, 90, 3, 90, 90, 3, 90, 90, 3, 6,
360, 14400, -1, 5760, 1440, 360, 120,
0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 0, 0, 0,
4, 15, 0, 0,
c2pl_dotsizes, c2pl_densities, "variable_2pl",
"superfine", "photo_gen3",
variable_bits, variable_base_res, "cd_roll_feed",
"standard", &new_init_sequence, &je_deinit_sequence,
- NULL, NULL, "standard"
+ &generic_borderless_sequence, NULL, "standard"
},
/* 77: Japanese PM-D600 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
90, 1, 3, 90, 1, 3, 90, 1, 3, 4,
360, 14400, -1, 2880, 1440, 360, 120,
0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 595, 842, 0,
4, 15, 0, 0,
p3pl_dotsizes, p3pl_densities, "variable_3pl_pmg",
"superfine", "c64",
variable_bits, variable_base_res, "cd_roll_feed",
"standard", &new_init_sequence, &je_deinit_sequence,
- NULL, NULL, "photo"
+ &generic_borderless_sequence, NULL, "photo"
},
/* 78: Stylus Photo 810/820 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_YES),
48, 1, 3, 48, 1, 3, 48, 1, 3, 6,
360, 14400, -1, 2880, 720, 90, 90,
0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(19 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 24,
3, 15, 0, 0,
c4pl_dotsizes, c4pl_2880_densities, "variable_2880_4pl",
@@ -1816,11 +1895,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
59, 60, 2, 180, 180, 2, 180, 180, 2, 4,
360, 14400, -1, 2880, 1440, 360, 180,
0, 1, 0, 80, 42, -240, 0, 0, 1, 28800, 720 * 720,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 24,
4, 15, 0, 0,
c3pl_pigment_dotsizes, c3pl_pigment_densities, "variable_3pl_pigment",
@@ -1834,11 +1914,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
59, 60, 2, 180, 180, 2, 180, 180, 2, 4,
360, 14400, -1, 2880, 2880, 360, 180,
0, 1, 0, 80, 42, -240, 0, 0, 1, 28800, 1440 * 720,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 24,
4, 15, 0, 0,
c3pl_pigment_dotsizes, c3pl_pigment_densities, "variable_3pl_pigment",
@@ -1852,47 +1933,50 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
90, 1, 4, 90, 1, 4, 90, 1, 4, 6,
360, 14400, -1, 5760, 2880, 360, 90,
- 0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 5760 * 2880,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ 90 * 4, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 5760 * 2880,
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, 204, 189, 595, 842, 24,
4, 15, 0, 0,
claria_dotsizes, claria_densities, "variable_claria",
"superfine", "claria",
variable_bits, c1_5_base_res, "cd_roll_feed",
- "standard", &new_init_sequence, &je_deinit_sequence,
- NULL, NULL, "sp1400"
+ "v2880", &new_init_sequence, &je_deinit_sequence,
+ &generic_borderless_sequence, NULL, "sp1400"
},
/* 82: Stylus Photo 1400 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
90, 1, 4, 90, 1, 4, 90, 1, 4, 6,
360, 14400, -1, 5760, 2880, 360, 90,
- 0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 5760 * 2880,
- INCH(13), INCH(1200), INCH(2), INCH(2),
+ 90 * 4, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 5760 * 2880,
+ INCH(13), INCH(1200), INCH(2), INCH(2), INCH(13), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, 204, 263, 595, 842, 24,
4, 15, 0, 0,
claria_1400_dotsizes, claria_1400_densities, "variable_claria_1400",
"claria_1400", "claria",
variable_bits, claria_1400_base_res, "cd_roll_feed",
- "standard", &new_init_sequence, &je_deinit_sequence,
- NULL, NULL, "sp1400"
+ "v2880", &new_init_sequence, &je_deinit_sequence,
+ &generic_borderless_sequence, NULL, "sp1400"
},
/* 83: Stylus Photo R240 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_FULL | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
90, 1, 3, 90, 1, 3, 90, 1, 3, 4,
360, 14400, -1, 5760, 1440, 360, 120,
0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 595, 842, 24,
4, 15, 0, 0,
p3pl_dotsizes, p3pl_densities, "variable_3pl_pmg",
@@ -1906,11 +1990,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_FULL | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
90, 1, 3, 90, 1, 3, 90, 1, 3, 6,
360, 14400, -1, 2880, 1440, 360, 120,
0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 595, 842, 24,
4, 15, 0, 0,
p3pl_dotsizes, p3pl_densities, "variable_3pl_pmg",
@@ -1924,18 +2009,38 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
- MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO),
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
59, 60, 2, 360, 1, 1, 360, 1, 1, 4,
- 360, 14400, -1, 5760, 1440, 360, 180,
+ 360, 14400, -1, 5760, 2880, 360, 180,
0, 1, 0, 80, 42, -240, 0, 0, 1, 28800, 5760 * 2880,
- INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2), INCH(17 / 2), INCH(1200),
9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 24,
4, 15, 0, 0,
c3pl_pigment_c120_dotsizes, c3pl_pigment_c120_densities, "variable_3pl_pigment_c120",
"superfine", "c120",
variable_bits, variable_base_res, "default",
"standard", &new_init_sequence, &je_deinit_sequence,
- &sc120_borderless_sequence, NULL, "c120"
+ &generic_borderless_sequence, NULL, "c120"
+ },
+ /* 86: PictureMate 4-color */
+ {
+ (MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_NO |
+ MODEL_ZEROMARGIN_FULL | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
+ MODEL_PACKET_MODE_YES| MODEL_INTERCHANGEABLE_INK_NO |
+ MODEL_ENVELOPE_LANDSCAPE_NO),
+ 90, 1, 3, 90, 1, 3, 90, 1, 3, 4,
+ 360, 28800, -1, 5760, 1440, 1440, 720,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
+ INCH(4), INCH(1200), INCH(2), INCH(2), INCH(4), INCH(1200),
+ 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 595, 842, 0,
+ 4, 15, 0, 0,
+ picturemate_dotsizes, picturemate_densities, "variable_picturemate",
+ "picturemate", "picturemate_4",
+ variable_bits, c1_5_base_res, "default",
+ "picturemate", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "picturemate_4"
},
};
diff --git a/src/main/print-escp2.c b/src/main/print-escp2.c
index 582702f..b00b8d4 100644
--- a/src/main/print-escp2.c
+++ b/src/main/print-escp2.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-escp2.c,v 1.355.2.4 2007/12/29 20:42:27 rlk Exp $"
+ * "$Id: print-escp2.c,v 1.387 2008/02/27 02:22:26 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
@@ -35,6 +35,7 @@
#include <string.h>
#include <assert.h>
#include <math.h>
+#include <limits.h>
#include "print-escp2.h"
#ifdef __GNUC__
@@ -68,6 +69,7 @@ static const escp2_printer_attr_t escp2_printer_attrs[] =
{ "supports_ink_change", 11, 1 },
{ "packet_mode", 12, 1 },
{ "interchangeable_ink", 13, 1 },
+ { "envelope_landscape", 14, 1 },
};
typedef struct
@@ -397,6 +399,8 @@ static const stp_parameter_t the_parameters[] =
PARAMETER_INT(max_paper_height),
PARAMETER_INT(min_paper_width),
PARAMETER_INT(min_paper_height),
+ PARAMETER_INT(max_imageable_width),
+ PARAMETER_INT(max_imageable_height),
PARAMETER_INT(extra_feed),
PARAMETER_INT(pseudo_separation_rows),
PARAMETER_INT(base_separation),
@@ -415,6 +419,9 @@ static const stp_parameter_t the_parameters[] =
PARAMETER_INT(right_margin),
PARAMETER_INT(top_margin),
PARAMETER_INT(bottom_margin),
+ PARAMETER_INT(ink_type),
+ PARAMETER_INT(bits),
+ PARAMETER_INT(base_res),
PARAMETER_INT_RO(alignment_passes),
PARAMETER_INT_RO(alignment_choices),
PARAMETER_INT_RO(alternate_alignment_passes),
@@ -492,6 +499,38 @@ static const float_param_t float_parameters[] =
},
{
{
+ "DropSize1", N_("Drop Size Small"), N_("Advanced Ink Adjustment"),
+ N_("Drop Size 1 (small)"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, -1, 1, 0
+ }, 0.0, 1.0, 0.0, 1
+ },
+ {
+ {
+ "DropSize2", N_("Drop Size Medium"), N_("Advanced Ink Adjustment"),
+ N_("Drop Size 2 (medium)"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, -1, 1, 0
+ }, 0.0, 1.0, 0.0, 1
+ },
+ {
+ {
+ "DropSize3", N_("Drop Size Large"), N_("Advanced Ink Adjustment"),
+ N_("Drop Size 3 (large)"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, -1, 1, 0
+ }, 0.0, 1.0, 0.0, 1
+ },
+ {
+ {
+ "LightCyanValue", N_("Light Cyan Value"), N_("Advanced Ink Adjustment"),
+ N_("Light Cyan Value"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, -1, 1, 0
+ }, 0.0, 5.0, 1.0, 1
+ },
+ {
+ {
"LightCyanTransition", N_("Light Cyan Transition"), N_("Advanced Ink Adjustment"),
N_("Light Cyan Transition"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
@@ -500,6 +539,30 @@ static const float_param_t float_parameters[] =
},
{
{
+ "LightCyanScale", N_("Light Cyan Density Scale"), N_("Advanced Ink Adjustment"),
+ N_("Light Cyan Density Scale"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, -1, 1, 0
+ }, 0.0, 5.0, 1.0, 1
+ },
+ {
+ {
+ "LightMagentaValue", N_("Light Magenta Value"), N_("Advanced Ink Adjustment"),
+ N_("Light Magenta Value"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, -1, 1, 0
+ }, 0.0, 5.0, 1.0, 1
+ },
+ {
+ {
+ "LightMagentaScale", N_("Light Magenta Density Scale"), N_("Advanced Ink Adjustment"),
+ N_("Light Magenta Density Scale"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, -1, 1, 0
+ }, 0.0, 5.0, 1.0, 1
+ },
+ {
+ {
"LightMagentaTransition", N_("Light Magenta Transition"), N_("Advanced Ink Adjustment"),
N_("Light Magenta Transition"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
@@ -508,6 +571,14 @@ static const float_param_t float_parameters[] =
},
{
{
+ "DarkYellowValue", N_("Dark Yellow Value"), N_("Advanced Ink Adjustment"),
+ N_("Dark Yellow Value"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, -1, 1, 0
+ }, 0.0, 5.0, 1.0, 1
+ },
+ {
+ {
"DarkYellowTransition", N_("Dark Yellow Transition"), N_("Advanced Ink Adjustment"),
N_("Dark Yellow Transition"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
@@ -516,6 +587,22 @@ static const float_param_t float_parameters[] =
},
{
{
+ "DarkYellowScale", N_("Dark Yellow Density Scale"), N_("Advanced Ink Adjustment"),
+ N_("Dark Yellow Density Scale"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, -1, 1, 0
+ }, 0.0, 5.0, 1.0, 1
+ },
+ {
+ {
+ "GrayValue", N_("Gray Value"), N_("Advanced Ink Adjustment"),
+ N_("Gray Value"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, -1, 1, 0
+ }, 0.0, 5.0, 1.0, 1
+ },
+ {
+ {
"GrayTransition", N_("Gray Transition"), N_("Advanced Ink Adjustment"),
N_("Gray Transition"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
@@ -524,6 +611,22 @@ static const float_param_t float_parameters[] =
},
{
{
+ "GrayScale", N_("Gray Density Scale"), N_("Advanced Ink Adjustment"),
+ N_("Gray Density Scale"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, -1, 1, 0
+ }, 0.0, 5.0, 1.0, 1
+ },
+ {
+ {
+ "DarkGrayValue", N_("Gray Value"), N_("Advanced Ink Adjustment"),
+ N_("Gray Value"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, -1, 1, 0
+ }, 0.0, 5.0, 1.0, 1
+ },
+ {
+ {
"DarkGrayTransition", N_("Gray Transition"), N_("Advanced Ink Adjustment"),
N_("Gray Transition"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
@@ -532,6 +635,22 @@ static const float_param_t float_parameters[] =
},
{
{
+ "DarkGrayScale", N_("Gray Density Scale"), N_("Advanced Ink Adjustment"),
+ N_("Gray Density Scale"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, -1, 1, 0
+ }, 0.0, 5.0, 1.0, 1
+ },
+ {
+ {
+ "LightGrayValue", N_("Light Gray Value"), N_("Advanced Ink Adjustment"),
+ N_("Light Gray Value"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, -1, 1, 0
+ }, 0.0, 5.0, 1.0, 1
+ },
+ {
+ {
"LightGrayTransition", N_("Light Gray Transition"), N_("Advanced Ink Adjustment"),
N_("Light Gray Transition"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
@@ -540,6 +659,22 @@ static const float_param_t float_parameters[] =
},
{
{
+ "LightGrayScale", N_("Light Gray Density Scale"), N_("Advanced Ink Adjustment"),
+ N_("Light Gray Density Scale"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, -1, 1, 0
+ }, 0.0, 5.0, 1.0, 1
+ },
+ {
+ {
+ "Gray3Value", N_("Dark Gray Value"), N_("Advanced Ink Adjustment"),
+ N_("Dark Gray Value"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, -1, 1, 0
+ }, 0.0, 5.0, 1.0, 1
+ },
+ {
+ {
"Gray3Transition", N_("Dark Gray Transition"), N_("Advanced Ink Adjustment"),
N_("Dark Gray Transition"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
@@ -548,6 +683,22 @@ static const float_param_t float_parameters[] =
},
{
{
+ "Gray3Scale", N_("Dark Gray Density Scale"), N_("Advanced Ink Adjustment"),
+ N_("Dark Gray Density Scale"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, -1, 1, 0
+ }, 0.0, 5.0, 1.0, 1
+ },
+ {
+ {
+ "Gray2Value", N_("Mid Gray Value"), N_("Advanced Ink Adjustment"),
+ N_("Medium Gray Value"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, -1, 1, 0
+ }, 0.0, 5.0, 1.0, 1
+ },
+ {
+ {
"Gray2Transition", N_("Mid Gray Transition"), N_("Advanced Ink Adjustment"),
N_("Medium Gray Transition"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
@@ -556,12 +707,60 @@ static const float_param_t float_parameters[] =
},
{
{
+ "Gray2Scale", N_("Mid Gray Density Scale"), N_("Advanced Ink Adjustment"),
+ N_("Medium Gray Density Scale"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, -1, 1, 0
+ }, 0.0, 5.0, 1.0, 1
+ },
+ {
+ {
+ "Gray1Value", N_("Light Gray Value"), N_("Advanced Ink Adjustment"),
+ N_("Light Gray Value"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, -1, 1, 0
+ }, 0.0, 5.0, 1.0, 1
+ },
+ {
+ {
"Gray1Transition", N_("Light Gray Transition"), N_("Advanced Ink Adjustment"),
N_("Light Gray Transition"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, -1, 1, 0
}, 0.0, 5.0, 1.0, 1
},
+ {
+ {
+ "Gray1Scale", N_("Light Gray Density Scale"), N_("Advanced Ink Adjustment"),
+ N_("Light Gray Density Scale"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, -1, 1, 0
+ }, 0.0, 5.0, 1.0, 1
+ },
+ {
+ {
+ "BlackTrans", N_("GCR Transition"), N_("Advanced Output Control"),
+ N_("Adjust the gray component transition rate"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, 0, 1, 0
+ }, 0.0, 1.0, 1.0, 1
+ },
+ {
+ {
+ "GCRLower", N_("GCR Lower Bound"), N_("Advanced Output Control"),
+ N_("Lower bound of gray component reduction"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, 0, 1, 0
+ }, 0.0, 1.0, 0.2, 1
+ },
+ {
+ {
+ "GCRUpper", N_("GCR Upper Bound"), N_("Advanced Output Control"),
+ N_("Upper bound of gray component reduction"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, 0, 1, 0
+ }, 0.0, 5.0, 0.5, 1
+ },
};
static const int float_parameter_count =
@@ -679,6 +878,8 @@ DEF_SIMPLE_ACCESSOR(max_paper_width, unsigned)
DEF_SIMPLE_ACCESSOR(max_paper_height, unsigned)
DEF_SIMPLE_ACCESSOR(min_paper_width, unsigned)
DEF_SIMPLE_ACCESSOR(min_paper_height, unsigned)
+DEF_SIMPLE_ACCESSOR(max_imageable_width, unsigned)
+DEF_SIMPLE_ACCESSOR(max_imageable_height, unsigned)
DEF_SIMPLE_ACCESSOR(cd_x_offset, int)
DEF_SIMPLE_ACCESSOR(cd_y_offset, int)
DEF_SIMPLE_ACCESSOR(cd_page_width, int)
@@ -817,11 +1018,11 @@ escp2_bits(const stp_vars_t *v, int resid)
}
}
-static double
+static int
escp2_base_res(const stp_vars_t *v, int resid)
{
- if (stp_check_float_parameter(v, "escp2_base_res", STP_PARAMETER_ACTIVE))
- return stp_get_float_parameter(v, "escp2_base_res");
+ if (stp_check_int_parameter(v, "escp2_base_res", STP_PARAMETER_ACTIVE))
+ return stp_get_int_parameter(v, "escp2_base_res");
else
{
int model = stp_get_model_id(v);
@@ -838,6 +1039,28 @@ escp2_dropsizes(const stp_vars_t *v, int resid)
return (*drops)[resid];
}
+static escp2_dropsize_t *
+escp2_copy_dropsizes(const stp_vars_t *v, int resid)
+{
+ const escp2_dropsize_t *drops = escp2_dropsizes(v, resid);
+ int i;
+ escp2_dropsize_t *ndrops = stp_zalloc(sizeof(escp2_dropsize_t));
+ if (! drops)
+ return NULL;
+ ndrops->listname = drops->listname;
+ ndrops->numdropsizes = drops->numdropsizes;
+ for (i = 0; i < drops->numdropsizes; i++)
+ ndrops->dropsizes[i] = drops->dropsizes[i];
+ return ndrops;
+}
+
+static void
+escp2_free_dropsizes(escp2_dropsize_t *drops)
+{
+ if (drops)
+ stp_free(drops);
+}
+
static const inklist_t *
escp2_inklist(const stp_vars_t *v)
{
@@ -865,6 +1088,28 @@ escp2_shades(const stp_vars_t *v, int channel)
return &((*inklist->shades)[channel]);
}
+static shade_t *
+escp2_copy_shades(const stp_vars_t *v, int channel)
+{
+ const shade_t *shades = escp2_shades(v, channel);
+ int i;
+ shade_t *nshades;
+ if (! shades)
+ return NULL;
+ nshades = stp_zalloc(sizeof(shade_t));
+ nshades->n_shades = shades->n_shades;
+ for (i = 0; i < shades->n_shades; i++)
+ nshades->shades[i] = shades->shades[i];
+ return nshades;
+}
+
+static void
+escp2_free_shades(shade_t *shades)
+{
+ if (shades)
+ stp_free(shades);
+}
+
static const paperlist_t *
escp2_paperlist(const stp_vars_t *v)
{
@@ -1206,11 +1451,15 @@ verify_papersize(const stp_vars_t *v, const stp_papersize_t *pt)
{
unsigned int height_limit, width_limit;
unsigned int min_height_limit, min_width_limit;
+ unsigned int envelope_landscape =
+ escp2_has_cap(v, MODEL_ENVELOPE_LANDSCAPE, MODEL_ENVELOPE_LANDSCAPE_YES);
width_limit = escp2_max_paper_width(v);
height_limit = escp2_max_paper_height(v);
min_width_limit = escp2_min_paper_width(v);
min_height_limit = escp2_min_paper_height(v);
if (strlen(pt->name) > 0 &&
+ (pt->paper_size_type != PAPERSIZE_TYPE_ENVELOPE ||
+ envelope_landscape || pt->height > pt->width) &&
pt->width <= width_limit && pt->height <= height_limit &&
(pt->height >= min_height_limit || pt->height == 0) &&
(pt->width >= min_width_limit || pt->width == 0) &&
@@ -1337,15 +1586,6 @@ escp2_list_parameters(const stp_vars_t *v)
}
static void
-fill_transition_parameters(stp_parameter_t *description)
-{
- description->is_active = 1;
- description->bounds.dbl.lower = 0;
- description->bounds.dbl.upper = 5.0;
- description->deflt.dbl = 1.0;
-}
-
-static void
set_density_parameter(const stp_vars_t *v,
stp_parameter_t *description,
int color)
@@ -1397,6 +1637,82 @@ set_hue_map_parameter(const stp_vars_t *v,
}
static void
+fill_value_parameters(const stp_vars_t *v,
+ stp_parameter_t *description,
+ int color)
+{
+ const shade_t *shades = escp2_shades(v, color);
+ const escp2_inkname_t *ink_name = get_inktype(v);
+ description->is_active = 1;
+ description->bounds.dbl.lower = 0;
+ description->bounds.dbl.upper = 1.0;
+ description->deflt.dbl = 1.0;
+ if (shades && ink_name)
+ {
+ const ink_channel_t *channel = ink_name->channel_set->channels[color];
+ int i;
+ for (i = 0; i < channel->n_subchannels; i++)
+ {
+ if (channel->subchannels[i].subchannel_value &&
+ strcmp(description->name,
+ channel->subchannels[i].subchannel_value) == 0)
+ {
+ description->deflt.dbl = shades->shades[i];
+ return;
+ }
+ }
+ }
+}
+
+static void
+set_color_value_parameter(const stp_vars_t *v,
+ stp_parameter_t *description,
+ int color)
+{
+ description->is_active = 0;
+ if (stp_get_string_parameter(v, "PrintingMode") &&
+ strcmp(stp_get_string_parameter(v, "PrintingMode"), "BW") != 0)
+ {
+ const escp2_inkname_t *ink_name = get_inktype(v);
+ if (ink_name &&
+ ink_name->channel_set->channel_count == 4 &&
+ ink_name->channel_set->channels[color] &&
+ ink_name->channel_set->channels[color]->n_subchannels == 2)
+ fill_value_parameters(v, description, color);
+ }
+}
+
+static void
+set_gray_value_parameter(const stp_vars_t *v,
+ stp_parameter_t *description,
+ int expected_channels)
+{
+ const escp2_inkname_t *ink_name = get_inktype(v);
+ description->is_active = 0;
+ if (ink_name && ink_name->channel_set->channels[STP_ECOLOR_K] &&
+ (ink_name->channel_set->channels[STP_ECOLOR_K]->n_subchannels ==
+ expected_channels))
+ fill_value_parameters(v, description, STP_ECOLOR_K);
+ else
+ set_color_value_parameter(v, description, STP_ECOLOR_K);
+}
+
+static void
+fill_transition_parameters(const stp_vars_t *v,
+ stp_parameter_t *description,
+ int color)
+{
+ const paper_adjustment_t *paper_adj = get_media_adjustment(v);
+ description->is_active = 1;
+ description->bounds.dbl.lower = 0;
+ description->bounds.dbl.upper = 1.0;
+ if (paper_adj)
+ description->deflt.dbl = paper_adj->subchannel_cutoff;
+ else
+ description->deflt.dbl = 1.0;
+}
+
+static void
set_color_transition_parameter(const stp_vars_t *v,
stp_parameter_t *description,
int color)
@@ -1410,7 +1726,7 @@ set_color_transition_parameter(const stp_vars_t *v,
ink_name->channel_set->channel_count == 4 &&
ink_name->channel_set->channels[color] &&
ink_name->channel_set->channels[color]->n_subchannels == 2)
- fill_transition_parameters(description);
+ fill_transition_parameters(v, description, color);
}
}
@@ -1424,11 +1740,53 @@ set_gray_transition_parameter(const stp_vars_t *v,
if (ink_name && ink_name->channel_set->channels[STP_ECOLOR_K] &&
(ink_name->channel_set->channels[STP_ECOLOR_K]->n_subchannels ==
expected_channels))
- fill_transition_parameters(description);
+ fill_transition_parameters(v, description, STP_ECOLOR_K);
else
set_color_transition_parameter(v, description, STP_ECOLOR_K);
}
+static void
+fill_scale_parameters(stp_parameter_t *description)
+{
+ description->is_active = 1;
+ description->bounds.dbl.lower = 0;
+ description->bounds.dbl.upper = 5.0;
+ description->deflt.dbl = 1.0;
+}
+
+static void
+set_color_scale_parameter(const stp_vars_t *v,
+ stp_parameter_t *description,
+ int color)
+{
+ description->is_active = 0;
+ if (stp_get_string_parameter(v, "PrintingMode") &&
+ strcmp(stp_get_string_parameter(v, "PrintingMode"), "BW") != 0)
+ {
+ const escp2_inkname_t *ink_name = get_inktype(v);
+ if (ink_name &&
+ ink_name->channel_set->channel_count == 4 &&
+ ink_name->channel_set->channels[color] &&
+ ink_name->channel_set->channels[color]->n_subchannels == 2)
+ fill_scale_parameters(description);
+ }
+}
+
+static void
+set_gray_scale_parameter(const stp_vars_t *v,
+ stp_parameter_t *description,
+ int expected_channels)
+{
+ const escp2_inkname_t *ink_name = get_inktype(v);
+ description->is_active = 0;
+ if (ink_name && ink_name->channel_set->channels[STP_ECOLOR_K] &&
+ (ink_name->channel_set->channels[STP_ECOLOR_K]->n_subchannels ==
+ expected_channels))
+ fill_scale_parameters(description);
+ else
+ set_color_scale_parameter(v, description, STP_ECOLOR_K);
+}
+
static const res_t *
find_default_resolution(const stp_vars_t *v, const quality_t *q,
int strict)
@@ -1624,6 +1982,12 @@ escp2_parameters(const stp_vars_t *v, const char *name,
if (strcmp(name, the_parameters[i].name) == 0)
{
stp_fill_parameter_settings(description, &(the_parameters[i]));
+ if (description->p_type == STP_PARAMETER_TYPE_INT)
+ {
+ description->deflt.integer = 0;
+ description->bounds.integer.upper = INT_MAX;
+ description->bounds.integer.lower = INT_MIN;
+ }
break;
}
@@ -1764,8 +2128,12 @@ escp2_parameters(const stp_vars_t *v, const char *name,
{
const inklist_t *inks = escp2_inklist(v);
int ninktypes = inks->n_inks;
+ int verified_inktypes = 0;
+ for (i = 0; i < ninktypes; i++)
+ if (verify_inktype(v, inks->inknames[i]))
+ verified_inktypes++;
description->bounds.str = stp_string_list_create();
- if (ninktypes > 1)
+ if (verified_inktypes > 1)
{
stp_string_list_add_string(description->bounds.str, "None",
_("Standard"));
@@ -1945,6 +2313,62 @@ escp2_parameters(const stp_vars_t *v, const char *name,
else
description->is_active = 0;
}
+ else if (strcmp(name, "DropSize1") == 0 ||
+ strcmp(name, "DropSize2") == 0 ||
+ strcmp(name, "DropSize3") == 0)
+ {
+ if (escp2_has_cap(v, MODEL_VARIABLE_DOT, MODEL_VARIABLE_YES))
+ {
+ int resid = compute_resid(escp2_find_resolution(v));
+ const escp2_dropsize_t *drops = escp2_dropsizes(v, resid);
+ if (strcmp(name, "DropSize1") == 0 && drops->numdropsizes >= 1)
+ description->deflt.dbl = drops->dropsizes[0];
+ else if (strcmp(name, "DropSize2") == 0 && drops->numdropsizes >= 2)
+ description->deflt.dbl = drops->dropsizes[1];
+ else if (strcmp(name, "DropSize3") == 0 && drops->numdropsizes >= 3)
+ description->deflt.dbl = drops->dropsizes[2];
+ description->is_active = 1;
+ }
+ else
+ description->is_active = 0;
+ }
+ else if (strcmp(name, "BlackTrans") == 0 ||
+ strcmp(name, "GCRLower") == 0 ||
+ strcmp(name, "GCRUpper") == 0)
+ {
+ const paper_adjustment_t *paper_adj = get_media_adjustment(v);
+ if (paper_adj &&
+ stp_get_string_parameter(v, "PrintingMode") &&
+ strcmp(stp_get_string_parameter(v, "PrintingMode"), "BW") != 0)
+ {
+ if (paper_adj)
+ {
+ if (strcmp(name, "BlackTrans") == 0)
+ description->deflt.dbl = paper_adj->k_transition;
+ else if (strcmp(name, "GCRUpper") == 0)
+ description->deflt.dbl = paper_adj->k_upper;
+ else if (strcmp(name, "GCRLower") == 0)
+ description->deflt.dbl = paper_adj->k_lower;
+ }
+ }
+ else
+ description->p_type = STP_PARAMETER_TYPE_INVALID;
+ }
+ else if (strcmp(name, "GrayValue") == 0)
+ set_gray_value_parameter(v, description, 2);
+ else if (strcmp(name, "DarkGrayValue") == 0 ||
+ strcmp(name, "LightGrayValue") == 0)
+ set_gray_value_parameter(v, description, 3);
+ else if (strcmp(name, "Gray1Value") == 0 ||
+ strcmp(name, "Gray2Value") == 0 ||
+ strcmp(name, "Gray3Value") == 0)
+ set_gray_value_parameter(v, description, 4);
+ else if (strcmp(name, "LightCyanValue") == 0)
+ set_color_value_parameter(v, description, STP_ECOLOR_C);
+ else if (strcmp(name, "LightMagentaValue") == 0)
+ set_color_value_parameter(v, description, STP_ECOLOR_M);
+ else if (strcmp(name, "DarkYellowValue") == 0)
+ set_color_value_parameter(v, description, STP_ECOLOR_Y);
else if (strcmp(name, "GrayTransition") == 0)
set_gray_transition_parameter(v, description, 2);
else if (strcmp(name, "DarkGrayTransition") == 0 ||
@@ -1960,6 +2384,21 @@ escp2_parameters(const stp_vars_t *v, const char *name,
set_color_transition_parameter(v, description, STP_ECOLOR_M);
else if (strcmp(name, "DarkYellowTransition") == 0)
set_color_transition_parameter(v, description, STP_ECOLOR_Y);
+ else if (strcmp(name, "GrayScale") == 0)
+ set_gray_scale_parameter(v, description, 2);
+ else if (strcmp(name, "DarkGrayScale") == 0 ||
+ strcmp(name, "LightGrayScale") == 0)
+ set_gray_scale_parameter(v, description, 3);
+ else if (strcmp(name, "Gray1Scale") == 0 ||
+ strcmp(name, "Gray2Scale") == 0 ||
+ strcmp(name, "Gray3Scale") == 0)
+ set_gray_scale_parameter(v, description, 4);
+ else if (strcmp(name, "LightCyanScale") == 0)
+ set_color_scale_parameter(v, description, STP_ECOLOR_C);
+ else if (strcmp(name, "LightMagentaScale") == 0)
+ set_color_scale_parameter(v, description, STP_ECOLOR_M);
+ else if (strcmp(name, "DarkYellowScale") == 0)
+ set_color_scale_parameter(v, description, STP_ECOLOR_Y);
else if (strcmp(name, "AlignmentPasses") == 0)
{
description->deflt.integer = escp2_alignment_passes(v);
@@ -2188,6 +2627,10 @@ internal_imageable_area(const stp_vars_t *v, int use_paper_margins,
}
}
}
+ if (width > escp2_max_imageable_width(v))
+ width = escp2_max_imageable_width(v);
+ if (height > escp2_max_imageable_height(v))
+ height = escp2_max_imageable_height(v);
*left = left_margin;
*right = width - right_margin;
*top = top_margin;
@@ -2546,14 +2989,38 @@ setup_inks(stp_vars_t *v)
{
escp2_privdata_t *pd = get_privdata(v);
int i, j;
- const escp2_dropsize_t *drops;
+ escp2_dropsize_t *drops;
const escp2_inkname_t *ink_type = pd->inkname;
const paper_adjustment_t *paper = pd->paper_adjustment;
int gloss_channel = -1;
double gloss_scale = get_double_param(v, "Density");
- drops = escp2_dropsizes(v, pd->ink_resid);
+ drops = escp2_copy_dropsizes(v, pd->ink_resid);
stp_init_debug_messages(v);
+ if (stp_check_float_parameter(v, "DropSize1", STP_PARAMETER_ACTIVE))
+ {
+ drops->dropsizes[0] = stp_get_float_parameter(v, "DropSize1");
+ if (drops->dropsizes[0] > 0 && drops->numdropsizes < 1)
+ drops->numdropsizes = 1;
+ }
+ if (stp_check_float_parameter(v, "DropSize2", STP_PARAMETER_ACTIVE))
+ {
+ drops->dropsizes[1] = stp_get_float_parameter(v, "DropSize2");
+ if (drops->dropsizes[1] > 0 && drops->numdropsizes < 2)
+ drops->numdropsizes = 2;
+ }
+ if (stp_check_float_parameter(v, "DropSize3", STP_PARAMETER_ACTIVE))
+ {
+ drops->dropsizes[2] = stp_get_float_parameter(v, "DropSize3");
+ if (drops->dropsizes[2] > 0 && drops->numdropsizes < 3)
+ drops->numdropsizes = 3;
+ }
+ for (i = drops->numdropsizes - 1; i >= 0; i--)
+ {
+ if (drops->dropsizes[i] > 0)
+ break;
+ drops->numdropsizes--;
+ }
for (i = 0; i < pd->logical_channels; i++)
{
const ink_channel_t *channel = ink_type->channel_set->channels[i];
@@ -2561,7 +3028,7 @@ setup_inks(stp_vars_t *v)
{
int hue_curve_found = 0;
const char *param = channel->subchannels[0].channel_density;
- const shade_t *shades = escp2_shades(v, i);
+ shade_t *shades = escp2_copy_shades(v, i);
double userval = get_double_param(v, param);
if (shades->n_shades < channel->n_subchannels)
{
@@ -2577,6 +3044,14 @@ setup_inks(stp_vars_t *v)
gloss_channel = i;
}
}
+ for (j = 0; j < channel->n_subchannels; j++)
+ {
+ const char *subparam =
+ channel->subchannels[j].subchannel_value;
+ if (subparam &&
+ stp_check_float_parameter(v, subparam, STP_PARAMETER_ACTIVE))
+ shades->shades[j] = stp_get_float_parameter(v, subparam);
+ }
stp_dither_set_inks(v, i, 1.0, ink_darknesses[i % 8],
channel->n_subchannels, shades->shades,
drops->numdropsizes, drops->dropsizes);
@@ -2587,7 +3062,13 @@ setup_inks(stp_vars_t *v)
double scale = userval * get_double_param(v, subparam);
scale *= get_double_param(v, "Density");
stp_channel_set_density_adjustment(v, i, j, scale);
- if (paper)
+ subparam =
+ channel->subchannels[j].subchannel_transition;
+ if (subparam &&
+ stp_check_float_parameter(v, subparam, STP_PARAMETER_ACTIVE))
+ stp_channel_set_cutoff_adjustment
+ (v, i, j, stp_get_float_parameter(v, subparam));
+ else if (paper)
stp_channel_set_cutoff_adjustment(v, i, j,
paper->subchannel_cutoff);
}
@@ -2627,6 +3108,7 @@ setup_inks(stp_vars_t *v)
}
}
}
+ escp2_free_shades(shades);
}
}
if (pd->use_aux_channels)
@@ -2640,7 +3122,7 @@ setup_inks(stp_vars_t *v)
{
int ch = i + base_count;
const char *param = channel->subchannels[0].channel_density;
- const shade_t *shades = escp2_shades(v, ch);
+ shade_t *shades = escp2_copy_shades(v, ch);
double userval = get_double_param(v, param);
if (shades->n_shades < channel->n_subchannels)
{
@@ -2652,6 +3134,14 @@ setup_inks(stp_vars_t *v)
stp_channel_set_gloss_channel(v, ch);
stp_channel_set_gloss_limit(v, gloss_scale);
}
+ for (j = 0; j < channel->n_subchannels; j++)
+ {
+ const char *subparam =
+ channel->subchannels[j].subchannel_value;
+ if (subparam &&
+ stp_check_float_parameter(v, subparam, STP_PARAMETER_ACTIVE))
+ shades->shades[j] = stp_get_float_parameter(v, subparam);
+ }
stp_dither_set_inks(v, ch, 1.0, ink_darknesses[ch % 8],
channel->n_subchannels, shades->shades,
drops->numdropsizes, drops->dropsizes);
@@ -2662,7 +3152,13 @@ setup_inks(stp_vars_t *v)
double scale = userval * get_double_param(v, subparam);
scale *= get_double_param(v, "Density");
stp_channel_set_density_adjustment(v, ch, j, scale);
- if (paper)
+ subparam =
+ channel->subchannels[j].subchannel_transition;
+ if (subparam &&
+ stp_check_float_parameter(v, subparam, STP_PARAMETER_ACTIVE))
+ stp_channel_set_cutoff_adjustment
+ (v, ch, j, stp_get_float_parameter(v, subparam));
+ else if (paper)
stp_channel_set_cutoff_adjustment(v, ch, j,
paper->subchannel_cutoff);
}
@@ -2677,9 +3173,11 @@ setup_inks(stp_vars_t *v)
stp_channel_set_curve(v, ch, curve_tmp);
stp_curve_destroy(curve_tmp);
}
+ escp2_free_shades(shades);
}
}
}
+ escp2_free_dropsizes(drops);
stp_flush_debug_messages(v);
}
diff --git a/src/main/print-escp2.h b/src/main/print-escp2.h
index 4f88f4d..622b0ab 100644
--- a/src/main/print-escp2.h
+++ b/src/main/print-escp2.h
@@ -1,5 +1,5 @@
/*
- * "$Id: print-escp2.h,v 1.105.6.4 2007/12/29 20:42:28 rlk Exp $"
+ * "$Id: print-escp2.h,v 1.117 2008/01/19 21:08:45 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
@@ -68,7 +68,7 @@ typedef struct
{
const char *listname;
short numdropsizes;
- const double dropsizes[MAX_DROP_SIZES];
+ double dropsizes[MAX_DROP_SIZES];
} escp2_dropsize_t;
typedef const escp2_dropsize_t *escp2_drop_list_t[RES_N];
@@ -177,6 +177,8 @@ typedef struct
short head_offset;
short split_channel_count;
const char *channel_density;
+ const char *subchannel_transition;
+ const char *subchannel_value;
const char *subchannel_scale;
const short split_channels[PHYSICAL_CHANNEL_LIMIT];
} physical_subchannel_t;
@@ -227,7 +229,7 @@ typedef struct
typedef struct
{
int n_shades;
- const double shades[PHYSICAL_CHANNEL_LIMIT];
+ double shades[PHYSICAL_CHANNEL_LIMIT];
} shade_t;
typedef shade_t shade_set_t[PHYSICAL_CHANNEL_LIMIT];
@@ -407,7 +409,11 @@ typedef struct
#define MODEL_INTERCHANGEABLE_INK_MASK 0x2000ul
#define MODEL_INTERCHANGEABLE_INK_NO 0x0000ul
-#define MODEL_INTERCHANGEABLE_INK_YES 0x1000ul
+#define MODEL_INTERCHANGEABLE_INK_YES 0x2000ul
+
+#define MODEL_ENVELOPE_LANDSCAPE_MASK 0x4000ul
+#define MODEL_ENVELOPE_LANDSCAPE_NO 0x0000ul
+#define MODEL_ENVELOPE_LANDSCAPE_YES 0x4000ul
typedef enum
{
@@ -421,6 +427,7 @@ typedef enum
MODEL_SUPPORTS_INK_CHANGE,
MODEL_PACKET_MODE,
MODEL_INTERCHANGEABLE_INK,
+ MODEL_ENVELOPE_LANDSCAPE,
MODEL_LIMIT
} escp2_model_option_t;
@@ -481,6 +488,8 @@ typedef struct escp2_printer
int max_paper_height; /* Maximum paper height, in points */
int min_paper_width; /* Maximum paper width, in points */
int min_paper_height; /* Maximum paper height, in points */
+ int max_imageable_width; /* Maximum imageable area, in points */
+ int max_imageable_height; /* Maximum imageable area, in points */
/*****************************************************************************/
/* Borders */
/* SHEET FED: */
@@ -677,5 +686,5 @@ extern void stpi_escp2_terminate_page(stp_vars_t *v);
#endif /* GUTENPRINT_INTERNAL_ESCP2_H */
/*
- * End of "$Id: print-escp2.h,v 1.105.6.4 2007/12/29 20:42:28 rlk Exp $".
+ * End of "$Id: print-escp2.h,v 1.117 2008/01/19 21:08:45 rlk Exp $".
*/
diff --git a/src/main/print-lexmark.c b/src/main/print-lexmark.c
index 69bc08f..005ed1e 100644
--- a/src/main/print-lexmark.c
+++ b/src/main/print-lexmark.c
@@ -1,6 +1,6 @@
/*
- * "$Id: print-lexmark.c,v 1.154.8.1 2007/12/15 20:35:48 rlk Exp $"
+ * "$Id: print-lexmark.c,v 1.155 2007/08/27 00:44:12 rlk Exp $"
*
* Print plug-in Lexmark driver for the GIMP.
*
diff --git a/src/main/print-olympus.c b/src/main/print-olympus.c
index e2ef864..29c4f20 100644
--- a/src/main/print-olympus.c
+++ b/src/main/print-olympus.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-olympus.c,v 1.61.2.3 2007/12/29 20:42:28 rlk Exp $"
+ * "$Id: print-olympus.c,v 1.83 2007/12/27 20:34:28 rlk Exp $"
*
* Print plug-in DyeSub driver (formerly Olympus driver) for the GIMP.
*
@@ -39,8 +39,6 @@
#include <stdio.h>
#include <limits.h>
-#define STP_DBG_DYESUB STP_DBG_OLYMPUS
-
#ifdef __GNUC__
#define inline __inline__
#endif
@@ -2670,16 +2668,16 @@ print_dyesub_module_exit(void)
/* Module header */
-#define stp_module_version print_olympus_LTX_stp_module_version
-#define stp_module_data print_olympus_LTX_stp_module_data
+#define stp_module_version print_dyesub_LTX_stp_module_version
+#define stp_module_data print_dyesub_LTX_stp_module_data
stp_module_version_t stp_module_version = {0, 0};
stp_module_t stp_module_data =
{
- "olympus",
+ "dyesub",
VERSION,
- "Olympus family driver",
+ "DyeSub family driver",
STP_MODULE_CLASS_FAMILY,
NULL,
print_dyesub_module_init,
diff --git a/src/main/print-papers.c b/src/main/print-papers.c
index 1164c27..79dd59a 100644
--- a/src/main/print-papers.c
+++ b/src/main/print-papers.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-papers.c,v 1.35 2004/09/17 18:38:25 rleigh Exp $"
+ * "$Id: print-papers.c,v 1.38 2008/01/15 03:48:46 rlk Exp $"
*
* Print plug-in driver utility functions for the GIMP.
*
@@ -270,6 +270,7 @@ stp_xml_process_paper(stp_mxml_node_t *paper) /* The paper node */
"bottom",
"top",
"unit",
+ "type",
NULL
};*/
stp_papersize_t *outpaper; /* Generated paper */
@@ -300,6 +301,7 @@ stp_xml_process_paper(stp_mxml_node_t *paper) /* The paper node */
outpaper->left = 0;
outpaper->bottom = 0;
outpaper->right = 0;
+ outpaper->paper_size_type = PAPERSIZE_TYPE_STANDARD;
if (outpaper->name)
id = 1;
@@ -378,10 +380,21 @@ stp_xml_process_paper(stp_mxml_node_t *paper) /* The paper node */
unit = 1;
}
}
+ if (!strcmp(prop_name, "type"))
+ {
+ stmp = stp_mxmlElementGetAttr(prop, "value");
+ if (stmp)
+ {
+ if (!strcmp(stmp, "envelope"))
+ outpaper->paper_size_type = PAPERSIZE_TYPE_ENVELOPE;
+ else
+ outpaper->paper_size_type = PAPERSIZE_TYPE_STANDARD;
+ }
+ }
}
prop = prop->next;
}
- if (id && name && width && height && unit) /* Margins are optional */
+ if (id && name && width && height && unit) /* Margins and type are optional */
return outpaper;
stp_free(outpaper);
outpaper = NULL;
diff --git a/src/main/print-pcl.c b/src/main/print-pcl.c
index 9a8fb2e..2455aa6 100644
--- a/src/main/print-pcl.c
+++ b/src/main/print-pcl.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-pcl.c,v 1.145.2.1 2007/12/15 20:35:49 rlk Exp $"
+ * "$Id: print-pcl.c,v 1.150 2008/04/26 01:15:11 rlk Exp $"
*
* Print plug-in HP PCL driver for the GIMP.
*
@@ -199,6 +199,9 @@ static const pcl_t pcl_media_types[] =
*/
#define PAPERSOURCE_MOD 16
+#define PAPERSOURCE_340_MOD (PAPERSOURCE_MOD)
+#define PAPERSOURCE_DJ_MOD (PAPERSOURCE_MOD << 1)
+#define PAPERSOURCE_ADJ_GUIDE (PAPERSOURCE_MOD << 2)
#define PCL_PAPERSOURCE_STANDARD 0 /* Don't output code */
#define PCL_PAPERSOURCE_MANUAL 2
@@ -209,20 +212,24 @@ static const pcl_t pcl_media_types[] =
#define PCL_PAPERSOURCE_LJ_TRAY3 4
#define PCL_PAPERSOURCE_LJ_TRAY4 5
#define PCL_PAPERSOURCE_LJ_TRAY1 8
+#define PCL_PAPERSOURCE_LJ_TRAY1_ADJ (PCL_PAPERSOURCE_LJ_TRAY1 + PAPERSOURCE_ADJ_GUIDE)
+#define PCL_PAPERSOURCE_LJ_TRAY2_ADJ (PCL_PAPERSOURCE_LJ_TRAY2 + PAPERSOURCE_ADJ_GUIDE)
+#define PCL_PAPERSOURCE_LJ_TRAY3_ADJ (PCL_PAPERSOURCE_LJ_TRAY3 + PAPERSOURCE_ADJ_GUIDE)
+#define PCL_PAPERSOURCE_LJ_TRAY4_ADJ (PCL_PAPERSOURCE_LJ_TRAY4 + PAPERSOURCE_ADJ_GUIDE)
/* Deskjet 340 types */
-#define PCL_PAPERSOURCE_340_PCSF 1 + PAPERSOURCE_MOD
+#define PCL_PAPERSOURCE_340_PCSF (1 + PAPERSOURCE_340_MOD)
/* Portable sheet feeder for 340 */
-#define PCL_PAPERSOURCE_340_DCSF 4 + PAPERSOURCE_MOD
+#define PCL_PAPERSOURCE_340_DCSF (4 + PAPERSOURCE_340_MOD)
/* Desktop sheet feeder for 340 */
/* Other Deskjet types */
-#define PCL_PAPERSOURCE_DJ_TRAY 1 + PAPERSOURCE_MOD + PAPERSOURCE_MOD
-#define PCL_PAPERSOURCE_DJ_TRAY2 4 + PAPERSOURCE_MOD + PAPERSOURCE_MOD
+#define PCL_PAPERSOURCE_DJ_TRAY (1 + PAPERSOURCE_DJ_MOD)
+#define PCL_PAPERSOURCE_DJ_TRAY2 (4 + PAPERSOURCE_DJ_MOD)
/* Tray 2 for 2500 */
-#define PCL_PAPERSOURCE_DJ_OPTIONAL 5 + PAPERSOURCE_MOD + PAPERSOURCE_MOD
+#define PCL_PAPERSOURCE_DJ_OPTIONAL (5 + PAPERSOURCE_DJ_MOD)
/* Optional source for 2500 */
-#define PCL_PAPERSOURCE_DJ_AUTO 7 + PAPERSOURCE_MOD + PAPERSOURCE_MOD
+#define PCL_PAPERSOURCE_DJ_AUTO (7 + PAPERSOURCE_DJ_MOD)
/* Autoselect for 2500 */
static const pcl_t pcl_media_sources[] =
@@ -230,9 +237,13 @@ static const pcl_t pcl_media_sources[] =
{ "Standard", N_ ("Standard"), PCL_PAPERSOURCE_STANDARD},
{ "Manual", N_ ("Manual"), PCL_PAPERSOURCE_MANUAL},
/* {"Envelope", PCL_PAPERSOURCE_ENVELOPE}, */
+ { "MultiPurposeAdj", N_ ("Tray 1 - Movable Guides"), PCL_PAPERSOURCE_LJ_TRAY1_ADJ},
{ "MultiPurpose", N_ ("Tray 1"), PCL_PAPERSOURCE_LJ_TRAY1},
+ { "UpperAdj", N_ ("Tray 2 - Movable Guides"), PCL_PAPERSOURCE_LJ_TRAY2_ADJ},
{ "Upper", N_ ("Tray 2"), PCL_PAPERSOURCE_LJ_TRAY2},
+ { "LowerAdj", N_ ("Tray 3 - Movable Guides"), PCL_PAPERSOURCE_LJ_TRAY3_ADJ},
{ "Lower", N_ ("Tray 3"), PCL_PAPERSOURCE_LJ_TRAY3},
+ { "LargeCapacityAdj", N_ ("Tray 4 - Movable Guides"), PCL_PAPERSOURCE_LJ_TRAY4_ADJ},
{ "LargeCapacity", N_ ("Tray 4"), PCL_PAPERSOURCE_LJ_TRAY4},
{ "Portable", N_ ("Portable Sheet Feeder"), PCL_PAPERSOURCE_340_PCSF},
{ "Desktop", N_ ("Desktop Sheet Feeder"), PCL_PAPERSOURCE_340_DCSF},
@@ -611,9 +622,13 @@ static const short laserjet_papersources[] =
{
PCL_PAPERSOURCE_STANDARD,
PCL_PAPERSOURCE_MANUAL,
+ PCL_PAPERSOURCE_LJ_TRAY1_ADJ,
PCL_PAPERSOURCE_LJ_TRAY1,
+ PCL_PAPERSOURCE_LJ_TRAY2_ADJ,
PCL_PAPERSOURCE_LJ_TRAY2,
+ PCL_PAPERSOURCE_LJ_TRAY3_ADJ,
PCL_PAPERSOURCE_LJ_TRAY3,
+ PCL_PAPERSOURCE_LJ_TRAY4_ADJ,
PCL_PAPERSOURCE_LJ_TRAY4,
-1,
};
@@ -1034,6 +1049,19 @@ static const pcl_cap_t pcl_model_capabilities[] =
emptylist,
laserjet_papersources,
},
+ /* PCL-4 with large paper */
+ { 23,
+ 13 * 72, 19 * 72,
+ 1, 1, /* Min paper size */
+ PCL_RES_150_150 | PCL_RES_300_300,
+ {12, 12, 18, 18},
+ {12, 12, 10, 10}, /* Check/Fix */
+ PCL_COLOR_NONE,
+ PCL_PRINTER_LJ,
+ ljbig_papersizes,
+ emptylist,
+ laserjet_papersources,
+ },
/* LaserJet III series */
{ 3,
17 * 72 / 2, 14 * 72,
@@ -1047,6 +1075,19 @@ static const pcl_cap_t pcl_model_capabilities[] =
emptylist,
laserjet_papersources,
},
+ /* LaserJet III series */
+ { 31,
+ 17 * 72 / 2, 14 * 72,
+ 1, 1, /* Min paper size */
+ PCL_RES_150_150 | PCL_RES_300_300,
+ {12, 12, 18, 18},
+ {12, 12, 10, 10}, /* Check/Fix */
+ PCL_COLOR_NONE,
+ PCL_PRINTER_LJ | PCL_PRINTER_TIFF | PCL_PRINTER_BLANKLINE,
+ ljsmall_papersizes,
+ emptylist,
+ laserjet_papersources,
+ },
/* Some laser printers don't have expanded A4 margins */
{ 32,
17 * 72 / 2, 14 * 72,
@@ -1060,6 +1101,19 @@ static const pcl_cap_t pcl_model_capabilities[] =
emptylist,
laserjet_papersources,
},
+ /* PCL-5 with large paper */
+ { 33,
+ 13 * 72, 19 * 72,
+ 1, 1, /* Min paper size */
+ PCL_RES_150_150 | PCL_RES_300_300,
+ {12, 12, 18, 18},
+ {12, 12, 10, 10}, /* Check/Fix */
+ PCL_COLOR_NONE,
+ PCL_PRINTER_LJ | PCL_PRINTER_TIFF | PCL_PRINTER_BLANKLINE,
+ ljbig_papersizes,
+ emptylist,
+ laserjet_papersources,
+ },
/* LaserJet 4L */
{ 4,
17 * 72 / 2, 14 * 72,
@@ -1114,6 +1168,20 @@ static const pcl_cap_t pcl_model_capabilities[] =
emptylist,
laserjet_papersources,
},
+ /* PCL-5c/5e/6/XL with large paper */
+ { 61,
+ 13 * 72, 19 * 72,
+ 1, 1, /* Min paper size */
+ PCL_RES_150_150 | PCL_RES_300_300 | PCL_RES_600_600,
+ {12, 12, 18, 18},
+ {12, 12, 10, 10}, /* Check/Fix */
+ PCL_COLOR_NONE,
+ PCL_PRINTER_LJ | PCL_PRINTER_NEW_ERG | PCL_PRINTER_TIFF | PCL_PRINTER_BLANKLINE |
+ PCL_PRINTER_DUPLEX,
+ ljbig_papersizes,
+ emptylist,
+ laserjet_papersources,
+ },
/* Some laser printers don't have expanded A4 margins */
{ 62,
17 * 72 / 2, 14 * 72,
@@ -2079,6 +2147,8 @@ pcl_do_print(stp_vars_t *v, stp_image_t *image)
const stp_papersize_t *pp;
int the_top_margin, /* Corrected top margin */
the_left_margin; /* Corrected left margin */
+ int manual_feed_left_adjust = 0;
+ int extra_left_margin = 0;
stp_curve_t *lum_adjustment;
stp_curve_t *hue_adjustment;
double density;
@@ -2264,6 +2334,12 @@ pcl_do_print(stp_vars_t *v, stp_image_t *image)
/* Correct the value by taking the modulus */
+ if ((pcl_media_source & PAPERSOURCE_ADJ_GUIDE) ==
+ PAPERSOURCE_ADJ_GUIDE)
+ {
+ manual_feed_left_adjust = 1;
+ stp_deprintf(STP_DBG_PCL, "Adjusting left margin for manual feed.\n");
+ }
pcl_media_source = pcl_media_source % PAPERSOURCE_MOD;
stp_zprintf(v, "\033&l%dH", pcl_media_source);
}
@@ -2454,8 +2530,26 @@ pcl_do_print(stp_vars_t *v, stp_image_t *image)
stp_deprintf(STP_DBG_PCL, "left %d margin %d top %d margin %d width %d height %d\n",
left, the_left_margin, top, the_top_margin, out_width, out_height);
+ if (manual_feed_left_adjust)
+ {
+ unsigned wdelta = caps->custom_max_width - stp_get_page_width(v);
+ if (wdelta > 0)
+ {
+ /*
+ * Why 3? I would expect it would be 2 here, but it appears
+ * that at least one printer (LJ 1022) actually partially
+ * adjusts the margin itself. Adjusting the left margin by 1/3
+ * of the difference between the maximum width and the actual
+ * width experimentally yields correct results -- rlk 20081014
+ */
+ stp_deprintf(STP_DBG_PCL,
+ " Adjusting manual feed left margin by %d\n", wdelta / 3);
+ extra_left_margin += wdelta / 3;
+ }
+ }
+
if (!privdata.do_cretb) {
- stp_zprintf(v, "\033&a%dH", 10 * left); /* Set left raster position */
+ stp_zprintf(v, "\033&a%dH", 10 * (left + extra_left_margin)); /* Set left raster position */
stp_zprintf(v, "\033&a%dV", 10 * (top + the_top_margin));
/* Set top raster position */
}
@@ -2466,7 +2560,7 @@ pcl_do_print(stp_vars_t *v, stp_image_t *image)
{
/* Move to top left of printed area */
stp_zprintf(v, "\033*p%dY", (top + the_top_margin)*4); /* Measured in dots. */
- stp_zprintf(v, "\033*p%dX", left*4);
+ stp_zprintf(v, "\033*p%dX", (left + extra_left_margin)*4);
}
stp_puts("\033*r1A", v); /* Start GFX */
diff --git a/src/main/print-ps.c b/src/main/print-ps.c
index 3bff8a4..c12bbc2 100644
--- a/src/main/print-ps.c
+++ b/src/main/print-ps.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-ps.c,v 1.87.8.2 2007/12/15 20:35:49 rlk Exp $"
+ * "$Id: print-ps.c,v 1.99 2007/12/24 03:05:52 rlk Exp $"
*
* Print plug-in Adobe PostScript driver for the GIMP.
*
@@ -39,6 +39,8 @@
#include <limits.h>
#endif
#include <stdio.h>
+#include <unistd.h>
+#include "xmlppd.h"
#ifdef _MSC_VER
#define strncasecmp(s,t,n) _strnicmp(s,t,n)
@@ -49,8 +51,8 @@
* Local variables...
*/
-static FILE *ps_ppd = NULL;
-static const char *ps_ppd_file = NULL;
+static char *m_ppd_file = NULL;
+static stp_mxml_node_t *m_ppd = NULL;
/*
@@ -59,47 +61,22 @@ static const char *ps_ppd_file = NULL;
static void ps_hex(const stp_vars_t *, unsigned short *, int);
static void ps_ascii85(const stp_vars_t *, unsigned short *, int, int);
-static char *ppd_find(const char *, const char *, const char *, int *);
static const stp_parameter_t the_parameters[] =
{
{
- "PageSize", N_("Page Size"), N_("Basic Printer Setup"),
- N_("Size of the paper being printed to"),
- STP_PARAMETER_TYPE_STRING_LIST, STP_PARAMETER_CLASS_CORE,
- STP_PARAMETER_LEVEL_BASIC, 1, 1, -1, 1, 0
- },
- {
- "MediaType", N_("Media Type"), N_("Basic Printer Setup"),
- N_("Type of media (plain paper, photo paper, etc.)"),
- STP_PARAMETER_TYPE_STRING_LIST, STP_PARAMETER_CLASS_FEATURE,
- STP_PARAMETER_LEVEL_BASIC, 1, 1, -1, 1, 0
- },
- {
- "InputSlot", N_("Media Source"), N_("Basic Printer Setup"),
- N_("Source (input slot) of the media"),
- STP_PARAMETER_TYPE_STRING_LIST, STP_PARAMETER_CLASS_FEATURE,
- STP_PARAMETER_LEVEL_BASIC, 1, 1, -1, 1, 0
- },
- {
- "Resolution", N_("Resolution"), N_("Basic Printer Setup"),
- N_("Resolution and quality of the print"),
- STP_PARAMETER_TYPE_STRING_LIST, STP_PARAMETER_CLASS_FEATURE,
- STP_PARAMETER_LEVEL_BASIC, 1, 1, -1, 1, 0
- },
- {
- "InkType", N_("Ink Type"), N_("Advanced Printer Setup"),
- N_("Type of ink in the printer"),
- STP_PARAMETER_TYPE_STRING_LIST, STP_PARAMETER_CLASS_FEATURE,
- STP_PARAMETER_LEVEL_BASIC, 1, 1, -1, 1, 0
- },
- {
"PPDFile", N_("PPDFile"), N_("Basic Printer Setup"),
N_("PPD File"),
STP_PARAMETER_TYPE_FILE, STP_PARAMETER_CLASS_FEATURE,
STP_PARAMETER_LEVEL_BASIC, 1, 1, -1, 1, 0
},
{
+ "ModelName", N_("Model Name"), N_("Basic Printer Setup"),
+ N_("PPD File Model Name"),
+ STP_PARAMETER_TYPE_STRING_LIST, STP_PARAMETER_CLASS_CORE,
+ STP_PARAMETER_LEVEL_INTERNAL, 0, 0, -1, 0, 0
+ },
+ {
"PrintingMode", N_("Printing Mode"), N_("Core Parameter"),
N_("Printing Output Mode"),
STP_PARAMETER_TYPE_STRING_LIST, STP_PARAMETER_CLASS_CORE,
@@ -110,17 +87,176 @@ static const stp_parameter_t the_parameters[] =
static const int the_parameter_count =
sizeof(the_parameters) / sizeof(const stp_parameter_t);
+static int
+ps_option_to_param(stp_parameter_t *param, stp_mxml_node_t *option)
+{
+ const char *group_text = stp_mxmlElementGetAttr(option, "grouptext");
+
+ if (group_text != NULL)
+ param->category = group_text;
+ else
+ param->category = NULL;
+
+ param->text = stp_mxmlElementGetAttr(option, "text");
+ param->help = stp_mxmlElementGetAttr(option, "text");
+ if (stp_mxmlElementGetAttr(option, "stptype"))
+ {
+ const char *default_value = stp_mxmlElementGetAttr(option, "default");
+ double stp_default_value = strtod(stp_mxmlElementGetAttr(option, "stpdefault"), 0);
+ double lower_bound = strtod(stp_mxmlElementGetAttr(option, "stplower"), NULL);
+ double upper_bound = strtod(stp_mxmlElementGetAttr(option, "stpupper"), NULL);
+ param->p_type = atoi(stp_mxmlElementGetAttr(option, "stptype"));
+ param->is_mandatory = atoi(stp_mxmlElementGetAttr(option, "stpmandatory"));
+ param->p_class = atoi(stp_mxmlElementGetAttr(option, "stpclass"));
+ param->p_level = atoi(stp_mxmlElementGetAttr(option, "stplevel"));
+ param->channel = (unsigned char) atoi(stp_mxmlElementGetAttr(option, "stpchannel"));
+ param->read_only = 0;
+ param->is_active = 1;
+ param->verify_this_parameter = 1;
+ param->name = stp_mxmlElementGetAttr(option, "stpname");
+ stp_deprintf(STP_DBG_PS,
+ "Gutenprint parameter %s type %d mandatory %d class %d level %d channel %d default %s %f",
+ param->name, param->p_type, param->is_mandatory,
+ param->p_class, param->p_level, param->channel,
+ default_value, stp_default_value);
+ switch (param->p_type)
+ {
+ case STP_PARAMETER_TYPE_DOUBLE:
+ param->deflt.dbl = stp_default_value;
+ param->bounds.dbl.upper = upper_bound;
+ param->bounds.dbl.lower = lower_bound;
+ stp_deprintf(STP_DBG_PS, " %.3f %.3f %.3f\n",
+ param->deflt.dbl, param->bounds.dbl.upper,
+ param->bounds.dbl.lower);
+ break;
+ case STP_PARAMETER_TYPE_DIMENSION:
+ param->deflt.dimension = atoi(default_value);
+ param->bounds.dimension.upper = (int) upper_bound;
+ param->bounds.dimension.lower = (int) lower_bound;
+ stp_deprintf(STP_DBG_PS, " %d %d %d\n",
+ param->deflt.dimension, param->bounds.dimension.upper,
+ param->bounds.dimension.lower);
+ break;
+ case STP_PARAMETER_TYPE_INT:
+ param->deflt.integer = atoi(default_value);
+ param->bounds.integer.upper = (int) upper_bound;
+ param->bounds.integer.lower = (int) lower_bound;
+ stp_deprintf(STP_DBG_PS, " %d %d %d\n",
+ param->deflt.integer, param->bounds.integer.upper,
+ param->bounds.integer.lower);
+ break;
+ case STP_PARAMETER_TYPE_BOOLEAN:
+ param->deflt.boolean = strcasecmp(default_value, "true") == 0 ? 1 : 0;
+ stp_deprintf(STP_DBG_PS, " %d\n", param->deflt.boolean);
+ break;
+ default:
+ stp_deprintf(STP_DBG_PS, "\n");
+ break;
+ }
+ }
+ else
+ {
+ const char *ui = stp_mxmlElementGetAttr(option, "ui");
+ param->name = stp_mxmlElementGetAttr(option, "name");
+ if (strcasecmp(ui, "Boolean") == 0)
+ param->p_type = STP_PARAMETER_TYPE_BOOLEAN;
+ else
+ param->p_type = STP_PARAMETER_TYPE_STRING_LIST;
+ if (strcmp(param->name, "PageSize") == 0)
+ param->p_class = STP_PARAMETER_CLASS_CORE;
+ else
+ param->p_class = STP_PARAMETER_CLASS_FEATURE;
+ param->p_level = STP_PARAMETER_LEVEL_BASIC;
+ param->is_mandatory = 1;
+ param->is_active = 1;
+ param->channel = -1;
+ param->verify_this_parameter = 1;
+ param->read_only = 0;
+ }
+
+ return 0;
+}
+
/*
* 'ps_parameters()' - Return the parameter values for the given parameter.
*/
+static int
+check_ppd_file(const stp_vars_t *v)
+{
+ const char *ppd_file = stp_get_file_parameter(v, "PPDFile");
+
+ if (ppd_file == NULL || ppd_file[0] == 0)
+ {
+ stp_dprintf(STP_DBG_PS, v, "Empty PPD file\n");
+ return 0;
+ }
+ else if (m_ppd_file && strcmp(m_ppd_file, ppd_file) == 0)
+ {
+ stp_dprintf(STP_DBG_PS, v, "Not replacing PPD file %s\n", m_ppd_file);
+ return 1;
+ }
+ else
+ {
+ stp_dprintf(STP_DBG_PS, v, "Replacing PPD file %s with %s\n",
+ m_ppd_file ? m_ppd_file : "(null)",
+ ppd_file ? ppd_file : "(null)");
+ if (m_ppd != NULL)
+ stp_mxmlDelete(m_ppd);
+ m_ppd = NULL;
+
+ if (m_ppd_file)
+ stp_free(m_ppd_file);
+ m_ppd_file = NULL;
+
+ if ((m_ppd = stpi_xmlppd_read_ppd_file(ppd_file)) == NULL)
+ {
+ stp_eprintf(v, "Unable to open PPD file %s\n", ppd_file);
+ return 0;
+ }
+
+ m_ppd_file = stp_strdup(ppd_file);
+ return 1;
+ }
+}
+
+
static stp_parameter_list_t
ps_list_parameters(const stp_vars_t *v)
{
stp_parameter_list_t *ret = stp_parameter_list_create();
+ stp_mxml_node_t *option;
int i;
+ int status = check_ppd_file(v);
+ stp_dprintf(STP_DBG_PS, v, "Adding parameters from %s\n",
+ m_ppd_file ? m_ppd_file : "(null)");
+
for (i = 0; i < the_parameter_count; i++)
stp_parameter_list_add_param(ret, &(the_parameters[i]));
+
+ if (status)
+ {
+ int num_options = stpi_xmlppd_find_option_count(m_ppd);
+ for (i=0; i < num_options; i++)
+ {
+ /* MEMORY LEAK!!! */
+ stp_parameter_t *param = stp_malloc(sizeof(stp_parameter_t));
+ option = stpi_xmlppd_find_option_index(m_ppd, i);
+ if (option)
+ {
+ ps_option_to_param(param, option);
+ if (param->p_type != STP_PARAMETER_TYPE_INVALID &&
+ strcmp(param->name, "PageRegion") != 0)
+ {
+ stp_dprintf(STP_DBG_PS, v, "Adding parameter %s %s\n",
+ param->name, param->text);
+ stp_parameter_list_add_param(ret, param);
+ }
+ else
+ stp_free(param);
+ }
+ }
+ }
return ret;
}
@@ -129,103 +265,116 @@ ps_parameters_internal(const stp_vars_t *v, const char *name,
stp_parameter_t *description)
{
int i;
- char line[1024],
- lname[255],
- loption[255],
- *ltext;
- const char *ppd_file = stp_get_file_parameter(v, "PPDFile");
+ stp_mxml_node_t *option;
+ int status = 0;
+ int num_choices;
+ const char *defchoice;
+
description->p_type = STP_PARAMETER_TYPE_INVALID;
description->deflt.str = 0;
+ description->is_active = 0;
if (name == NULL)
return;
- if (ppd_file != NULL && strlen(ppd_file) > 0 &&
- (ps_ppd_file == NULL || strcmp(ps_ppd_file, ppd_file) != 0))
- {
- if (ps_ppd != NULL)
- fclose(ps_ppd);
-
- ps_ppd = fopen(ppd_file, "r");
-
- if (ps_ppd == NULL)
- ps_ppd_file = NULL;
- else
- ps_ppd_file = ppd_file;
- }
+ status = check_ppd_file(v);
for (i = 0; i < the_parameter_count; i++)
+ {
if (strcmp(name, the_parameters[i].name) == 0)
{
stp_fill_parameter_settings(description, &(the_parameters[i]));
- break;
+ if (strcmp(name, "PPDFile") == 0)
+ description->is_active = 1;
+ else if (strcmp(name, "ModelName") == 0)
+ {
+ if (m_ppd && stp_mxmlElementGetAttr(m_ppd, "nickname"))
+ {
+ const char *nickname = stp_mxmlElementGetAttr(m_ppd, "nickname");
+ description->bounds.str = stp_string_list_create();
+ stp_string_list_add_string(description->bounds.str,
+ nickname, nickname);
+ description->deflt.str = nickname;
+ description->is_active = status;
+ }
+ else
+ description->is_active = 0;
+ return;
+ }
+ else if (strcmp(name, "PrintingMode") == 0)
+ {
+ if (! m_ppd || strcmp(stp_mxmlElementGetAttr(m_ppd, "color"), "1") == 0)
+ {
+ description->bounds.str = stp_string_list_create();
+ stp_string_list_add_string
+ (description->bounds.str, "Color", _("Color"));
+ stp_string_list_add_string
+ (description->bounds.str, "BW", _("Black and White"));
+ description->deflt.str =
+ stp_string_list_param(description->bounds.str, 0)->name;
+ description->is_active = 1;
+ }
+ else
+ description->is_active = 0;
+ return;
+ }
}
- if (strcmp(name, "PPDFile") == 0)
- return;
-
- if (strcmp(name, "PrintingMode") == 0)
- {
- description->bounds.str = stp_string_list_create();
- stp_string_list_add_string
- (description->bounds.str, "Color", _("Color"));
- stp_string_list_add_string
- (description->bounds.str, "BW", _("Black and White"));
- description->deflt.str =
- stp_string_list_param(description->bounds.str, 0)->name;
- return;
- }
+ }
- if (ps_ppd == NULL)
- {
- if (strcmp(name, "PageSize") == 0)
- {
- int papersizes = stp_known_papersizes();
- description->bounds.str = stp_string_list_create();
- for (i = 0; i < papersizes; i++)
- {
- const stp_papersize_t *pt = stp_get_papersize_by_index(i);
- if (strlen(pt->name) > 0)
- stp_string_list_add_string
- (description->bounds.str, pt->name, gettext(pt->text));
- }
- description->deflt.str =
- stp_string_list_param(description->bounds.str, 0)->name;
- description->is_active = 1;
- }
- else if (strcmp(name, "PPDFile") == 0)
- description->is_active = 1;
- else
- description->is_active = 0;
- return;
- }
+ if (!status)
+ return;
+ if ((option = stpi_xmlppd_find_option_named(m_ppd, name)) == NULL)
+ {
+ char *tmp = stp_malloc(strlen(name) + 4);
+ strcpy(tmp, "Stp");
+ strncat(tmp, name, strlen(name) + 3);
+ if ((option = stpi_xmlppd_find_option_named(m_ppd, tmp)) == NULL)
+ {
+ stp_dprintf(STP_DBG_PS, v, "no parameter %s", name);
+ stp_free(tmp);
+ return;
+ }
+ stp_free(tmp);
+ }
- rewind(ps_ppd);
+ ps_option_to_param(description, option);
+ if (description->p_type != STP_PARAMETER_TYPE_STRING_LIST)
+ return;
+ num_choices = atoi(stp_mxmlElementGetAttr(option, "num_choices"));
+ defchoice = stp_mxmlElementGetAttr(option, "default");
description->bounds.str = stp_string_list_create();
- while (fgets(line, sizeof(line), ps_ppd) != NULL)
- {
- if (line[0] != '*')
- continue;
+ stp_dprintf(STP_DBG_PS, v, "describe parameter %s, output name=[%s] text=[%s] category=[%s] choices=[%d] default=[%s]\n",
+ name, description->name, description->text,
+ description->category, num_choices, defchoice);
- if (sscanf(line, "*%s %[^:]", lname, loption) != 2)
- continue;
+ /* Describe all choices for specified option. */
+ for (i=0; i < num_choices; i++)
+ {
+ stp_mxml_node_t *choice = stpi_xmlppd_find_choice_index(option, i);
+ const char *choice_name = stp_mxmlElementGetAttr(choice, "name");
+ const char *choice_text = stp_mxmlElementGetAttr(choice, "text");
+ stp_string_list_add_string(description->bounds.str, choice_name, choice_text);
+ stp_dprintf(STP_DBG_PS, v, " parameter %s, choice %d [%s] [%s]",
+ name, i, choice_name, choice_text);
+ if (strcmp(choice_name, defchoice) == 0)
+ {
+ stp_dprintf(STP_DBG_PS, v,
+ " parameter %s, choice %d [%s] DEFAULT\n",
+ name, i, choice_name);
+ description->deflt.str = choice_name;
+ }
+ }
- if (strcasecmp(lname, name) == 0)
+ if (!description->deflt.str)
{
- if ((ltext = strchr(loption, '/')) != NULL)
- *ltext++ = '\0';
- else
- ltext = loption;
-
- stp_string_list_add_string(description->bounds.str, loption, ltext);
+ stp_dprintf(STP_DBG_PS, v,
+ " parameter %s, defaulting to [%s]",
+ name, stp_string_list_param(description->bounds.str, 0)->name);
+ description->deflt.str = stp_string_list_param(description->bounds.str, 0)->name;
}
- }
-
if (stp_string_list_count(description->bounds.str) > 0)
- description->deflt.str =
- stp_string_list_param(description->bounds.str, 0)->name;
- else
- description->is_active = 0;
+ description->is_active = 1;
return;
}
@@ -253,29 +402,35 @@ ps_media_size_internal(const stp_vars_t *v, /* I */
int *width, /* O - Width in points */
int *height) /* O - Height in points */
{
- char *dimensions; /* Dimensions of media size */
const char *pagesize = stp_get_string_parameter(v, "PageSize");
- const char *ppd_file_name = stp_get_file_parameter(v, "PPDFile");
- float fwidth, fheight;
+ int status = check_ppd_file(v);
if (!pagesize)
pagesize = "";
stp_dprintf(STP_DBG_PS, v,
"ps_media_size(%d, \'%s\', \'%s\', %p, %p)\n",
- stp_get_model_id(v), ppd_file_name, pagesize,
+ stp_get_model_id(v), m_ppd_file, pagesize,
(void *) width, (void *) height);
- if ((dimensions = ppd_find(ppd_file_name, "PaperDimension", pagesize, NULL))
- != NULL)
+ stp_default_media_size(v, width, height);
+
+ if (status)
{
- sscanf(dimensions, "%f%f", &fwidth, &fheight);
- *width = (int) fwidth;
- *height = (int) fheight;
- stp_dprintf(STP_DBG_PS, v, "dimensions '%s' %f %f %d %d\n",
- dimensions, fwidth, fheight, *width, *height);
+ stp_mxml_node_t *paper = stpi_xmlppd_find_page_size(m_ppd, pagesize);
+ if (paper)
+ {
+ *width = atoi(stp_mxmlElementGetAttr(paper, "width"));
+ *height = atoi(stp_mxmlElementGetAttr(paper, "height"));
+ }
+ else
+ {
+ *width = 0;
+ *height = 0;
+ }
}
- else
- stp_default_media_size(v, width, height);
+
+ stp_dprintf(STP_DBG_PS, v, "dimensions %d %d\n", *width, *height);
+ return;
}
static void
@@ -304,55 +459,55 @@ ps_imageable_area_internal(const stp_vars_t *v, /* I */
int *bottom, /* O - Bottom position in points */
int *top) /* O - Top position in points */
{
- char *area; /* Imageable area of media */
- float fleft, /* Floating point versions */
- fright,
- fbottom,
- ftop;
int width, height;
const char *pagesize = stp_get_string_parameter(v, "PageSize");
if (!pagesize)
pagesize = "";
- ps_media_size(v, &width, &height);
- if ((area = ppd_find(stp_get_file_parameter(v, "PPDFile"),
- "ImageableArea", pagesize, NULL))
- != NULL)
+ /* Set some defaults. */
+ ps_media_size_internal(v, &width, &height);
+ *left = 0;
+ *right = width;
+ *top = 0;
+ *bottom = height;
+
+ if (check_ppd_file(v))
{
- int status = sscanf(area, "%f%f%f%f", &fleft, &fbottom, &fright, &ftop);
- stp_dprintf(STP_DBG_PS, v,
- "area = \'%s\' status = %d l %f r %f b %f t %f h %d w %d\n",
- area, status, fleft, fright, fbottom, ftop, width, height);
- if (status)
+ stp_mxml_node_t *paper = stpi_xmlppd_find_page_size(m_ppd, pagesize);
+ if (paper)
{
- *left = (int) ceil((double) fleft);
- *right = (int) floor((double) fright);
- *bottom = (int) floor((double) height - fbottom);
- *top = (int) ceil((double) height - ftop);
- if (use_max_area)
- {
- if (*left > 0)
- *left = 0;
- if (*right < width)
- *right = width;
- if (*top > 0)
- *top = 0;
- if (*bottom < height)
- *bottom = height;
- }
+ double pleft = atoi(stp_mxmlElementGetAttr(paper, "left"));
+ double pright = atoi(stp_mxmlElementGetAttr(paper, "right"));
+ double ptop = atoi(stp_mxmlElementGetAttr(paper, "top"));
+ double pbottom = atoi(stp_mxmlElementGetAttr(paper, "bottom"));
+ stp_dprintf(STP_DBG_PS, v, "size=l %f r %f b %f t %f h %d w %d\n",
+ pleft, pright, pbottom, ptop, height, width);
+ *left = (int) pleft;
+ *right = (int) pright;
+ *top = height - (int) ptop;
+ *bottom = height - (int) pbottom;
+ stp_dprintf(STP_DBG_PS, v, ">>>> l %d r %d b %d t %d h %d w %d\n",
+ *left, *right, *bottom, *top, height, width);
}
- else
- *left = *right = *bottom = *top = 0;
- stp_dprintf(STP_DBG_PS, v, "l %d r %d b %d t %d h %d w %d\n",
- *left, *right, *bottom, *top, width, height);
}
- else
- {
- *left = 0;
- *right = width;
- *top = 0;
+
+ if (use_max_area)
+ {
+ if (*left > 0)
+ *left = 0;
+ if (*right < width)
+ *right = width;
+ if (*top > 0)
+ *top = 0;
+ if (*bottom < height)
*bottom = height;
- }
+ }
+
+ stp_dprintf(STP_DBG_PS, v, "pagesize %s max_area=%d l %d r %d b %d t %d h %d w %d\n",
+ pagesize ? pagesize : "(null)",
+ use_max_area, *left, *right, *bottom, *top, width, height);
+
+ return;
}
static void
@@ -449,6 +604,135 @@ ps_describe_output(const stp_vars_t *v)
return "Whitescale";
}
+static stp_string_list_t *
+ps_external_options(const stp_vars_t *v)
+{
+ stp_parameter_list_t param_list = ps_list_parameters(v);
+ stp_string_list_t *answer;
+ char *tmp;
+ char *ppd_name = NULL;
+ int i;
+#ifdef HAVE_LOCALE_H
+ char *locale;
+#endif
+ if (! param_list)
+ return NULL;
+ answer = stp_string_list_create();
+#ifdef HAVE_LOCALE_H
+ locale = stp_strdup(setlocale(LC_ALL, NULL));
+ setlocale(LC_ALL, "C");
+#endif
+ for (i = 0; i < stp_parameter_list_count(param_list); i++)
+ {
+ const stp_parameter_t *param = stp_parameter_list_param(param_list, i);
+ stp_parameter_t desc;
+ stp_describe_parameter(v, param->name, &desc);
+ if (desc.is_active)
+ {
+ stp_mxml_node_t *option;
+ if (m_ppd &&
+ (option = stpi_xmlppd_find_option_named(m_ppd, desc.name)) == NULL)
+ {
+ ppd_name = stp_malloc(strlen(desc.name) + 4);
+ strcpy(ppd_name, "Stp");
+ strncat(ppd_name, desc.name, strlen(desc.name) + 3);
+ if ((option = stpi_xmlppd_find_option_named(m_ppd, ppd_name)) == NULL)
+ {
+ stp_dprintf(STP_DBG_PS, v, "no parameter %s", desc.name);
+ STP_SAFE_FREE(ppd_name);
+ }
+ }
+ switch (desc.p_type)
+ {
+ case STP_PARAMETER_TYPE_STRING_LIST:
+ if (stp_get_string_parameter(v, desc.name) &&
+ strcmp(stp_get_string_parameter(v, desc.name),
+ desc.deflt.str))
+ {
+ stp_dprintf(STP_DBG_PS, v, "Adding string parameter %s (%s): %s %s\n",
+ desc.name, ppd_name ? ppd_name : "(null)",
+ stp_get_string_parameter(v, desc.name),
+ desc.deflt.str);
+ stp_string_list_add_string(answer,
+ ppd_name ? ppd_name : desc.name,
+ stp_get_string_parameter(v, desc.name));
+ }
+ break;
+ case STP_PARAMETER_TYPE_INT:
+ if (stp_get_int_parameter(v, desc.name) != desc.deflt.integer)
+ {
+ stp_dprintf(STP_DBG_PS, v, "Adding integer parameter %s (%s): %d %d\n",
+ desc.name, ppd_name ? ppd_name : "(null)",
+ stp_get_int_parameter(v, desc.name),
+ desc.deflt.integer);
+ stp_asprintf(&tmp, "%d", stp_get_int_parameter(v, desc.name));
+ stp_string_list_add_string(answer,
+ ppd_name ? ppd_name : desc.name,
+ tmp);
+ stp_free(tmp);
+ }
+ break;
+ case STP_PARAMETER_TYPE_BOOLEAN:
+ if (stp_get_boolean_parameter(v, desc.name) != desc.deflt.boolean)
+ {
+ stp_dprintf(STP_DBG_PS, v, "Adding boolean parameter %s (%s): %d %d\n",
+ desc.name, ppd_name ? ppd_name : "(null)",
+ stp_get_boolean_parameter(v, desc.name),
+ desc.deflt.boolean);
+ stp_asprintf(&tmp, "%s",
+ stp_get_boolean_parameter(v, desc.name) ?
+ "True" : "False");
+ stp_string_list_add_string(answer,
+ ppd_name ? ppd_name : desc.name,
+ tmp);
+ stp_free(tmp);
+ }
+ break;
+ case STP_PARAMETER_TYPE_DOUBLE:
+ if (fabs(stp_get_float_parameter(v, desc.name) - desc.deflt.dbl) > .00001)
+ {
+ stp_dprintf(STP_DBG_PS, v, "Adding float parameter %s (%s): %.3f %.3f\n",
+ desc.name, ppd_name ? ppd_name : "(null)",
+ stp_get_float_parameter(v, desc.name),
+ desc.deflt.dbl);
+ stp_asprintf(&tmp, "%.3f",
+ stp_get_float_parameter(v, desc.name));
+ stp_string_list_add_string(answer,
+ ppd_name ? ppd_name : desc.name,
+ tmp);
+ stp_free(tmp);
+ }
+ break;
+ case STP_PARAMETER_TYPE_DIMENSION:
+ if (stp_get_dimension_parameter(v, desc.name) !=
+ desc.deflt.dimension)
+ {
+ stp_dprintf(STP_DBG_PS, v, "Adding dimension parameter %s (%s): %d %d\n",
+ desc.name, ppd_name ? ppd_name : "(null)",
+ stp_get_dimension_parameter(v, desc.name),
+ desc.deflt.dimension);
+ stp_asprintf(&tmp, "%d",
+ stp_get_dimension_parameter(v, desc.name));
+ stp_string_list_add_string(answer,
+ ppd_name ? ppd_name : desc.name,
+ tmp);
+ stp_free(tmp);
+ }
+ break;
+ default:
+ break;
+ }
+ STP_SAFE_FREE(ppd_name);
+ }
+ stp_parameter_description_destroy(&desc);
+ }
+#ifdef HAVE_LOCALE_H
+ setlocale(LC_ALL, locale);
+ stp_free(locale);
+#endif
+ return answer;
+}
+
/*
* 'ps_print()' - Print an image to a PostScript printer.
*/
@@ -458,17 +742,11 @@ ps_print_internal(stp_vars_t *v, stp_image_t *image)
{
int status = 1;
int model = stp_get_model_id(v);
- const char *ppd_file = stp_get_file_parameter(v, "PPDFile");
- const char *resolution = stp_get_string_parameter(v, "Resolution");
- const char *media_size = stp_get_string_parameter(v, "PageSize");
- const char *media_type = stp_get_string_parameter(v, "MediaType");
- const char *media_source = stp_get_string_parameter(v, "InputSlot");
const char *print_mode = stp_get_string_parameter(v, "PrintingMode");
const char *input_image_type = stp_get_string_parameter(v, "InputImageType");
unsigned short *out = NULL;
int top = stp_get_top(v);
int left = stp_get_left(v);
- int i, j; /* Looping vars */
int y; /* Looping vars */
int page_left, /* Left margin of page */
page_right, /* Right margin of page */
@@ -485,30 +763,11 @@ ps_print_internal(stp_vars_t *v, stp_image_t *image)
out_offset; /* Output offset (Level 2 output) */
time_t curtime; /* Current time of day */
unsigned zero_mask;
- char *command; /* PostScript command */
- const char *temp; /* Temporary string pointer */
- int order, /* Order of command */
- num_commands; /* Number of commands */
- struct /* PostScript commands... */
- {
- const char *keyword, *choice;
- char *command;
- int order;
- } commands[4];
int image_height,
image_width;
int color_out = 0;
int cmyk_out = 0;
- if (!resolution)
- resolution = "";
- if (!media_size)
- media_size = "";
- if (!media_type)
- media_type = "";
- if (!media_source)
- media_source = "";
-
if (print_mode && strcmp(print_mode, "Color") == 0)
color_out = 1;
if (color_out &&
@@ -571,104 +830,10 @@ ps_print_internal(stp_vars_t *v, stp_image_t *image)
stp_puts("%%Orientation: Portrait\n", v);
stp_puts("%%EndComments\n", v);
- /*
- * Find any printer-specific commands...
- */
-
- num_commands = 0;
-
- if ((command = ppd_find(ppd_file, "PageSize", media_size, &order)) != NULL)
- {
- commands[num_commands].keyword = "PageSize";
- commands[num_commands].choice = media_size;
- commands[num_commands].command = stp_malloc(strlen(command) + 1);
- strcpy(commands[num_commands].command, command);
- commands[num_commands].order = order;
- num_commands ++;
- }
-
- if ((command = ppd_find(ppd_file, "InputSlot", media_source, &order)) != NULL)
- {
- commands[num_commands].keyword = "InputSlot";
- commands[num_commands].choice = media_source;
- commands[num_commands].command = stp_malloc(strlen(command) + 1);
- strcpy(commands[num_commands].command, command);
- commands[num_commands].order = order;
- num_commands ++;
- }
-
- if ((command = ppd_find(ppd_file, "MediaType", media_type, &order)) != NULL)
- {
- commands[num_commands].keyword = "MediaType";
- commands[num_commands].choice = media_type;
- commands[num_commands].command = stp_malloc(strlen(command) + 1);
- strcpy(commands[num_commands].command, command);
- commands[num_commands].order = order;
- num_commands ++;
- }
-
- if ((command = ppd_find(ppd_file, "Resolution", resolution, &order)) != NULL)
- {
- commands[num_commands].keyword = "Resolution";
- commands[num_commands].choice = resolution;
- commands[num_commands].command = stp_malloc(strlen(command) + 1);
- strcpy(commands[num_commands].command, command);
- commands[num_commands].order = order;
- num_commands ++;
- }
-
- /*
- * Sort the commands using the OrderDependency value...
- */
-
- for (i = 0; i < (num_commands - 1); i ++)
- for (j = i + 1; j < num_commands; j ++)
- if (commands[j].order < commands[i].order)
- {
- temp = commands[i].keyword;
- commands[i].keyword = commands[j].keyword;
- commands[j].keyword = temp;
-
- temp = commands[i].choice;
- commands[i].choice = commands[j].choice;
- commands[j].choice = temp;
-
- order = commands[i].order;
- commands[i].order = commands[j].order;
- commands[j].order = order;
-
- command = commands[i].command;
- commands[i].command = commands[j].command;
- commands[j].command = command;
- }
-
- /*
- * Send the commands...
- */
-
- if (num_commands > 0)
- {
- stp_puts("%%BeginSetup\n", v);
-
- for (i = 0; i < num_commands; i ++)
- {
- stp_puts("[{\n", v);
- stp_zprintf(v, "%%%%BeginFeature: *%s %s\n", commands[i].keyword,
- commands[i].choice);
- if (commands[i].command[0])
- {
- stp_puts(commands[i].command, v);
- if (commands[i].command[strlen(commands[i].command) - 1] != '\n')
- stp_puts("\n", v);
- }
-
- stp_puts("%%EndFeature\n", v);
- stp_puts("} stopped cleartomark\n", v);
- stp_free(commands[i].command);
- }
-
- stp_puts("%%EndSetup\n", v);
- }
+#if 0
+ /* This is still not correct -- rlk 20070601 */
+ ps_print_device_settings(v);
+#endif
/*
* Output the page...
@@ -996,93 +1161,6 @@ ps_ascii85(const stp_vars_t *v, /* I - File to print to */
}
-/*
- * 'ppd_find()' - Find a control string with the specified name & parameters.
- */
-
-static char * /* O - Control string */
-ppd_find(const char *ppd_file, /* I - Name of PPD file */
- const char *name, /* I - Name of parameter */
- const char *option, /* I - Value of parameter */
- int *order) /* O - Order of the control string */
-{
- char line[1024], /* Line from file */
- lname[255], /* Name from line */
- loption[255], /* Value from line */
- *opt; /* Current control string pointer */
- static char *value = NULL; /* Current control string value */
-
-
- if (ppd_file == NULL || name == NULL || option == NULL)
- return (NULL);
- if (!value)
- value = stp_zalloc(32768);
-
- if (ps_ppd_file == NULL || strcmp(ps_ppd_file, ppd_file) != 0)
- {
- if (ps_ppd != NULL)
- fclose(ps_ppd);
-
- ps_ppd = fopen(ppd_file, "r");
-
- if (ps_ppd == NULL)
- ps_ppd_file = NULL;
- else
- ps_ppd_file = ppd_file;
- }
-
- if (ps_ppd == NULL)
- return (NULL);
-
- if (order != NULL)
- *order = 1000;
-
- rewind(ps_ppd);
- while (fgets(line, sizeof(line), ps_ppd) != NULL)
- {
- if (line[0] != '*')
- continue;
-
- if (strncasecmp(line, "*OrderDependency:", 17) == 0 && order != NULL)
- {
- sscanf(line, "%*s%d", order);
- continue;
- }
- else if (sscanf(line, "*%s %[^/:]", lname, loption) != 2)
- continue;
-
- if (strcasecmp(lname, name) == 0 &&
- strcasecmp(loption, option) == 0)
- {
- opt = strchr(line, ':') + 1;
- while (*opt == ' ' || *opt == '\t')
- opt ++;
- if (*opt != '\"')
- continue;
-
- strcpy(value, opt + 1);
- if ((opt = strchr(value, '\"')) == NULL)
- {
- while (fgets(line, sizeof(line), ps_ppd) != NULL)
- {
- strcat(value, line);
- if (strchr(line, '\"') != NULL)
- {
- strcpy(strchr(value, '\"'), "\n");
- break;
- }
- }
- }
- else
- *opt = '\0';
-
- return (value);
- }
- }
-
- return (NULL);
-}
-
static const stp_printfuncs_t print_ps_printfuncs =
{
ps_list_parameters,
@@ -1097,7 +1175,7 @@ static const stp_printfuncs_t print_ps_printfuncs =
stp_verify_printer_params,
NULL,
NULL,
- NULL
+ ps_external_options
};
diff --git a/src/main/print-raw.c b/src/main/print-raw.c
index 5f4c31f..c345ae1 100644
--- a/src/main/print-raw.c
+++ b/src/main/print-raw.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-raw.c,v 1.38.8.1 2007/12/15 20:35:49 rlk Exp $"
+ * "$Id: print-raw.c,v 1.39 2007/08/27 00:44:12 rlk Exp $"
*
* Print plug-in RAW driver for the GIMP.
*
diff --git a/src/main/print-util.c b/src/main/print-util.c
index e0ac696..ad4e4b9 100644
--- a/src/main/print-util.c
+++ b/src/main/print-util.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-util.c,v 1.109.4.4 2007/12/15 20:35:49 rlk Exp $"
+ * "$Id: print-util.c,v 1.115 2007/09/02 18:11:51 rlk Exp $"
*
* Print plug-in driver utility functions for the GIMP.
*
diff --git a/src/main/print-vars.c b/src/main/print-vars.c
index e3d4195..ae0c8e4 100644
--- a/src/main/print-vars.c
+++ b/src/main/print-vars.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-vars.c,v 1.75.8.1 2007/05/29 01:47:29 rlk Exp $"
+ * "$Id: print-vars.c,v 1.81 2008/03/05 14:08:35 rlk Exp $"
*
* Print plug-in driver utility functions for the GIMP.
*
@@ -86,15 +86,14 @@ static int standard_vars_initialized = 0;
static stp_vars_t default_vars;
-static inline void
-check_vars(const stp_vars_t *v)
-{
- if (v == NULL)
- {
- stp_erprintf("Null stp_vars_t! Please report this bug.\n");
- stp_abort();
- }
-}
+#define CHECK_VARS(v) \
+do { \
+ if (v == NULL) \
+ { \
+ stp_erprintf("Null stp_vars_t! Please report this bug.\n"); \
+ stp_abort(); \
+ } \
+} while (0)
static const char *
value_namefunc(const void *item)
@@ -237,7 +236,7 @@ stp_allocate_component_data(stp_vars_t *v,
{
compdata_t *cd;
stp_list_item_t *item;
- check_vars(v);
+ CHECK_VARS(v);
cd = stp_malloc(sizeof(compdata_t));
item = stp_list_get_item_by_name(v->internal_data, name);
if (item)
@@ -253,7 +252,7 @@ void
stp_destroy_component_data(stp_vars_t *v, const char *name)
{
stp_list_item_t *item;
- check_vars(v);
+ CHECK_VARS(v);
item = stp_list_get_item_by_name(v->internal_data, name);
if (item)
stp_list_item_destroy(v->internal_data, item);
@@ -263,7 +262,7 @@ void *
stp_get_component_data(const stp_vars_t *v, const char *name)
{
stp_list_item_t *item;
- check_vars(v);
+ CHECK_VARS(v);
item = stp_list_get_item_by_name(v->internal_data, name);
if (item)
return ((compdata_t *) stp_list_item_get_data(item))->data;
@@ -332,7 +331,7 @@ void
stp_vars_destroy(stp_vars_t *v)
{
int i;
- check_vars(v);
+ CHECK_VARS(v);
for (i = 0; i < STP_PARAMETER_TYPE_INVALID; i++)
stp_list_destroy(v->params[i]);
stp_list_destroy(v->internal_data);
@@ -345,7 +344,7 @@ stp_vars_destroy(stp_vars_t *v)
void \
pre##_set_##s(stp_vars_t *v, const char *val) \
{ \
- check_vars(v); \
+ CHECK_VARS(v); \
if (val) \
stp_deprintf(STP_DBG_VARS, "set %s to %s (0x%p)\n", #s, val, \
(const void *) v); \
@@ -362,7 +361,7 @@ pre##_set_##s(stp_vars_t *v, const char *val) \
void \
pre##_set_##s##_n(stp_vars_t *v, const char *val, int n) \
{ \
- check_vars(v); \
+ CHECK_VARS(v); \
if (v->s == val) \
return; \
STP_SAFE_FREE(v->s); \
@@ -373,7 +372,7 @@ pre##_set_##s##_n(stp_vars_t *v, const char *val, int n) \
const char * \
pre##_get_##s(const stp_vars_t *v) \
{ \
- check_vars(v); \
+ CHECK_VARS(v); \
return v->s; \
}
@@ -381,7 +380,7 @@ pre##_get_##s(const stp_vars_t *v) \
void \
pre##_set_##s(stp_vars_t *v, t val) \
{ \
- check_vars(v); \
+ CHECK_VARS(v); \
v->verified = 0; \
v->s = val; \
} \
@@ -389,7 +388,7 @@ pre##_set_##s(stp_vars_t *v, t val) \
t \
pre##_get_##s(const stp_vars_t *v) \
{ \
- check_vars(v); \
+ CHECK_VARS(v); \
return v->s; \
}
@@ -409,14 +408,14 @@ DEF_FUNCS(errfunc, stp_outfunc_t, stp)
void
stp_set_verified(stp_vars_t *v, int val)
{
- check_vars(v);
+ CHECK_VARS(v);
v->verified = val;
}
int
stp_get_verified(const stp_vars_t *v)
{
- check_vars(v);
+ CHECK_VARS(v);
return v->verified;
}
diff --git a/src/main/print-weave.c b/src/main/print-weave.c
index d440ef1..ce79ee4 100644
--- a/src/main/print-weave.c
+++ b/src/main/print-weave.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-weave.c,v 1.65.8.1 2007/03/02 12:01:32 rlk Exp $"
+ * "$Id: print-weave.c,v 1.68 2007/12/26 18:16:25 rlk Exp $"
*
* Softweave calculator for Gutenprint.
*
diff --git a/src/main/printers.c b/src/main/printers.c
index 0820a22..4cb0bc8 100644
--- a/src/main/printers.c
+++ b/src/main/printers.c
@@ -1,5 +1,5 @@
/*
- * "$Id: printers.c,v 1.79.2.2 2007/12/15 20:35:50 rlk Exp $"
+ * "$Id: printers.c,v 1.83 2008/01/21 23:34:25 rlk Exp $"
*
* Print plug-in driver utility functions for the GIMP.
*
@@ -66,6 +66,7 @@ struct stp_printer
char *family; /* Printer family */
char *manufacturer; /* Printer manufacturer */
int model; /* Model number */
+ int vars_initialized;
const stp_printfuncs_t *printfuncs;
stp_vars_t *printvars;
};
@@ -209,12 +210,6 @@ stpi_get_printfuncs(const stp_printer_t *printer)
return printer->printfuncs;
}
-const stp_vars_t *
-stp_printer_get_defaults(const stp_printer_t *printer)
-{
- return printer->printvars;
-}
-
const stp_printer_t *
stp_get_printer_by_long_name(const char *long_name)
@@ -357,7 +352,6 @@ stp_set_printer_defaults(stp_vars_t *v, const stp_printer_t *printer)
void
stp_initialize_printer_defaults(void)
{
- stp_list_item_t *printer_item;
if (printer_list == NULL)
{
stpi_init_printer_list();
@@ -365,16 +359,19 @@ stp_initialize_printer_defaults(void)
(STP_DBG_PRINTERS,
"stpi_family_register(): initialising printer_list...\n");
}
- printer_item = stp_list_get_start(printer_list);
- while (printer_item)
+}
+
+const stp_vars_t *
+stp_printer_get_defaults(const stp_printer_t *printer)
+{
+ if (! printer->vars_initialized)
{
- stp_deprintf
- (STP_DBG_PRINTERS, " ==>init %s\n",
- ((stp_printer_t *)(stp_list_item_get_data(printer_item)))->driver);
- set_printer_defaults
- (((stp_printer_t *)(stp_list_item_get_data(printer_item)))->printvars, 1);
- printer_item = stp_list_item_next(printer_item);
+ stp_printer_t *nc_printer = (stp_printer_t *) printer;
+ stp_deprintf(STP_DBG_PRINTERS, " ==>init %s\n", printer->driver);
+ set_printer_defaults (nc_printer->printvars, 1);
+ nc_printer->vars_initialized = 1;
}
+ return printer->printvars;
}
void
@@ -738,10 +735,6 @@ stp_verify_printer_params(stp_vars_t *v)
errbuf_t errbuf;
stp_outfunc_t ofunc = stp_get_errfunc(v);
void *odata = stp_get_errdata(v);
-
- stp_dprintf(STP_DBG_VARS, v, "** Entering stp_verify_printer_params(0x%p)\n",
- v);
-
stp_parameter_list_t params;
int nparams;
int i;
@@ -749,6 +742,9 @@ stp_verify_printer_params(stp_vars_t *v)
int left, top, bottom, right;
const char *pagesize = stp_get_string_parameter(v, "PageSize");
+ stp_dprintf(STP_DBG_VARS, v, "** Entering stp_verify_printer_params(0x%p)\n",
+ (void *) v);
+
stp_set_errfunc((stp_vars_t *) v, fill_buffer_writefunc);
stp_set_errdata((stp_vars_t *) v, &errbuf);
@@ -848,7 +844,7 @@ stp_verify_printer_params(stp_vars_t *v)
stp_free(errbuf.data);
}
stp_dprintf(STP_DBG_VARS, v, "** Exiting stp_verify_printer_params(0x%p) => %d\n",
- v, answer);
+ (void *) v, answer);
return answer;
}
@@ -901,8 +897,7 @@ stp_family_register(stp_list_t *family)
while(printer_item)
{
printer = (const stp_printer_t *) stp_list_item_get_data(printer_item);
- if (!stp_list_get_item_by_name(printer_list,
- stp_get_driver(printer->printvars)))
+ if (!stp_list_get_item_by_name(printer_list, printer->driver))
stp_list_item_create(printer_list, NULL, printer);
printer_item = stp_list_item_next(printer_item);
}
@@ -934,8 +929,7 @@ stp_family_unregister(stp_list_t *family)
{
printer = (const stp_printer_t *) stp_list_item_get_data(printer_item);
old_printer_item =
- stp_list_get_item_by_name(printer_list,
- stp_get_driver(printer->printvars));
+ stp_list_get_item_by_name(printer_list, printer->driver);
if (old_printer_item)
stp_list_item_destroy(printer_list, old_printer_item);
@@ -1075,10 +1069,10 @@ stp_printvars_create_from_xmltree(stp_mxml_node_t *printer,
outprintvars->name = sbuf;
prop = printer->child;
stp_deprintf(STP_DBG_XML, ">>stp_printvars_create_from_xmltree: %p, %s\n",
- outprintvars->printvars, outprintvars->name);
+ (void *) (outprintvars->printvars), outprintvars->name);
stp_fill_printvars_from_xmltree(prop, outprintvars->printvars);
stp_deprintf(STP_DBG_XML, "<<stp_printvars_create_from_xmltree: %p, %s\n",
- outprintvars->printvars, outprintvars->name);
+ (void *) (outprintvars->printvars), outprintvars->name);
return outprintvars;
}
diff --git a/src/main/printers.xml b/src/main/printers.xml
index 8250426..e815c23 100644
--- a/src/main/printers.xml
+++ b/src/main/printers.xml
@@ -4,7 +4,7 @@
XML description of printers known to libgutenprint
This file was originally generated. It should be edited by hand.
- "$Id: printers.xml,v 1.157.4.8 2007/12/29 20:42:28 rlk Exp $"
+ "$Id: printers.xml,v 1.227 2008/04/26 01:15:12 rlk Exp $"
-->
<gutenprint xmlns="http://gimp-print.sourceforge.net/xsd/gp.xsd-1.0"
@@ -59,13 +59,6 @@
<parameter type="float" name="MagentaGamma">1.3</parameter>
<parameter type="float" name="CyanGamma">1.3</parameter>
</parameters>
- <parameters name="PIXMA_iP4300_params">
- <parameter type="float" name="Brightness">0.7</parameter>
- <parameter type="float" name="Density">0.6</parameter>
- <parameter type="float" name="Contrast">1.7</parameter>
- <parameter type="float" name="Gamma">0.9</parameter>
- <parameter type="float" name="BlackGamma">0.6</parameter>
- </parameters>
<printer name="Canon BJ-30" driver="bjc-30" manufacturer="Canon" model="30" parameters="gamma_2_density_800_params" />
<printer name="Canon BJC-50" driver="bjc-50" manufacturer="Canon" model="4400" parameters="gamma_5_density_800_params" />
<printer name="Canon BJC-55" driver="bjc-55" manufacturer="Canon" model="4400" parameters="gamma_5_density_800_params" />
@@ -114,6 +107,7 @@
<printer name="Canon PIXMA iP5000" driver="bjc-PIXMA-iP5000" manufacturer="Canon" model="3004000" parameters="PIXMA_iP4000_params" />
<printer name="Canon PIXMA iP5200" driver="bjc-PIXMA-iP5200" manufacturer="Canon" model="3004200" parameters="PIXMA_iP4000_params" />
<printer name="Canon PIXMA iP5300" driver="bjc-PIXMA-iP5300" manufacturer="Canon" model="3005300" parameters="PIXMA_iP4000_params" />
+ <printer name="Canon PIXMA iP6000D" driver="bjc-PIXMA-iP6000D" manufacturer="Canon" model="3006000" parameters="PIXMA_iP4000_params" />
<printer name="Canon PIXMA iP6700" driver="bjc-PIXMA-iP6700" manufacturer="Canon" model="3006700" parameters="PIXMA_iP4000_params" />
<printer name="Canon PIXMA iP8500" driver="bjc-PIXMA-iP8500" manufacturer="Canon" model="3008500" parameters="PIXMA_iP4000_params" />
<printer name="Canon PIXMA iX5000" driver="bjc-PIXMA-iX5000" manufacturer="Canon" model="4005000" parameters="PIXMA_iX5000_params" />
@@ -122,6 +116,7 @@
<printer name="Canon PIXMA MP170" driver="bjc-MULTIPASS-MP170" manufacturer="Canon" model="5000150" parameters="PIXMA_iP4000_params" />
<printer name="Canon PIXMA MP180" driver="bjc-MULTIPASS-MP180" manufacturer="Canon" model="5000150" parameters="PIXMA_iP4000_params" />
<printer name="Canon PIXMA MP500" driver="bjc-MULTIPASS-MP500" manufacturer="Canon" model="3004200" parameters="PIXMA_iP4000_params" />
+ <printer name="Canon PIXMA MP520" driver="bjc-MULTIPASS-MP520" manufacturer="Canon" model="5000520" parameters="PIXMA_iP4000_params" />
<printer name="Canon PIXMA MP610" driver="bjc-MULTIPASS-MP610" manufacturer="Canon" model="3005300" parameters="PIXMA_iP4000_params" />
<printer name="Canon PIXMA MP700" driver="bjc-MULTIPASS-MP700" manufacturer="Canon" model="3003000" parameters="PIXMA_iP4000_params" />
<printer name="Canon PIXMA MP710" driver="bjc-MULTIPASS-MP710" manufacturer="Canon" model="3003000" parameters="PIXMA_iP4000_params" />
@@ -283,6 +278,8 @@
<printer name="Epson Stylus Photo R260" driver="escp2-r260" manufacturer="Epson" model="81" parameters="claria_params" />
<printer name="Epson Stylus Photo R265" driver="escp2-r265" manufacturer="Epson" model="81" parameters="claria_params" />
<printer name="Epson Stylus Photo R270" driver="escp2-r270" manufacturer="Epson" model="81" parameters="claria_params" />
+ <printer name="Epson Stylus Photo R280" driver="escp2-r280" manufacturer="Epson" model="81" parameters="claria_params" />
+ <printer name="Epson Stylus Photo R285" driver="escp2-r285" manufacturer="Epson" model="81" parameters="claria_params" />
<printer name="Epson Stylus Photo R300" driver="escp2-r300" manufacturer="Epson" model="63" parameters="standard_params" />
<printer name="Epson Stylus Photo R310" driver="escp2-r310" manufacturer="Epson" model="63" parameters="standard_params" />
<printer name="Epson Stylus Photo R320" driver="escp2-r320" manufacturer="Epson" model="63" parameters="standard_params" />
@@ -299,12 +296,15 @@
<printer name="Epson Stylus Photo RX510" driver="escp2-rx510" manufacturer="Epson" model="84" parameters="standard_params" />
<printer name="Epson Stylus Photo RX560" driver="escp2-rx560" manufacturer="Epson" model="81" parameters="claria_params" />
<printer name="Epson Stylus Photo RX580" driver="escp2-rx580" manufacturer="Epson" model="81" parameters="claria_params" />
+ <printer name="Epson Stylus Photo RX585" driver="escp2-rx585" manufacturer="Epson" model="81" parameters="claria_params" />
<printer name="Epson Stylus Photo RX590" driver="escp2-rx590" manufacturer="Epson" model="81" parameters="claria_params" />
<printer name="Epson Stylus Photo RX595" driver="escp2-rx595" manufacturer="Epson" model="81" parameters="claria_params" />
<printer name="Epson Stylus Photo RX600" driver="escp2-rx600" manufacturer="Epson" model="84" parameters="standard_params" />
<printer name="Epson Stylus Photo RX620" driver="escp2-rx620" manufacturer="Epson" model="84" parameters="standard_params" />
<printer name="Epson Stylus Photo RX630" driver="escp2-rx630" manufacturer="Epson" model="84" parameters="standard_params" />
<printer name="Epson Stylus Photo RX640" driver="escp2-rx640" manufacturer="Epson" model="81" parameters="claria_params" />
+ <printer name="Epson Stylus Photo RX680" driver="escp2-rx680" manufacturer="Epson" model="81" parameters="claria_params" />
+ <printer name="Epson Stylus Photo RX685" driver="escp2-rx685" manufacturer="Epson" model="81" parameters="claria_params" />
<printer name="Epson Stylus Photo RX700" driver="escp2-rx700" manufacturer="Epson" model="70" parameters="standard_params" />
<printer name="Epson Stylus Photo R800" driver="escp2-r800" manufacturer="Epson" model="64" parameters="standard_params" />
<printer name="Epson Stylus Photo R1800" driver="escp2-r1800" manufacturer="Epson" model="67" parameters="standard_params" />
@@ -361,29 +361,49 @@
<printer name="Epson Stylus CX9400" driver="escp2-cx9400" manufacturer="Epson" model="65" parameters="cx3500_params" />
<printer name="Epson Stylus D68" driver="escp2-d68" manufacturer="Epson" model="66" parameters="standard_params" />
<printer name="Epson Stylus D88" driver="escp2-d88" manufacturer="Epson" model="69" parameters="standard_params" />
+ <printer name="Epson Stylus D92" driver="escp2-d92" manufacturer="Epson" model="66" parameters="standard_params" />
<printer name="Epson Stylus D120" driver="escp2-d120" manufacturer="Epson" model="85" parameters="standard_params" />
<printer name="Epson Stylus DX3800" driver="escp2-dx3800" manufacturer="Epson" model="72" parameters="standard_params" />
<printer name="Epson Stylus DX3850" driver="escp2-dx3850" manufacturer="Epson" model="72" parameters="standard_params" />
<printer name="Epson Stylus DX4050" driver="escp2-dx4050" manufacturer="Epson" model="72" parameters="standard_params" />
<printer name="Epson Stylus DX4200" driver="escp2-dx4200" manufacturer="Epson" model="65" parameters="cx3500_params" />
<printer name="Epson Stylus DX4250" driver="escp2-dx4250" manufacturer="Epson" model="65" parameters="cx3500_params" />
+ <printer name="Epson Stylus DX4400" driver="escp2-dx4400" manufacturer="Epson" model="72" parameters="standard_params" />
+ <printer name="Epson Stylus DX4450" driver="escp2-dx4450" manufacturer="Epson" model="72" parameters="standard_params" />
<printer name="Epson Stylus DX4800" driver="escp2-dx4800" manufacturer="Epson" model="65" parameters="standard_params" />
+ <printer name="Epson Stylus DX7000F" driver="escp2-dx7000f" manufacturer="Epson" model="65" parameters="cx3500_params" />
+ <printer name="Epson Stylus DX7400" driver="escp2-dx7400" manufacturer="Epson" model="65" parameters="cx3500_params" />
+ <printer name="Epson Stylus DX7450" driver="escp2-dx7450" manufacturer="Epson" model="65" parameters="cx3500_params" />
+ <printer name="Epson Stylus DX8400" driver="escp2-dx8400" manufacturer="Epson" model="79" parameters="cx3500_params" />
+ <printer name="Epson Stylus DX8450" driver="escp2-dx8450" manufacturer="Epson" model="79" parameters="cx3500_params" />
<printer name="Epson PictureMate" driver="escp2-picmate" manufacturer="Epson" model="73" parameters="standard_params" />
+ <printer name="Epson PictureMate Dash" driver="escp2-picmatedash" manufacturer="Epson" model="86" parameters="standard_params" />
<printer name="Epson PictureMate Deluxe" driver="escp2-picmated" manufacturer="Epson" model="73" parameters="standard_params" />
- <printer name="Epson PictureMate Flash" driver="escp2-picmateflash" manufacturer="Epson" model="73" parameters="standard_params" />
- <printer name="Epson PictureMate Pal" driver="escp2-picmatepal" manufacturer="Epson" model="73" parameters="standard_params" />
- <printer name="Epson PictureMate Snap" driver="escp2-picmatesnap" manufacturer="Epson" model="73" parameters="standard_params" />
+ <printer name="Epson PictureMate Flash" driver="escp2-picmateflash" manufacturer="Epson" model="86" parameters="standard_params" />
+ <printer name="Epson PictureMate Pal" driver="escp2-picmatepal" manufacturer="Epson" model="86" parameters="standard_params" />
+ <printer name="Epson PictureMate Snap" driver="escp2-picmatesnap" manufacturer="Epson" model="86" parameters="standard_params" />
+ <printer name="Epson PictureMate 100" driver="escp2-picmate100" manufacturer="Epson" model="86" parameters="standard_params" />
<printer name="Epson PictureMate 200" driver="escp2-picmate200" manufacturer="Epson" model="73" parameters="standard_params" />
- <printer name="Epson PictureMate 210" driver="escp2-picmate210" manufacturer="Epson" model="73" parameters="standard_params" />
- <printer name="Epson PictureMate 240" driver="escp2-picmate240" manufacturer="Epson" model="73" parameters="standard_params" />
- <printer name="Epson PictureMate 250" driver="escp2-picmate250" manufacturer="Epson" model="73" parameters="standard_params" />
- <printer name="Epson PictureMate 280" driver="escp2-picmate280" manufacturer="Epson" model="73" parameters="standard_params" />
+ <printer name="Epson PictureMate 210" driver="escp2-picmate210" manufacturer="Epson" model="86" parameters="standard_params" />
+ <printer name="Epson PictureMate 240" driver="escp2-picmate240" manufacturer="Epson" model="86" parameters="standard_params" />
+ <printer name="Epson PictureMate 250" driver="escp2-picmate250" manufacturer="Epson" model="86" parameters="standard_params" />
+ <printer name="Epson PictureMate 260" driver="escp2-picmate260" manufacturer="Epson" model="86" parameters="standard_params" />
+ <printer name="Epson PictureMate 270" driver="escp2-picmate270" manufacturer="Epson" model="86" parameters="standard_params" />
+ <printer name="Epson PictureMate 280" driver="escp2-picmate280" manufacturer="Epson" model="86" parameters="standard_params" />
+ <printer name="Epson PictureMate 290" driver="escp2-picmate290" manufacturer="Epson" model="86" parameters="standard_params" />
+ <printer name="Epson PictureMate 500" driver="escp2-picmate500" manufacturer="Epson" model="73" parameters="standard_params" />
+ <printer name="Epson PictureMate 2005" driver="escp2-picmate2005" manufacturer="Epson" model="73" parameters="standard_params" />
<printer name="Epson CL 700" driver="escp2-cl700" manufacturer="Epson" model="38" parameters="480_params" />
<printer name="Epson CL 750" driver="escp2-cl750" manufacturer="Epson" model="43" parameters="480_params" />
<printer name="Epson CL 760" driver="escp2-cl760" manufacturer="Epson" model="56" parameters="480_params" />
<printer name="Epson E 100" driver="escp2-e100" manufacturer="Epson" model="73" parameters="standard_params" />
- <printer name="Epson E 150" driver="escp2-e150" manufacturer="Epson" model="73" parameters="standard_params" />
+ <printer name="Epson E 150" driver="escp2-e150" manufacturer="Epson" model="86" parameters="standard_params" />
<printer name="Epson E 200" driver="escp2-e200" manufacturer="Epson" model="73" parameters="standard_params" />
+ <printer name="Epson E 300" driver="escp2-e300" manufacturer="Epson" model="86" parameters="standard_params" />
+ <printer name="Epson E 500" driver="escp2-e500" manufacturer="Epson" model="86" parameters="standard_params" />
+ <printer name="Epson E 520" driver="escp2-e520" manufacturer="Epson" model="86" parameters="standard_params" />
+ <printer name="Epson E 700" driver="escp2-e700" manufacturer="Epson" model="86" parameters="standard_params" />
+ <printer name="Epson E 720" driver="escp2-e720" manufacturer="Epson" model="86" parameters="standard_params" />
<printer name="Epson EM 900C" driver="escp2-em900c" manufacturer="Epson" model="13" parameters="standard_params" />
<printer name="Epson EM 930C" driver="escp2-em930c" manufacturer="Epson" model="34" parameters="standard_params" />
<printer name="Epson MC 2000" driver="escp2-mc2000" manufacturer="Epson" model="26" parameters="standard_params" />
@@ -533,10 +553,15 @@
<printer name="Fujitsu PrintPartner 20W" driver="fujitsu-pp_20w" manufacturer="Fujitsu" model="6" parameters="pcl_laser_params" />
<printer name="Fujitsu PrintPartner 8000" driver="fujitsu-pp_8000" manufacturer="Fujitsu" model="3" parameters="pcl_laser_params" />
<printer name="Generic PCL 4 Printer" driver="pcl-g_4" manufacturer="Generic" model="2" parameters="pcl_laser_params" />
+ <printer name="Generic PCL 4 LF Printer" driver="pcl-g_4_l" manufacturer="Generic" model="23" parameters="pcl_laser_params" />
<printer name="Generic PCL 5 Printer" driver="pcl-g_5" manufacturer="Generic" model="3" parameters="pcl_laser_params" />
+ <printer name="Generic PCL 5 LF Printer" driver="pcl-g_5_l" manufacturer="Generic" model="33" parameters="pcl_laser_params" />
<printer name="Generic PCL 5c Printer" driver="pcl-g_5c" manufacturer="Generic" model="6" parameters="pcl_laser_params" />
+ <printer name="Generic PCL 5c LF Printer" driver="pcl-g_5c_l" manufacturer="Generic" model="61" parameters="pcl_laser_params" />
<printer name="Generic PCL 5e Printer" driver="pcl-g_5e" manufacturer="Generic" model="6" parameters="pcl_laser_params" />
+ <printer name="Generic PCL 5e LF Printer" driver="pcl-g_5e_l" manufacturer="Generic" model="61" parameters="pcl_laser_params" />
<printer name="Generic PCL 6/PCL XL Printer" driver="pcl-g_6" manufacturer="Generic" model="6" parameters="pcl_laser_params" />
+ <printer name="Generic PCL 6/PCL XL LF Printer" driver="pcl-g_6_l" manufacturer="Generic" model="61" parameters="pcl_laser_params" />
<printer name="HP Business Inkjet 2200" driver="hp-bij_2200" manufacturer="HP" model="900" parameters="pcl_inkjet_params" />
<printer name="HP Business Inkjet 2230" driver="hp-bij_2230" manufacturer="HP" model="900" parameters="pcl_inkjet_params" />
<printer name="HP Business Inkjet 2250" driver="hp-bij_2250" manufacturer="HP" model="900" parameters="pcl_inkjet_params" />
@@ -552,7 +577,7 @@
<printer name="HP Color LaserJet 5000" driver="hp-clj_5000" manufacturer="HP" model="6" parameters="pcl_laser_params" />
<printer name="HP Color LaserJet 5500" driver="hp-clj_5500" manufacturer="HP" model="6" parameters="pcl_laser_params" />
<printer name="HP Color LaserJet 8550GN" driver="hp-clj_8550gn" manufacturer="HP" model="6" parameters="pcl_laser_params" />
- <printer name="HP DesignJet 230" driver="pcl-desnj-230" manufacturer="HP" model="10230" parameters="pcl_inkjet_params" />
+ <printer name="HP DesignJet 230" driver="pcl-desnj-230" manufacturer="HP" model="10230" parameters="pcl_inkjet_params" />
<printer name="HP DesignJet 250C" driver="pcl-desnj-250" manufacturer="HP" model="10250" parameters="pcl_inkjet_params" />
<printer name="HP DesignJet 430" driver="pcl-desnj-430" manufacturer="HP" model="10230" parameters="pcl_inkjet_params" />
<printer name="HP DesignJet 450C" driver="pcl-desnj-450" manufacturer="HP" model="10250" parameters="pcl_inkjet_params" />
@@ -924,7 +949,7 @@
<printer name="Lexmark Z52" driver="lexmark-z52" manufacturer="Lexmark" model="10052" parameters="standard_params" />
<printer name="Lexmark Z53" driver="lexmark-z53" manufacturer="Lexmark" model="10052" parameters="standard_params" />
</family>
- <family name="olympus">
+ <family name="dyesub">
<printer name="Olympus P-10" driver="olympus-p10" manufacturer="Olympus" model="2" />
<printer name="Olympus P-11" driver="olympus-p11" manufacturer="Olympus" model="2" />
<printer name="Olympus P-200" driver="olympus-p200" manufacturer="Olympus" model="4" />
diff --git a/src/main/sequence.c b/src/main/sequence.c
index 09cb116..9cf5885 100644
--- a/src/main/sequence.c
+++ b/src/main/sequence.c
@@ -1,5 +1,5 @@
/*
- * "$Id: sequence.c,v 1.23.2.1 2007/12/15 20:35:51 rlk Exp $"
+ * "$Id: sequence.c,v 1.25 2008/01/21 23:19:41 rlk Exp $"
*
* Sequence data type. This type is designed to be derived from by
* the curve and dither matrix types.
@@ -140,6 +140,24 @@ stp_sequence_copy(stp_sequence_t *dest, const stp_sequence_t *source)
memcpy(dest->data, source->data, (sizeof(double) * source->size));
}
+void
+stp_sequence_reverse(stp_sequence_t *dest, const stp_sequence_t *source)
+{
+ int i;
+ check_sequence(dest);
+ check_sequence(source);
+
+ dest->recompute_range = source->recompute_range;
+ dest->blo = source->blo;
+ dest->bhi = source->bhi;
+ dest->rlo = source->rlo;
+ dest->rhi = source->rhi;
+ dest->size = source->size;
+ dest->data = stp_zalloc(sizeof(double) * source->size);
+ for (i = 0; i < source->size; i++)
+ dest->data[i] = source->data[source->size - i - 1];
+}
+
stp_sequence_t *
stp_sequence_create_copy(const stp_sequence_t *sequence)
{
@@ -150,6 +168,16 @@ stp_sequence_create_copy(const stp_sequence_t *sequence)
return ret;
}
+stp_sequence_t *
+stp_sequence_create_reverse(const stp_sequence_t *sequence)
+{
+ stp_sequence_t *ret;
+ check_sequence(sequence);
+ ret = stp_sequence_create();
+ stp_sequence_reverse(ret, sequence);
+ return ret;
+}
+
int
stp_sequence_set_bounds(stp_sequence_t *sequence, double low, double high)
{
diff --git a/src/main/util.h b/src/main/util.h
index 7a3fe61..91165e3 100644
--- a/src/main/util.h
+++ b/src/main/util.h
@@ -1,5 +1,5 @@
/*
- * "$Id: util.h,v 1.33.10.1 2007/03/02 12:01:33 rlk Exp $"
+ * "$Id: util.h,v 1.34 2007/02/24 21:43:49 faust3 Exp $"
*
* Gutenprint header.
*
@@ -70,5 +70,5 @@ extern stp_image_t* stpi_buffer_image(stp_image_t* image, unsigned int flags);
#endif /* GUTENPRINT_INTERNAL_UTIL_H */
/*
- * End of "$Id: util.h,v 1.33.10.1 2007/03/02 12:01:33 rlk Exp $".
+ * End of "$Id: util.h,v 1.34 2007/02/24 21:43:49 faust3 Exp $".
*/
diff --git a/src/main/xml.c b/src/main/xml.c
index c43b13b..5c38736 100644
--- a/src/main/xml.c
+++ b/src/main/xml.c
@@ -1,5 +1,5 @@
/*
- * "$Id: xml.c,v 1.33.18.1 2007/05/29 01:47:30 rlk Exp $"
+ * "$Id: xml.c,v 1.38 2007/05/26 15:53:06 rlk Exp $"
*
* XML parser - process Gutenprint XML data with mxml.
*
diff --git a/src/main/xmlppd.c b/src/main/xmlppd.c
new file mode 100644
index 0000000..6bd2611
--- /dev/null
+++ b/src/main/xmlppd.c
@@ -0,0 +1,530 @@
+/*
+ * "xmlppd.c"
+ *
+ * PPD to XML converter.
+ *
+ * Copyright 2007 by Michael R Sweet and Robert Krawitz
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+
+#include <stdio.h>
+#include <gutenprint/mxml.h>
+#include <stdlib.h>
+#include "xmlppd.h"
+
+typedef struct
+{
+ int order;
+ const char *name;
+} order_t;
+
+static int
+order_compare(const void *a, const void *b)
+{
+ const order_t *aa = (const order_t *)a;
+ const order_t *bb = (const order_t *)b;
+ if (aa->order < bb->order)
+ return -1;
+ else if (aa->order > bb->order)
+ return 1;
+ else
+ return strcmp(aa->name, bb->name);
+}
+
+
+static stp_mxml_node_t *
+find_element_named(stp_mxml_node_t *root, const char *name, const char *what)
+{
+ stp_mxml_node_t *element;
+ if (root && name)
+ {
+ for (element = stp_mxmlFindElement(root, root, what, NULL, NULL,
+ STP_MXML_DESCEND);
+ element;
+ element = stp_mxmlFindElement(element, root, what, NULL, NULL,
+ STP_MXML_DESCEND))
+ {
+ if (!strcmp(stp_mxmlElementGetAttr(element, "name"), name))
+ return element;
+ }
+ }
+ return NULL;
+}
+
+static stp_mxml_node_t *
+find_element_index(stp_mxml_node_t *root, int idx, const char *what)
+{
+ stp_mxml_node_t *element;
+ int count = 0;
+ if (root && idx >= 0)
+ {
+ for (element = stp_mxmlFindElement(root, root, what, NULL, NULL,
+ STP_MXML_DESCEND);
+ element;
+ element = stp_mxmlFindElement(element, root, what, NULL, NULL,
+ STP_MXML_DESCEND))
+ {
+ if (count++ == idx)
+ return element;
+ }
+ }
+ return NULL;
+}
+
+static size_t
+find_element_count(stp_mxml_node_t *root, const char *what)
+{
+ stp_mxml_node_t *element;
+ size_t count = 0;
+ if (root)
+ {
+ for (element = stp_mxmlFindElement(root, root, what, NULL, NULL,
+ STP_MXML_DESCEND);
+ element;
+ element = stp_mxmlFindElement(element, root, what, NULL, NULL,
+ STP_MXML_DESCEND))
+ count++;
+ }
+ return count;
+}
+
+stp_mxml_node_t *
+stpi_xmlppd_find_group_named(stp_mxml_node_t *root, const char *name)
+{
+ return find_element_named(root, name, "group");
+}
+
+stp_mxml_node_t *
+stpi_xmlppd_find_group_index(stp_mxml_node_t *root, int idx)
+{
+ return find_element_index(root, idx, "group");
+}
+
+int
+stpi_xmlppd_find_group_count(stp_mxml_node_t *root)
+{
+ return find_element_count(root, "group");
+}
+
+stp_mxml_node_t *
+stpi_xmlppd_find_option_named(stp_mxml_node_t *root, const char *name)
+{
+ return find_element_named(root, name, "option");
+}
+
+stp_mxml_node_t *
+stpi_xmlppd_find_option_index(stp_mxml_node_t *root, int idx)
+{
+ return find_element_index(root, idx, "option");
+}
+
+int
+stpi_xmlppd_find_option_count(stp_mxml_node_t *root)
+{
+ return find_element_count(root, "option");
+}
+
+stp_mxml_node_t *
+stpi_xmlppd_find_choice_named(stp_mxml_node_t *option, const char *name)
+{
+ return find_element_named(option, name, "choice");
+}
+
+stp_mxml_node_t *
+stpi_xmlppd_find_choice_index(stp_mxml_node_t *option, int idx)
+{
+ return find_element_index(option, idx, "choice");
+}
+
+int
+stpi_xmlppd_find_choice_count(stp_mxml_node_t *option)
+{
+ return find_element_count(option, "choice");
+}
+
+stp_mxml_node_t *
+stpi_xmlppd_find_page_size(stp_mxml_node_t *root, const char *name)
+{
+ return stpi_xmlppd_find_choice_named(stpi_xmlppd_find_option_named(root, "PageSize"), name);
+}
+
+static void
+parse_values(const char **data, int limit, char *value)
+{
+ int dptr = 0;
+ char *where = value;
+ char *end = value;
+ for (dptr = 0; dptr < limit; dptr++)
+ data[dptr] = NULL;
+ for (dptr = 0; *where && dptr < limit; dptr++)
+ {
+ where = end;
+ while (*where && isspace(*where))
+ where++;
+ end = where;
+ while (*end && !isspace(*end))
+ end++;
+ *end++ = '\0';
+ data[dptr] = where;
+ }
+}
+
+/*
+ * 'read_ppd_file()' - Read a PPD file into XML data.
+ */
+
+stp_mxml_node_t * /* O - PPD file as XML */
+stpi_xmlppd_read_ppd_file(const char *filename) /* I - PPD file */
+{
+ stp_mxml_node_t *ppd, /* Root node of "ppd" group */
+ *group, /* Current group */
+ *option, /* Current option */
+ *choice; /* Current choice */
+ FILE *fp; /* PPD file */
+ int ch, /* Current character */
+ sawcolon, /* Saw a colon? */
+ inquote, /* In a quoted string? */
+ num_choices = 0;
+ char buffer[32768], /* Line buffer */
+ *bufptr, /* Pointer into line */
+ *xptr, /* Pointer into line */
+ option_name[42], /* Option name */
+ stp_option_data_name[64], /* Option name */
+ *keyword, /* Pointer to option keyword */
+ *text, /* Pointer to text */
+ *value; /* Pointer to value */
+ order_t *order_array; /* Precedence order of options */
+ int i;
+ int option_count;
+ int order_length;
+ char *order_list;
+
+
+ /*
+ * Open the file...
+ */
+
+ if ((fp = fopen(filename, "rb")) == NULL)
+ {
+ perror(filename);
+ return (NULL);
+ }
+
+ /*
+ * Create the base PPD file tree; the completed tree will look like:
+ *
+ * <?xml version="1.0"?>
+ * <ppd color="0/1" level="1/2/3">
+ * <option name="..." text="..." default="..." section="..." order="..."
+ * type="...">
+ * <choice name="..." text="...">code</choice>
+ * ...
+ * </option>
+ * ...
+ * <group name="..." text="...">
+ * <option ...>
+ * <choice ...>code</choice>
+ * </option>
+ * </group>
+ * </ppd>
+ */
+
+/* xml = stp_mxmlNewXML("1.0"); */
+/* ppd = stp_mxmlNewElement(xml, "ppd"); */
+ ppd = stp_mxmlNewElement(STP_MXML_NO_PARENT, "ppd");
+
+ stp_mxmlElementSetAttr(ppd, "color", "0");
+ stp_mxmlElementSetAttr(ppd, "level", "2");
+
+ /*
+ * Read all of the lines of the form:
+ *
+ * *% comment
+ * *Keyword: value
+ * *Keyword OptionKeyword: value
+ * *Keyword OptionKeyword/Text: value
+ *
+ * Only save groups, options, and choices, along with specific metadata
+ * from the file...
+ */
+
+ group = NULL;
+ option = NULL;
+ option_name[0] = '\0';
+
+ while ((ch = getc(fp)) != EOF)
+ {
+ /*
+ * Read the line...
+ */
+
+ buffer[0] = ch;
+ bufptr = buffer + 1;
+ inquote = 0;
+ sawcolon = 0;
+
+ while ((ch != '\n' || inquote) && bufptr < (buffer + sizeof(buffer) - 1))
+ {
+ if ((ch = getc(fp)) == '\r')
+ {
+ if ((ch = getc(fp)) != '\n')
+ ungetc(ch, fp);
+ }
+
+ *bufptr++ = ch;
+
+ if (ch == ':' && !sawcolon)
+ sawcolon = 1;
+ else if (ch == '\"' && sawcolon)
+ inquote = !inquote;
+ }
+
+ /*
+ * Strip trailing whitespace...
+ */
+
+ for (bufptr --; bufptr > buffer && isspace(bufptr[-1] & 255); bufptr --);
+
+ *bufptr = '\0';
+
+ /*
+ * Now parse it...
+ */
+
+ if (!strncmp(buffer, "*%", 2) || !buffer[0])
+ continue;
+
+ if ((value = strchr(buffer, ':')) == NULL)
+ continue;
+
+ for (*value++ = '\0';
+ *value && (isspace(*value & 255) || (*value & 255) == '"');
+ value ++);
+ for (xptr = value;
+ *xptr && (*xptr & 255) != '"';
+ xptr ++);
+ if (*xptr == '"')
+ *xptr = '\0';
+
+ for (keyword = buffer; *keyword && !isspace(*keyword & 255); keyword ++);
+
+ while (isspace(*keyword & 255))
+ *keyword++ = '\0';
+
+ if ((text = strchr(keyword, '/')) != NULL)
+ *text++ = '\0';
+
+ /*
+ * And then use the parsed values...
+ */
+
+ if (!strcmp(buffer, "*ColorDevice"))
+ {
+ /*
+ * Color support...
+ */
+
+ if (!strcasecmp(value, "true"))
+ stp_mxmlElementSetAttr(ppd, "color", "1");
+ else
+ stp_mxmlElementSetAttr(ppd, "color", "0");
+ }
+ else if (!strcmp(buffer, "*LanguageLevel") && atoi(value) > 0)
+ {
+ /*
+ * PostScript language level...
+ */
+
+ stp_mxmlElementSetAttr(ppd, "level", value);
+ }
+ else if (!strcmp(buffer, "*StpDriverName"))
+ stp_mxmlElementSetAttr(ppd, "driver", value);
+ else if (!strcmp(buffer, "*ModelName"))
+ stp_mxmlElementSetAttr(ppd, "modelname", value);
+ else if (!strcmp(buffer, "*ShortNickName"))
+ stp_mxmlElementSetAttr(ppd, "shortnickname", value);
+ else if (!strcmp(buffer, "*NickName"))
+ stp_mxmlElementSetAttr(ppd, "nickname", value);
+ else if (!strcmp(buffer, "*OpenGroup"))
+ {
+ if ((text = strchr(value, '/')) != NULL)
+ *text++ = '\0';
+
+ group = stp_mxmlNewElement(ppd, "group");
+ stp_mxmlElementSetAttr(group, "name", value);
+ stp_mxmlElementSetAttr(group, "text", text ? text : value);
+ }
+ else if (!strcmp(buffer, "*CloseGroup"))
+ group = NULL;
+ else if ((!strcmp(buffer, "*OpenUI") || !strcmp(buffer, "*JCLOpenUI")) &&
+ keyword[0] == '*' && keyword[1])
+ {
+ /*
+ * Start a new option...
+ */
+
+ option = stp_mxmlNewElement(group ? group : ppd, "option");
+ stp_mxmlElementSetAttr(option, "name", keyword + 1);
+ stp_mxmlElementSetAttr(option, "text", text ? text : keyword + 1);
+ stp_mxmlElementSetAttr(option, "ui", value);
+
+ strncpy(option_name, keyword, sizeof(option_name) - 1);
+ option_name[sizeof(option_name) - 1] = '\0';
+ strcpy(stp_option_data_name, "*Stp");
+ strcpy(stp_option_data_name + 4, option_name + 1);
+ if (group)
+ {
+ stp_mxmlElementSetAttr(option, "groupname", stp_mxmlElementGetAttr(group, "name"));
+ stp_mxmlElementSetAttr(option, "grouptext", stp_mxmlElementGetAttr(group, "text"));
+ }
+ num_choices = 0;
+ }
+ else if (option && !strcmp(buffer, stp_option_data_name))
+ {
+ const char *data[8];
+ parse_values(data, 8, value);
+ if (data[7])
+ {
+ stp_mxmlElementSetAttr(option, "stptype", data[0]);
+ stp_mxmlElementSetAttr(option, "stpmandatory", data[1]);
+ stp_mxmlElementSetAttr(option, "stpclass", data[2]);
+ stp_mxmlElementSetAttr(option, "stplevel", data[3]);
+ stp_mxmlElementSetAttr(option, "stpchannel", data[4]);
+ stp_mxmlElementSetAttr(option, "stplower", data[5]);
+ stp_mxmlElementSetAttr(option, "stpupper", data[6]);
+ stp_mxmlElementSetAttr(option, "stpdefault", data[7]);
+ stp_mxmlElementSetAttr(option, "stpname", stp_option_data_name + 7);
+ }
+ }
+ else if (!strcmp(buffer, "*OrderDependency") && option)
+ {
+ /*
+ * Get order and section for option
+ */
+
+ char order[256], /* Order number */
+ section[256]; /* Section name */
+
+
+ if (sscanf(value, "%255s%255s", order, section) == 2)
+ {
+ stp_mxmlElementSetAttr(option, "order", order);
+ stp_mxmlElementSetAttr(option, "section", section);
+ }
+ }
+ else if (!strncmp(buffer, "*Default", 8) && option &&
+ !strcmp(buffer + 8, option_name + 1))
+ stp_mxmlElementSetAttr(option, "default", value);
+ else if (!strcmp(buffer, "*CloseUI") || !strcmp(buffer, "*JCLCloseUI"))
+ {
+ char buf[64];
+ (void) sprintf(buf, "%d", num_choices);
+ stp_mxmlElementSetAttr(option, "num_choices", buf);
+ option = NULL;
+ stp_option_data_name[0] = '\0';
+ }
+ else if (option && !strcmp(buffer, option_name))
+ {
+ /*
+ * A choice...
+ */
+
+ choice = stp_mxmlNewElement(option, "choice");
+ stp_mxmlElementSetAttr(choice, "name", keyword);
+ stp_mxmlElementSetAttr(choice, "text", text ? text : keyword);
+
+ if (value[0] == '\"')
+ value ++;
+
+ if (bufptr > buffer && bufptr[-1] == '\"')
+ {
+ bufptr --;
+ *bufptr = '\0';
+ }
+
+ stp_mxmlNewOpaque(choice, value);
+ num_choices++;
+ }
+ else if (!option && !strcmp(buffer, "*ImageableArea"))
+ {
+ stp_mxml_node_t *psize = stpi_xmlppd_find_page_size(ppd, keyword);
+ if (psize)
+ {
+ const char *data[4];
+ parse_values(data, 4, value);
+ if (data[3])
+ {
+ stp_mxmlElementSetAttr(psize, "left", data[0]);
+ stp_mxmlElementSetAttr(psize, "bottom", data[1]);
+ stp_mxmlElementSetAttr(psize, "right", data[2]);
+ stp_mxmlElementSetAttr(psize, "top", data[3]);
+ }
+ }
+ }
+ else if (!option && !strcmp(buffer, "*PaperDimension"))
+ {
+ stp_mxml_node_t *psize = stpi_xmlppd_find_page_size(ppd, keyword);
+ if (psize)
+ {
+ const char *data[2];
+ parse_values(data, 2, value);
+ if (data[1])
+ {
+ stp_mxmlElementSetAttr(psize, "width", data[0]);
+ stp_mxmlElementSetAttr(psize, "height", data[1]);
+ }
+ }
+ }
+ }
+ option_count = stpi_xmlppd_find_option_count(ppd);
+ order_length = 1; /* Terminating null */
+ order_array = malloc(sizeof(order_t) * option_count);
+ i = 0;
+ for (option = stp_mxmlFindElement(ppd, ppd, "option", NULL, NULL,
+ STP_MXML_DESCEND);
+ option && i < option_count;
+ option = stp_mxmlFindElement(option, ppd, "option", NULL, NULL,
+ STP_MXML_DESCEND))
+ {
+ if (stp_mxmlElementGetAttr(option, "order"))
+ {
+ order_array[i].name = stp_mxmlElementGetAttr(option, "name");
+ order_length += strlen(order_array[i].name) + 1;
+ order_array[i].order = atoi(stp_mxmlElementGetAttr(option, "order"));
+ i++;
+ }
+ }
+ option_count = i;
+ qsort(order_array, option_count, sizeof(order_t), &order_compare);
+ order_list = malloc(order_length);
+ order_length = 0;
+ for (i = 0; i < option_count; i++)
+ {
+ if (i > 0)
+ order_list[order_length++] = ' ';
+ strcpy(order_list + order_length, order_array[i].name);
+ order_length += strlen(order_array[i].name);
+ }
+ stp_mxmlElementSetAttr(ppd, "optionorder", order_list);
+ free(order_list);
+ free(order_array);
+ return (ppd);
+}
+
+/*
+ * End of "xmlppd.c".
+ */
diff --git a/src/main/xmlppd.h b/src/main/xmlppd.h
new file mode 100644
index 0000000..a348d70
--- /dev/null
+++ b/src/main/xmlppd.h
@@ -0,0 +1,46 @@
+/*
+ * "$Id: xmlppd.h,v 1.2 2007/12/24 03:05:52 rlk Exp $"
+ *
+ * Copyright 2007 by Michael R Sweet and Robert Krawitz
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef GUTENPRINT_INTERNAL_XMLPPD_H
+#define GUTENPRINT_INTERNAL_XMLPPD_H
+
+extern stp_mxml_node_t *stpi_xmlppd_find_group_named(stp_mxml_node_t *root, const char *name);
+
+extern stp_mxml_node_t *stpi_xmlppd_find_group_index(stp_mxml_node_t *root, int idx);
+
+extern int stpi_xmlppd_find_group_count(stp_mxml_node_t *root);
+
+extern stp_mxml_node_t *stpi_xmlppd_find_option_named(stp_mxml_node_t *root, const char *name);
+
+extern stp_mxml_node_t *stpi_xmlppd_find_option_index(stp_mxml_node_t *root, int idx);
+
+extern int stpi_xmlppd_find_option_count(stp_mxml_node_t *root);
+
+extern stp_mxml_node_t *stpi_xmlppd_find_choice_named(stp_mxml_node_t *option, const char *name);
+
+extern stp_mxml_node_t *stpi_xmlppd_find_choice_index(stp_mxml_node_t *option, int idx);
+
+extern int stpi_xmlppd_find_choice_count(stp_mxml_node_t *option);
+
+extern stp_mxml_node_t *stpi_xmlppd_find_page_size(stp_mxml_node_t *root, const char *name);
+
+extern stp_mxml_node_t *stpi_xmlppd_read_ppd_file(const char *filename);
+
+#endif /* GUTENPRINT_INTERNAL_XMLPPD_H */