386BSD 0.1 development
[unix-history] / usr / othersrc / public / ghostscript-2.4.1 / gspath.h
CommitLineData
c34a149e
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/* gspath.h */
21/* Path manipulation interface for GhostScript library */
22/* Requires gsstate.h */
23
24/* Path constructors */
25extern int gs_newpath(P1(gs_state *)),
26 gs_moveto(P3(gs_state *, floatp, floatp)),
27 gs_rmoveto(P3(gs_state *, floatp, floatp)),
28 gs_lineto(P3(gs_state *, floatp, floatp)),
29 gs_rlineto(P3(gs_state *, floatp, floatp)),
30 gs_arc(P6(gs_state *, floatp, floatp, floatp, floatp, floatp)),
31 gs_arcn(P6(gs_state *, floatp, floatp, floatp, floatp, floatp)),
32 gs_arcto(P7(gs_state *, floatp, floatp, floatp, floatp, floatp, float [4])),
33 gs_curveto(P7(gs_state *, floatp, floatp, floatp, floatp, floatp, floatp)),
34 gs_rcurveto(P7(gs_state *, floatp, floatp, floatp, floatp, floatp, floatp)),
35 gs_closepath(P1(gs_state *));
36
37/* Add the current path to the path in the previous graphics state. */
38extern int gs_upmergepath(P1(gs_state *));
39
40/* Path accessors and transformers */
41extern int gs_currentpoint(P2(const gs_state *, gs_point *)),
42 gs_pathbbox(P2(gs_state *, gs_rect *)),
43 gs_flattenpath(P1(gs_state *)),
44 gs_reversepath(P1(gs_state *)),
45 gs_strokepath(P1(gs_state *));
46
47/* Path enumeration */
48#define gs_pe_moveto 1
49#define gs_pe_lineto 2
50#define gs_pe_curveto 3
51#define gs_pe_closepath 4
52typedef struct gs_path_enum_s gs_path_enum;
53extern const uint gs_path_enum_sizeof;
54void gs_path_enum_init(P2(gs_path_enum *, const gs_state *));
55int gs_path_enum_next(P2(gs_path_enum *, gs_point [3])); /* 0 when done */
56
57/* Clipping */
58extern int gs_clippath(P1(gs_state *)),
59 gs_initclip(P1(gs_state *)),
60 gs_clip(P1(gs_state *)),
61 gs_eoclip(P1(gs_state *));