summaryrefslogtreecommitdiff
path: root/pxl
diff options
context:
space:
mode:
authorHenry Stiles <henry.stiles@artifex.com>2010-10-08 15:01:16 +0000
committerHenry Stiles <henry.stiles@artifex.com>2010-10-08 15:01:16 +0000
commit5adb95db0063e92a86f9a90fd970e5a8c0009ce5 (patch)
tree5c0227e21e081a0cee558cdd0fb1034c52b067cd /pxl
parent4ddafbc4200e747103cf238fe568774285912122 (diff)
Add parsing of the interpolation device parameter to PXL. PCL already
supported it. XPS and SVG should be modified to support parsing the parameter as well. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11780 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'pxl')
-rw-r--r--pxl/pximage.c2
-rw-r--r--pxl/pxstate.h2
-rw-r--r--pxl/pxtop.c9
3 files changed, 13 insertions, 0 deletions
diff --git a/pxl/pximage.c b/pxl/pximage.c
index 8cb91910c..b4494a1d9 100644
--- a/pxl/pximage.c
+++ b/pxl/pximage.c
@@ -614,6 +614,8 @@ pxBeginImage(px_args_t *par, px_state_t *pxs)
gs_matrix_multiply(&dmat, &imat, &pxenum->image.ImageMatrix);
}
pxenum->image.CombineWithColor = true;
+ pxenum->image.Interpolate = pxs->interpolate;
+
code = pl_begin_image(pgs, &pxenum->image, &pxenum->info);
if ( code < 0 )
{ gs_free_object(pxs->memory, pxenum->row, "pxReadImage(row)");
diff --git a/pxl/pxstate.h b/pxl/pxstate.h
index c0c2f7403..233ca807c 100644
--- a/pxl/pxstate.h
+++ b/pxl/pxstate.h
@@ -139,6 +139,8 @@ struct px_state_s {
px_pattern_enum_t *pattern_enum;
/* Miscellaneous */
+ bool interpolate; /* image interpolation */
+
struct db_ {
byte *data;
uint size;
diff --git a/pxl/pxtop.c b/pxl/pxtop.c
index 80de15abd..cd1bba37c 100644
--- a/pxl/pxtop.c
+++ b/pxl/pxtop.c
@@ -301,6 +301,12 @@ pxl_impl_set_post_page_action(
return 0;
}
+static bool
+pxl_get_interpolation(pl_interp_instance_t *instance)
+{
+ return instance->interpolate;
+}
+
/* Set a device into an interperter instance */
static int /* ret 0 ok, else -ve error code */
pxl_impl_set_device(
@@ -310,10 +316,13 @@ pxl_impl_set_device(
{
int code;
pxl_interp_instance_t *pxli = (pxl_interp_instance_t *)instance;
+ px_state_t *pxs = pxli->pxs;
+
enum {Sbegin, Ssetdevice, Sinitg, Sgsave, Serase, Sdone} stage;
stage = Sbegin;
gs_opendevice(device);
+ pxs->interpolate = pxl_get_interpolation(instance);
/* Set the device into the gstate */
stage = Ssetdevice;
if ((code = gs_setdevice_no_erase(pxli->pgs, device)) < 0) /* can't erase yet */