1 /* Copyright (C) 2001-2006 Artifex Software, Inc.
2    All Rights Reserved.
3 
4    This software is provided AS-IS with no warranty, either express or
5    implied.
6 
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.
12 */
13 /*$Id: gswts.h 8080 2007-06-27 01:52:29Z ray $ */
14 #ifndef gswts_INCLUDED
15 #  define gswts_INCLUDED
16 
17 #ifndef gs_wts_screen_enum_t_DEFINED
18 #  define gs_wts_screen_enum_t_DEFINED
19 typedef struct gs_wts_screen_enum_s gs_wts_screen_enum_t;
20 #endif
21 
22 typedef struct gx_wts_cell_params_s gx_wts_cell_params_t;
23 
24 /* Note: this corresponds roughly to the SP structure in the WTS code. */
25 struct gx_wts_cell_params_s {
26     wts_screen_type t;
27     int width;
28     int height;
29     double ufast;
30     double vfast;
31     double uslow;
32     double vslow;
33 };
34 
35 gx_wts_cell_params_t *
36 wts_pick_cell_size(gs_screen_halftone *ph, const gs_matrix *pmat);
37 
38 gs_wts_screen_enum_t *
39 gs_wts_screen_enum_new(gx_wts_cell_params_t *wcp);
40 
41 int
42 gs_wts_screen_enum_currentpoint(gs_wts_screen_enum_t *wse, gs_point *ppt);
43 
44 int
45 gs_wts_screen_enum_next(gs_wts_screen_enum_t *wse, floatp value);
46 
47 int
48 wts_sort_cell(gs_wts_screen_enum_t *wse);
49 
50 wts_screen_t *
51 wts_screen_from_enum(const gs_wts_screen_enum_t *wse);
52 
53 void
54 gs_wts_free_enum(gs_wts_screen_enum_t *wse);
55 
56 void
57 gs_wts_free_screen(wts_screen_t *wts);
58 
59 int
60 wts_size(const wts_screen_t *ws);
61 
62 wts_screen_t *
63 gs_wts_from_buf(const byte *buf, int bufsize);
64 
65 #endif
66