summaryrefslogtreecommitdiff
path: root/src/main/print-pcl.c
diff options
context:
space:
mode:
authorDidier Raboud <odyx@debian.org>2014-04-16 08:13:23 +0200
committerDidier Raboud <odyx@debian.org>2014-04-16 08:13:23 +0200
commitd7d42f6c969dc54157d85b7b6b611581bbfa7595 (patch)
treedfa630457b374b77f1f128cbc9104ea2d6963575 /src/main/print-pcl.c
parentccd50c2bd4db57503722816aa23a5092cbe69f40 (diff)
Imported Upstream version 5.2.10~pre1
Diffstat (limited to 'src/main/print-pcl.c')
-rw-r--r--src/main/print-pcl.c37
1 files changed, 14 insertions, 23 deletions
diff --git a/src/main/print-pcl.c b/src/main/print-pcl.c
index 7c028c2..68d69d2 100644
--- a/src/main/print-pcl.c
+++ b/src/main/print-pcl.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-pcl.c,v 1.160 2010/12/05 21:38:15 rlk Exp $"
+ * "$Id: print-pcl.c,v 1.162 2014/01/04 23:07:22 rlk Exp $"
*
* Print plug-in HP PCL driver for the GIMP.
*
@@ -1724,7 +1724,7 @@ pcl_papersize_valid(const stp_papersize_t *pt,
return(0);
/*
- * Is it a recognised supported name?
+ * Is it a recognized supported name?
*/
if (pcl_convert_media_size(pt->name, model) != -1)
@@ -2274,23 +2274,19 @@ pcl_do_print(stp_vars_t *v, stp_image_t *image)
*yellow, /* Yellow bitmap data */
*lcyan, /* Light Cyan bitmap data */
*lmagenta; /* Light Magenta bitmap data */
- int page_width, /* Width of page */
- page_height, /* Height of page */
- page_left,
+ int page_left,
page_top,
page_right,
page_bottom,
out_width, /* Width of image on page */
out_height, /* Height of image on page */
- out_channels, /* Output bytes per pixel */
errdiv, /* Error dividend */
errmod, /* Error modulus */
errval, /* Current error value */
errline, /* Current raster line */
errlast; /* Last raster line loaded */
unsigned zero_mask;
- int image_height,
- image_width;
+ int image_height;
const pcl_cap_t *caps; /* Printer capabilities */
int planes = 3; /* # of output planes */
int pcl_media_size; /* PCL media size code */
@@ -2302,7 +2298,7 @@ pcl_do_print(stp_vars_t *v, stp_image_t *image)
int extra_left_margin = 0;
stp_curve_t *lum_adjustment;
stp_curve_t *hue_adjustment;
- double density;
+ double density;
if (!stp_verify(v))
{
@@ -2320,7 +2316,6 @@ pcl_do_print(stp_vars_t *v, stp_image_t *image)
stp_image_init(image);
image_height = stp_image_height(image);
- image_width = stp_image_width(image);
/*
* Figure out the output resolution...
@@ -2379,11 +2374,8 @@ pcl_do_print(stp_vars_t *v, stp_image_t *image)
&page_bottom, &page_top);
left -= page_left;
top -= page_top;
- page_width = page_right - page_left;
- page_height = page_bottom - page_top;
image_height = stp_image_height(image);
- image_width = stp_image_width(image);
/*
* Set media size here because it is needed by the margin calculation code.
@@ -2813,7 +2805,7 @@ pcl_do_print(stp_vars_t *v, stp_image_t *image)
if (black && !privdata.do_cretb)
stp_dither_set_inks_simple(v, STP_ECOLOR_K, 3, dot_sizes_use, 1.0, 1.0);
- /* Note: no printer I know of does both CRet (4-level) and 6 colour, but
+ /* Note: no printer I know of does both CRet (4-level) and 6 color, but
what the heck. variable_dither_ranges copied from print-escp2.c */
if (privdata.do_6color) /* Photo for 69x */
@@ -2835,7 +2827,7 @@ pcl_do_print(stp_vars_t *v, stp_image_t *image)
}
else if (privdata.do_6color)
{
- /* Set light inks for 6 colour printers.
+ /* Set light inks for 6 color printers.
Numbers copied from print-escp2.c */
stp_dither_set_inks_full(v, STP_ECOLOR_C, 2, photo_dither_shades, 1.0,
0.31 / .5);
@@ -2845,29 +2837,29 @@ pcl_do_print(stp_vars_t *v, stp_image_t *image)
if (black)
stp_channel_set_density_adjustment(v, STP_ECOLOR_K, 0,
get_double_param(v, "BlackDensity") *
- get_double_param(v, "Density"));
+ density);
if (cyan)
stp_channel_set_density_adjustment(v, STP_ECOLOR_C, 0,
get_double_param(v, "CyanDensity") *
- get_double_param(v, "Density"));
+ density);
if (magenta)
stp_channel_set_density_adjustment(v, STP_ECOLOR_M, 0,
get_double_param(v, "MagentaDensity") *
- get_double_param(v, "Density"));
+ density);
if (yellow)
stp_channel_set_density_adjustment(v, STP_ECOLOR_Y, 0,
get_double_param(v, "YellowDensity") *
- get_double_param(v, "Density"));
+ density);
if (lcyan)
stp_channel_set_density_adjustment
(v, STP_ECOLOR_C, 1, (get_double_param(v, "CyanDensity") *
get_double_param(v, "LightCyanTrans") *
- get_double_param(v, "Density")));
+ density));
if (lmagenta)
stp_channel_set_density_adjustment
(v, STP_ECOLOR_M, 1, (get_double_param(v, "MagentaDensity") *
get_double_param(v, "LightMagentaTrans") *
- get_double_param(v, "Density")));
+ density));
if (!stp_check_curve_parameter(v, "HueMap", STP_PARAMETER_ACTIVE))
@@ -2882,7 +2874,7 @@ pcl_do_print(stp_vars_t *v, stp_image_t *image)
stp_curve_destroy(lum_adjustment);
}
- out_channels = stp_color_init(v, image, 65536);
+ (void) stp_color_init(v, image, 65536);
errdiv = image_height / out_height;
errmod = image_height % out_height;
@@ -3082,4 +3074,3 @@ stp_module_t stp_module_data =
print_pcl_module_exit,
(void *) &print_pcl_module_data
};
-