Commit | Line | Data |
---|---|---|
10c622e1 WJ |
1 | /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. |
2 | Distributed by Free Software Foundation, Inc. | |
3 | ||
4 | This file is part of Ghostscript. | |
5 | ||
6 | Ghostscript is distributed in the hope that it will be useful, but | |
7 | WITHOUT ANY WARRANTY. No author or distributor accepts responsibility | |
8 | to anyone for the consequences of using it or for whether it serves any | |
9 | particular purpose or works at all, unless he says so in writing. Refer | |
10 | to the Ghostscript General Public License for full details. | |
11 | ||
12 | Everyone is granted permission to copy, modify and redistribute | |
13 | Ghostscript, but only under the conditions described in the Ghostscript | |
14 | General Public License. A copy of this license is supposed to have been | |
15 | given to you along with Ghostscript so you can know your rights and | |
16 | responsibilities. It should be in a file named COPYING. Among other | |
17 | things, the copyright notice and this notice must be preserved on all | |
18 | copies. */ | |
19 | ||
20 | /* gzht.h */ | |
21 | /* Private halftone representation for GhostScript */ | |
22 | ||
23 | /* Halftone parameter structure */ | |
24 | typedef struct halftone_params_s { | |
25 | float frequency; | |
26 | float angle; | |
27 | /* Computed values */ | |
28 | int width; | |
29 | int height; | |
30 | struct ht_bit_s *order; /* whitening order */ | |
31 | int order_size; | |
32 | } halftone_params; | |
33 | ||
34 | /* | |
35 | * The whitening order is represented by an array stored in row order. | |
36 | * The pixel represented by order[0] is whitened first. | |
37 | * During sampling, order[i].mask is a normalized sample value. | |
38 | * After sampling and sorting, | |
39 | * order[i].offset is the byte index of the pixel in the rendering cache; | |
40 | * order[i].mask is the mask to be or'ed into this byte and the | |
41 | * following one. (This is arranged so it will work properly on | |
42 | * either big- or little-endian machines.) | |
43 | */ | |
44 | typedef struct ht_bit_s { | |
45 | ushort offset; | |
46 | ushort mask; | |
47 | } ht_bit; |