diff options
author | Henry Stiles <henry.stiles@artifex.com> | 1998-08-10 03:06:20 +0000 |
---|---|---|
committer | Henry Stiles <henry.stiles@artifex.com> | 1998-08-10 03:06:20 +0000 |
commit | 9267edc4dbc22ae78acf61e12b15a35aa9ec4fca (patch) | |
tree | b2f629f4d25a2f6ce37e6c2ffe248a99f3f3b0a4 /pcl/pccoord.h | |
parent | c2bd515d6c0450c87439a6a0c925b5b97963d92f (diff) |
This is the first archived release of jan's pcl5c code. There is no
version number yet.
git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@289 06663e23-700e-0410-b217-a244a6096597
Diffstat (limited to 'pcl/pccoord.h')
-rw-r--r-- | pcl/pccoord.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/pcl/pccoord.h b/pcl/pccoord.h new file mode 100644 index 000000000..930480730 --- /dev/null +++ b/pcl/pccoord.h @@ -0,0 +1,53 @@ +/* + * Copyright (C) 1998 Aladdin Enterprises. + * All rights reserved. + * + * This file is part of Aladdin Ghostscript. + * + * Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author + * or distributor accepts any responsibility for the consequences of using it, + * or for whether it serves any particular purpose or works at all, unless he + * or she says so in writing. Refer to the Aladdin Ghostscript Free Public + * License (the "License") for full details. + * + * Every copy of Aladdin Ghostscript must include a copy of the License, + * normally in a plain ASCII text file named PUBLIC. The License grants you + * the right to copy, modify and redistribute Aladdin Ghostscript, but only + * under certain conditions described in the License. Among other things, the + * License requires that the copyright notice and this notice be preserved on + * all copies. + */ + +/* pccoord.h - centipoint coordinate structures for PCL */ + +#ifndef pccoord_INCLUDED +#define pccoord_INCLUDED + +/* + * Following the PCL documentation, we represent coordinates internally in + * centipoints (1/7200"). + */ +#if arch_sizeof_int == 2 +typedef long coord; +#else +typedef int coord; +#endif + +#define pcl_coord_scale 7200 +#define inch2coord(v) ((coord)((v) * (coord)pcl_coord_scale)) +#define coord2inch(c) ((c) / (float)pcl_coord_scale) + +typedef struct coord_point_s { + coord x, y; +} coord_point; + +/* + * The current PCL addressable position (in pcursor.c). This is NOT part of + * the PCL state, though it previously was implmented as such. For this + * reason, it is declared here. + * + * This point is in "pseudo print direction" space. + */ +extern coord_point pcl_cap; + +#endif /* pccoord_INCLUDED */ |