summaryrefslogtreecommitdiff
path: root/gs/src/gxht.h
diff options
context:
space:
mode:
Diffstat (limited to 'gs/src/gxht.h')
-rw-r--r--gs/src/gxht.h119
1 files changed, 64 insertions, 55 deletions
diff --git a/gs/src/gxht.h b/gs/src/gxht.h
index 4a13e13f3..56b8c74b6 100644
--- a/gs/src/gxht.h
+++ b/gs/src/gxht.h
@@ -1,22 +1,22 @@
/* Copyright (C) 1993, 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved.
-
- This file is part of Aladdin Ghostscript.
-
- Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author
- or distributor accepts any responsibility for the consequences of using it,
- or for whether it serves any particular purpose or works at all, unless he
- or she says so in writing. Refer to the Aladdin Ghostscript Free Public
- License (the "License") for full details.
-
- Every copy of Aladdin Ghostscript must include a copy of the License,
- normally in a plain ASCII text file named PUBLIC. The License grants you
- the right to copy, modify and redistribute Aladdin Ghostscript, but only
- under certain conditions described in the License. Among other things, the
- License requires that the copyright notice and this notice be preserved on
- all copies.
-*/
-
-/*Id: gxht.h */
+
+ This file is part of Aladdin Ghostscript.
+
+ Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author
+ or distributor accepts any responsibility for the consequences of using it,
+ or for whether it serves any particular purpose or works at all, unless he
+ or she says so in writing. Refer to the Aladdin Ghostscript Free Public
+ License (the "License") for full details.
+
+ Every copy of Aladdin Ghostscript must include a copy of the License,
+ normally in a plain ASCII text file named PUBLIC. The License grants you
+ the right to copy, modify and redistribute Aladdin Ghostscript, but only
+ under certain conditions described in the License. Among other things, the
+ License requires that the copyright notice and this notice be preserved on
+ all copies.
+ */
+
+/*Id: gxht.h */
/* Rest of (client) halftone definitions */
#ifndef gxht_INCLUDED
@@ -71,28 +71,32 @@
/* Type 1 halftone. This is just a Level 1 halftone with */
/* a few extra members. */
typedef struct gs_spot_halftone_s {
- gs_screen_halftone screen;
- bool accurate_screens;
- gs_mapping_proc transfer; /* OBSOLETE */
- gs_mapping_closure_t transfer_closure;
+ gs_screen_halftone screen;
+ bool accurate_screens;
+ gs_mapping_proc transfer; /* OBSOLETE */
+ gs_mapping_closure_t transfer_closure;
} gs_spot_halftone;
+
#define st_spot_halftone_max_ptrs st_screen_halftone_max_ptrs + 1
/* Type 3 halftone. */
typedef struct gs_threshold_halftone_s {
- int width;
- int height;
- gs_const_string thresholds;
- gs_mapping_proc transfer; /* OBSOLETE */
- gs_mapping_closure_t transfer_closure;
+ int width;
+ int height;
+ gs_const_string thresholds;
+ gs_mapping_proc transfer; /* OBSOLETE */
+ gs_mapping_closure_t transfer_closure;
} gs_threshold_halftone;
+
#define st_threshold_halftone_max_ptrs 2
/* Client-defined halftone that generates a halftone order. */
typedef struct gs_client_order_halftone_s gs_client_order_halftone;
+
#ifndef gx_ht_order_DEFINED
# define gx_ht_order_DEFINED
typedef struct gx_ht_order_s gx_ht_order;
+
#endif
typedef struct gs_client_order_ht_procs_s {
@@ -101,10 +105,10 @@ typedef struct gs_client_order_ht_procs_s {
* (see gzht.h) does everything but fill in the actual data.
*/
- int (*create_order)(P4(gx_ht_order *porder,
- gs_state *pgs,
- const gs_client_order_halftone *phcop,
- gs_memory_t *mem));
+ int (*create_order) (P4(gx_ht_order * porder,
+ gs_state * pgs,
+ const gs_client_order_halftone * phcop,
+ gs_memory_t * mem));
} gs_client_order_ht_procs_t;
struct gs_client_order_halftone_s {
@@ -115,18 +119,20 @@ struct gs_client_order_halftone_s {
const void *client_data;
gs_mapping_closure_t transfer_closure;
};
+
#define st_client_order_halftone_max_ptrs 2
/* Define the elements of a Type 5 halftone. */
typedef struct gs_halftone_component_s {
- gs_ht_separation_name cname;
- gs_halftone_type type;
- union {
- gs_spot_halftone spot; /* Type 1 */
- gs_threshold_halftone threshold; /* Type 3 */
- gs_client_order_halftone client_order; /* client order */
- } params;
+ gs_ht_separation_name cname;
+ gs_halftone_type type;
+ union {
+ gs_spot_halftone spot; /* Type 1 */
+ gs_threshold_halftone threshold; /* Type 3 */
+ gs_client_order_halftone client_order; /* client order */
+ } params;
} gs_halftone_component;
+
extern_st(st_halftone_component);
#define public_st_halftone_component() /* in gsht1.c */\
gs_public_st_composite(st_halftone_component, gs_halftone_component,\
@@ -143,9 +149,10 @@ extern_st(st_ht_component_element);
/* Define the Type 5 halftone itself. */
typedef struct gs_multiple_halftone_s {
- gs_halftone_component *components;
- uint num_comp;
+ gs_halftone_component *components;
+ uint num_comp;
} gs_multiple_halftone;
+
#define st_multiple_halftone_max_ptrs 1
/*
@@ -158,17 +165,18 @@ typedef struct gs_multiple_halftone_s {
* allocator as the halftone structure itself.
*/
struct gs_halftone_s {
- gs_halftone_type type;
- rc_header rc;
- union {
- gs_screen_halftone screen; /* setscreen */
- gs_colorscreen_halftone colorscreen; /* setcolorscreen */
- gs_spot_halftone spot; /* Type 1 */
- gs_threshold_halftone threshold; /* Type 3 */
- gs_client_order_halftone client_order; /* client order */
- gs_multiple_halftone multiple; /* Type 5 */
- } params;
+ gs_halftone_type type;
+ rc_header rc;
+ union {
+ gs_screen_halftone screen; /* setscreen */
+ gs_colorscreen_halftone colorscreen; /* setcolorscreen */
+ gs_spot_halftone spot; /* Type 1 */
+ gs_threshold_halftone threshold; /* Type 3 */
+ gs_client_order_halftone client_order; /* client order */
+ gs_multiple_halftone multiple; /* Type 5 */
+ } params;
};
+
extern_st(st_halftone);
#define public_st_halftone() /* in gsht.c */\
gs_public_st_composite(st_halftone, gs_halftone, "gs_halftone",\
@@ -185,12 +193,13 @@ extern_st(st_halftone);
* Set/get the default AccurateScreens value (for set[color]screen).
* Note that this value is stored in a static variable.
*/
-void gs_setaccuratescreens(P1(bool));
-bool gs_currentaccuratescreens(P0());
+void gs_setaccuratescreens(P1(bool));
+bool gs_currentaccuratescreens(P0());
/* Initiate screen sampling with optional AccurateScreens. */
int gs_screen_init_memory(P5(gs_screen_enum *, gs_state *,
gs_screen_halftone *, bool, gs_memory_t *));
+
#define gs_screen_init_accurate(penum, pgs, phsp, accurate)\
gs_screen_init_memory(penum, pgs, phsp, accurate, pgs->memory)
@@ -203,7 +212,7 @@ int gs_screen_init_memory(P5(gs_screen_enum *, gs_state *,
*
* Note that this value is stored in a static variable.
*/
-void gs_setminscreenlevels(P1(uint));
-uint gs_currentminscreenlevels(P0());
+void gs_setminscreenlevels(P1(uint));
+uint gs_currentminscreenlevels(P0());
-#endif /* gxht_INCLUDED */
+#endif /* gxht_INCLUDED */