summaryrefslogtreecommitdiff
path: root/gs/base/gdevmr2n.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2011-04-19 23:49:56 +0200
committerTor Andersson <tor.andersson@artifex.com>2011-04-19 23:49:56 +0200
commit781969994b5381ba4bed03beef217f9bde6e7c58 (patch)
treeaede27c7532f0fbe82f03dc0c04c9316be510fd5 /gs/base/gdevmr2n.c
parent0b17959f31afe3baffbc328e7f92e88e634ad8b8 (diff)
Indent with spaces and strip trailing whitespace.
Diffstat (limited to 'gs/base/gdevmr2n.c')
-rw-r--r--gs/base/gdevmr2n.c160
1 files changed, 80 insertions, 80 deletions
diff --git a/gs/base/gdevmr2n.c b/gs/base/gdevmr2n.c
index 167c27e8e..7716f12db 100644
--- a/gs/base/gdevmr2n.c
+++ b/gs/base/gdevmr2n.c
@@ -1,6 +1,6 @@
/* Copyright (C) 2001-2006 Artifex Software, Inc.
All Rights Reserved.
-
+
This software is provided AS-IS with no warranty, either express or
implied.
@@ -40,35 +40,35 @@
*/
static int
mem_gray_rop_fill_rectangle(gx_device * dev, int x, int y, int w, int h,
- gx_color_index color)
+ gx_color_index color)
{
return -1;
}
static int
mem_gray_rop_copy_mono(gx_device * dev, const byte * data,
- int dx, int raster, gx_bitmap_id id,
- int x, int y, int w, int h,
- gx_color_index zero, gx_color_index one)
+ int dx, int raster, gx_bitmap_id id,
+ int x, int y, int w, int h,
+ gx_color_index zero, gx_color_index one)
{
return -1;
}
static int
mem_gray_rop_strip_tile_rectangle(gx_device * dev,
- const gx_strip_bitmap * tiles,
- int x, int y, int w, int h,
- gx_color_index color0, gx_color_index color1,
- int px, int py)
+ const gx_strip_bitmap * tiles,
+ int x, int y, int w, int h,
+ gx_color_index color0, gx_color_index color1,
+ int px, int py)
{
return -1;
}
int
mem_gray_strip_copy_rop(gx_device * dev,
- const byte * sdata, int sourcex, uint sraster, gx_bitmap_id id,
- const gx_color_index * scolors,
- const gx_strip_bitmap * textures, const gx_color_index * tcolors,
- int x, int y, int width, int height,
- int phase_x, int phase_y, gs_logical_operation_t lop)
+ const byte * sdata, int sourcex, uint sraster, gx_bitmap_id id,
+ const gx_color_index * scolors,
+ const gx_strip_bitmap * textures, const gx_color_index * tcolors,
+ int x, int y, int width, int height,
+ int phase_x, int phase_y, gs_logical_operation_t lop)
{
gx_color_index scolors2[2];
const gx_color_index *real_scolors = scolors;
@@ -84,53 +84,53 @@ mem_gray_strip_copy_rop(gx_device * dev,
#ifdef DEBUG
if (gs_debug_c('b'))
- trace_copy_rop("mem_gray_strip_copy_rop",
- dev, sdata, sourcex, sraster,
- id, scolors, textures, tcolors,
- x, y, width, height, phase_x, phase_y, lop);
+ trace_copy_rop("mem_gray_strip_copy_rop",
+ dev, sdata, sourcex, sraster,
+ id, scolors, textures, tcolors,
+ x, y, width, height, phase_x, phase_y, lop);
#endif
if (gx_device_has_color(dev) ||
- (lop & (lop_S_transparent | lop_T_transparent)) ||
- (scolors && /* must be (0,0) or (max,max) */
- ((scolors[0] | scolors[1]) != 0) &&
- ((scolors[0] & scolors[1]) != max_pixel)) ||
- (tcolors && (tcolors[0] != tcolors[1]))
- ) {
- /* We can't fake it: do it the slow, painful way. */
- return mem_default_strip_copy_rop(dev, sdata, sourcex, sraster, id,
- scolors, textures, tcolors,
- x, y, width, height,
- phase_x, phase_y, lop);
+ (lop & (lop_S_transparent | lop_T_transparent)) ||
+ (scolors && /* must be (0,0) or (max,max) */
+ ((scolors[0] | scolors[1]) != 0) &&
+ ((scolors[0] & scolors[1]) != max_pixel)) ||
+ (tcolors && (tcolors[0] != tcolors[1]))
+ ) {
+ /* We can't fake it: do it the slow, painful way. */
+ return mem_default_strip_copy_rop(dev, sdata, sourcex, sraster, id,
+ scolors, textures, tcolors,
+ x, y, width, height,
+ phase_x, phase_y, lop);
}
if (scolors) { /* Must be a solid color: see above. */
- scolors2[0] = scolors2[1] = scolors[0] & 1;
- real_scolors = scolors2;
+ scolors2[0] = scolors2[1] = scolors[0] & 1;
+ real_scolors = scolors2;
}
if (textures) {
- texture2 = *textures;
- texture2.size.x <<= log2_depth;
- texture2.rep_width <<= log2_depth;
- texture2.shift <<= log2_depth;
- texture2.rep_shift <<= log2_depth;
- real_texture = &texture2;
+ texture2 = *textures;
+ texture2.size.x <<= log2_depth;
+ texture2.rep_width <<= log2_depth;
+ texture2.shift <<= log2_depth;
+ texture2.rep_shift <<= log2_depth;
+ real_texture = &texture2;
}
if (tcolors) {
- /* For polybit textures with colors other than */
- /* all 0s or all 1s, fabricate the data. */
- if (tcolors[0] != 0 && tcolors[0] != max_pixel) {
- real_tcolors = 0;
- *(byte *) & tdata = (byte) tcolors[0] << (8 - depth);
- texture2.data = (byte *) & tdata;
- texture2.raster = align_bitmap_mod;
- texture2.size.x = texture2.rep_width = depth;
- texture2.size.y = texture2.rep_height = 1;
- texture2.id = gx_no_bitmap_id;
- texture2.shift = texture2.rep_shift = 0;
- real_texture = &texture2;
- } else {
- tcolors2[0] = tcolors2[1] = tcolors[0] & 1;
- real_tcolors = tcolors2;
- }
+ /* For polybit textures with colors other than */
+ /* all 0s or all 1s, fabricate the data. */
+ if (tcolors[0] != 0 && tcolors[0] != max_pixel) {
+ real_tcolors = 0;
+ *(byte *) & tdata = (byte) tcolors[0] << (8 - depth);
+ texture2.data = (byte *) & tdata;
+ texture2.raster = align_bitmap_mod;
+ texture2.size.x = texture2.rep_width = depth;
+ texture2.size.y = texture2.rep_height = 1;
+ texture2.id = gx_no_bitmap_id;
+ texture2.shift = texture2.rep_shift = 0;
+ real_texture = &texture2;
+ } else {
+ tcolors2[0] = tcolors2[1] = tcolors[0] & 1;
+ real_tcolors = tcolors2;
+ }
}
/*
* mem_mono_strip_copy_rop may call fill_rectangle, copy_mono, or
@@ -139,36 +139,36 @@ mem_gray_strip_copy_rop(gx_device * dev,
* an error.
*/
{
- dev_proc_fill_rectangle((*fill_rectangle)) =
- dev_proc(dev, fill_rectangle);
- dev_proc_copy_mono((*copy_mono)) =
- dev_proc(dev, copy_mono);
- dev_proc_strip_tile_rectangle((*strip_tile_rectangle)) =
- dev_proc(dev, strip_tile_rectangle);
+ dev_proc_fill_rectangle((*fill_rectangle)) =
+ dev_proc(dev, fill_rectangle);
+ dev_proc_copy_mono((*copy_mono)) =
+ dev_proc(dev, copy_mono);
+ dev_proc_strip_tile_rectangle((*strip_tile_rectangle)) =
+ dev_proc(dev, strip_tile_rectangle);
- set_dev_proc(dev, fill_rectangle, mem_gray_rop_fill_rectangle);
- set_dev_proc(dev, copy_mono, mem_gray_rop_copy_mono);
- set_dev_proc(dev, strip_tile_rectangle,
- mem_gray_rop_strip_tile_rectangle);
- dev->width <<= log2_depth;
- code = mem_mono_strip_copy_rop(dev, sdata,
- (real_scolors == NULL ?
- sourcex << log2_depth : sourcex),
- sraster, id, real_scolors,
- real_texture, real_tcolors,
- x << log2_depth, y,
- width << log2_depth, height,
- phase_x << log2_depth, phase_y, lop);
- set_dev_proc(dev, fill_rectangle, fill_rectangle);
- set_dev_proc(dev, copy_mono, copy_mono);
- set_dev_proc(dev, strip_tile_rectangle, strip_tile_rectangle);
- dev->width >>= log2_depth;
+ set_dev_proc(dev, fill_rectangle, mem_gray_rop_fill_rectangle);
+ set_dev_proc(dev, copy_mono, mem_gray_rop_copy_mono);
+ set_dev_proc(dev, strip_tile_rectangle,
+ mem_gray_rop_strip_tile_rectangle);
+ dev->width <<= log2_depth;
+ code = mem_mono_strip_copy_rop(dev, sdata,
+ (real_scolors == NULL ?
+ sourcex << log2_depth : sourcex),
+ sraster, id, real_scolors,
+ real_texture, real_tcolors,
+ x << log2_depth, y,
+ width << log2_depth, height,
+ phase_x << log2_depth, phase_y, lop);
+ set_dev_proc(dev, fill_rectangle, fill_rectangle);
+ set_dev_proc(dev, copy_mono, copy_mono);
+ set_dev_proc(dev, strip_tile_rectangle, strip_tile_rectangle);
+ dev->width >>= log2_depth;
}
/* If we punted, use the general procedure. */
if (code < 0)
- return mem_default_strip_copy_rop(dev, sdata, sourcex, sraster, id,
- scolors, textures, tcolors,
- x, y, width, height,
- phase_x, phase_y, lop);
+ return mem_default_strip_copy_rop(dev, sdata, sourcex, sraster, id,
+ scolors, textures, tcolors,
+ x, y, width, height,
+ phase_x, phase_y, lop);
return code;
}