1
/* Copyright (C) 2001-2006 Artifex Software, Inc.
4
This software is provided AS-IS with no warranty, either express or
7
This software is distributed under license and may not be copied, modified
8
or distributed except as expressly authorized under the terms of that
9
license. Refer to licensing information at http://www.artifex.com/
10
or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134,
11
San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information.
13
/* $Id: gdevmrop.h 8022 2007-06-05 22:23:38Z giles $ */
14
/* Definitions for device RasterOp implementations. */
15
/* Requires gxdevmem.h, gsropt.h */
17
#ifndef gdevmrop_INCLUDED
18
# define gdevmrop_INCLUDED
21
* Compute the effective RasterOp for the 1-bit case,
22
* taking transparency into account.
24
gs_rop3_t gs_transparent_rop(gs_logical_operation_t lop);
27
/* Trace a [strip_]copy_rop call. */
28
void trace_copy_rop(const char *cname, gx_device * dev,
29
const byte * sdata, int sourcex, uint sraster,
30
gx_bitmap_id id, const gx_color_index * scolors,
31
const gx_strip_bitmap * textures,
32
const gx_color_index * tcolors,
33
int x, int y, int width, int height,
34
int phase_x, int phase_y, gs_logical_operation_t lop);
38
* PostScript colors normally act as the texture for RasterOp, with a null
39
* (all zeros) source. For images with CombineWithColor = true, we need
40
* a way to use the image data as the source. We implement this with a
41
* device that applies RasterOp with a specified texture to drawing
42
* operations, treating the drawing color as source rather than texture.
43
* The texture is a gx_device_color; it may be any type of color, even a
46
#ifndef gx_device_color_DEFINED
47
# define gx_device_color_DEFINED
48
typedef struct gx_device_color_s gx_device_color;
51
#ifndef gx_device_rop_texture_DEFINED
52
# define gx_device_rop_texture_DEFINED
53
typedef struct gx_device_rop_texture_s gx_device_rop_texture;
56
struct gx_device_rop_texture_s {
57
gx_device_forward_common;
58
gs_logical_operation_t log_op;
59
gx_device_color texture;
62
#define private_st_device_rop_texture() /* in gdevrops.c */\
63
gs_private_st_composite_use_final(st_device_rop_texture,\
64
gx_device_rop_texture, "gx_device_rop_texture",\
65
device_rop_texture_enum_ptrs, device_rop_texture_reloc_ptrs,\
68
/* Create a RasterOp source device. */
69
int gx_alloc_rop_texture_device(gx_device_rop_texture ** prsdev,
73
/* Initialize a RasterOp source device. */
74
void gx_make_rop_texture_device(gx_device_rop_texture * rsdev,
76
gs_logical_operation_t lop,
77
const gx_device_color * texture);
79
#endif /* gdevmrop_INCLUDED */