diff options
author | Henry Stiles <henry.stiles@artifex.com> | 1999-05-24 20:03:13 +0000 |
---|---|---|
committer | Henry Stiles <henry.stiles@artifex.com> | 1999-05-24 20:03:13 +0000 |
commit | 5e99d00db40250c4aec92e2e7ecaf51f629540ae (patch) | |
tree | c59a16131c363a845609bb0786adc205d3f6fddc /gs/src/gximono.c | |
parent | 7ddfba499458819bf0dbf297b084f8b5b51b8690 (diff) |
initial gs5.84 checkin with pcl and xl compiling.
git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@857 06663e23-700e-0410-b217-a244a6096597
Diffstat (limited to 'gs/src/gximono.c')
-rw-r--r-- | gs/src/gximono.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/gs/src/gximono.c b/gs/src/gximono.c index 89d4f17c1..6ccae20bc 100644 --- a/gs/src/gximono.c +++ b/gs/src/gximono.c @@ -32,7 +32,6 @@ #include "gxcmap.h" #include "gxdcolor.h" #include "gxistate.h" -#include "gzpath.h" #include "gxdevmem.h" #include "gdevmem.h" /* for mem_mono_device */ #include "gxcpath.h" @@ -42,8 +41,8 @@ /* ------ Strategy procedure ------ */ private irender_proc(image_render_mono); -private irender_proc_t -image_strategy_mono(gx_image_enum * penum) +irender_proc_t +gs_image_class_3_mono(gx_image_enum * penum) { if (penum->spp == 1) { /* @@ -66,11 +65,10 @@ image_strategy_mono(gx_image_enum * penum) * or icolor1, which are used directly in the fast case loop. */ if (penum->use_mask_color) { - uint scale = 255 / ((1 << penum->bps) - 1); - - if ((penum->mask_color.values[0] *= scale) <= 0) + gx_image_scale_mask_colors(penum, 0); + if (penum->mask_color.values[0] <= 0) color_set_null(&penum->icolor0); - if ((penum->mask_color.values[1] *= scale) >= 255) + if (penum->mask_color.values[1] >= 255) color_set_null(&penum->icolor1); } return image_render_mono; @@ -78,12 +76,6 @@ image_strategy_mono(gx_image_enum * penum) return 0; } -void -gs_gximono_init(gs_memory_t * mem) -{ - image_strategies.mono = image_strategy_mono; -} - /* ------ Rendering procedure ------ */ /* Provide a fake map_gray procedure for the DevicePixel color space. */ @@ -139,12 +131,15 @@ image_render_mono(gx_image_enum * penum, const byte * buffer, int data_x, (*map_gray)(byte2frac(sample_value), pdevc, pis, dev, gs_color_select_source);\ else {\ decode_sample(sample_value, cc, 0);\ - (*remap_color)(&cc, pcs, pdevc, pis, dev, gs_color_select_source);\ + code = (*remap_color)(&cc, pcs, pdevc, pis, dev, gs_color_select_source);\ + if (code < 0)\ + return code;\ }\ } else if (!color_is_pure(pdevc)) {\ if (!tiles_fit) {\ code = gx_color_load_select(pdevc, pis, dev, gs_color_select_source);\ - if ( code < 0 ) return code;\ + if (code < 0)\ + return code;\ }\ }\ END @@ -168,7 +163,7 @@ image_render_mono(gx_image_enum * penum, const byte * buffer, int data_x, map_gray = (gs_color_space_get_index(pcs) == gs_color_space_index_DeviceGray ? - gx_device_cmap_procs(dev)->map_gray : + gx_get_cmap_procs(pis, dev)->map_gray : no_map_gray /*DevicePixel */ ); else remap_color = pcs->type->remap_color; |