386BSD 0.1 development
[unix-history] / usr / othersrc / public / ghostscript-2.4.1 / gzht.h
CommitLineData
10c622e1
WJ
1/* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved.
2 Distributed by Free Software Foundation, Inc.
3
4This file is part of Ghostscript.
5
6Ghostscript is distributed in the hope that it will be useful, but
7WITHOUT ANY WARRANTY. No author or distributor accepts responsibility
8to anyone for the consequences of using it or for whether it serves any
9particular purpose or works at all, unless he says so in writing. Refer
10to the Ghostscript General Public License for full details.
11
12Everyone is granted permission to copy, modify and redistribute
13Ghostscript, but only under the conditions described in the Ghostscript
14General Public License. A copy of this license is supposed to have been
15given to you along with Ghostscript so you can know your rights and
16responsibilities. It should be in a file named COPYING. Among other
17things, the copyright notice and this notice must be preserved on all
18copies. */
19
20/* gzht.h */
21/* Private halftone representation for GhostScript */
22
23/* Halftone parameter structure */
24typedef 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 */
44typedef struct ht_bit_s {
45 ushort offset;
46 ushort mask;
47} ht_bit;