xref: /plan9/sys/src/cmd/gs/src/gscoord.h (revision 593dc095aefb2a85c828727bbfa9da139a49bdf4)
1 /* Copyright (C) 1989, 1996 Aladdin Enterprises.  All rights reserved.
2 
3   This software is provided AS-IS with no warranty, either express or
4   implied.
5 
6   This software is distributed under license and may not be copied,
7   modified or distributed except as expressly authorized under the terms
8   of the license contained in the file LICENSE in this distribution.
9 
10   For more information about licensing, please refer to
11   http://www.ghostscript.com/licensing/. For information on
12   commercial licensing, go to http://www.artifex.com/licensing/ or
13   contact Artifex Software, Inc., 101 Lucas Valley Road #110,
14   San Rafael, CA  94903, U.S.A., +1(415)492-9861.
15 */
16 
17 /* $Id: gscoord.h,v 1.5 2002/06/16 08:45:42 lpd Exp $ */
18 /* Interface to graphics state CTM procedures */
19 /* Requires gsmatrix.h and gsstate.h */
20 
21 #ifndef gscoord_INCLUDED
22 #  define gscoord_INCLUDED
23 
24 /* Coordinate system modification */
25 int gs_initmatrix(gs_state *),
26     gs_defaultmatrix(const gs_state *, gs_matrix *),
27     gs_currentmatrix(const gs_state *, gs_matrix *),
28     gs_setmatrix(gs_state *, const gs_matrix *),
29     gs_translate(gs_state *, floatp, floatp),
30     gs_scale(gs_state *, floatp, floatp),
31     gs_rotate(gs_state *, floatp),
32     gs_concat(gs_state *, const gs_matrix *);
33 
34 /* Extensions */
35 int gs_setdefaultmatrix(gs_state *, const gs_matrix *),
36     gs_currentcharmatrix(gs_state *, gs_matrix *, bool),
37     gs_setcharmatrix(gs_state *, const gs_matrix *),
38     gs_settocharmatrix(gs_state *);
39 
40 /* Coordinate transformation */
41 int gs_transform(gs_state *, floatp, floatp, gs_point *),
42     gs_dtransform(gs_state *, floatp, floatp, gs_point *),
43     gs_itransform(gs_state *, floatp, floatp, gs_point *),
44     gs_idtransform(gs_state *, floatp, floatp, gs_point *);
45 
46 #ifndef gs_imager_state_DEFINED
47 #  define gs_imager_state_DEFINED
48 typedef struct gs_imager_state_s gs_imager_state;
49 #endif
50 
51 int gs_imager_setmatrix(gs_imager_state *, const gs_matrix *);
52 int gs_imager_idtransform(const gs_imager_state *, floatp, floatp, gs_point *);
53 
54 #endif /* gscoord_INCLUDED */
55