| 1 |
/* $XConsortium: t1imager.h,v 1.5 92/03/20 14:36:05 keith Exp $ */ |
| 2 |
/* Copyright International Business Machines,Corp. 1991 |
| 3 |
* All Rights Reserved |
| 4 |
* |
| 5 |
* License to use, copy, modify, and distribute this software |
| 6 |
* and its documentation for any purpose and without fee is |
| 7 |
* hereby granted, provided that the above copyright notice |
| 8 |
* appear in all copies and that both that copyright notice and |
| 9 |
* this permission notice appear in supporting documentation, |
| 10 |
* and that the name of IBM not be used in advertising or |
| 11 |
* publicity pertaining to distribution of the software without |
| 12 |
* specific, written prior permission. |
| 13 |
* |
| 14 |
* IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES |
| 15 |
* OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT |
| 16 |
* LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, |
| 17 |
* FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF |
| 18 |
* THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND |
| 19 |
* PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT |
| 20 |
* OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF |
| 21 |
* THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES |
| 22 |
* THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN |
| 23 |
* NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR |
| 24 |
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING |
| 25 |
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF |
| 26 |
* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT |
| 27 |
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS |
| 28 |
* SOFTWARE. |
| 29 |
*/ |
| 30 |
|
| 31 |
#include "types.h" |
| 32 |
#include "fontmisc.h" |
| 33 |
|
| 34 |
typedef pointer xobject; |
| 35 |
typedef pointer location; |
| 36 |
typedef pointer path; |
| 37 |
typedef pointer region; |
| 38 |
typedef pointer XYspace; |
| 39 |
|
| 40 |
#ifndef NOEXTERNS |
| 41 |
/* |
| 42 |
The following are the user entry locations to TYPE1IMAGER |
| 43 |
*/ |
| 44 |
extern path t1_Bezier(); |
| 45 |
extern path t1_ClosePath(); |
| 46 |
extern xobject t1_Destroy(); |
| 47 |
extern xobject t1_Dup(); |
| 48 |
extern char *t1_ErrorMsg(); |
| 49 |
extern void t1_InitImager(); |
| 50 |
extern region t1_Interior(); |
| 51 |
extern location t1_ILoc(); |
| 52 |
extern xobject t1_Join(); |
| 53 |
extern path t1_Line(); |
| 54 |
extern xobject t1_Permanent(); |
| 55 |
extern path t1_Phantom(); |
| 56 |
extern location t1_Loc(); |
| 57 |
extern xobject t1_Scale(); |
| 58 |
extern xobject t1_Snap(); |
| 59 |
extern location t1_SubLoc(); |
| 60 |
extern xobject t1_Temporary(); |
| 61 |
|
| 62 |
#endif |
| 63 |
|
| 64 |
#ifndef NULL |
| 65 |
#define NULL 0 |
| 66 |
#endif |
| 67 |
|
| 68 |
#ifndef TRUE |
| 69 |
#define TRUE 1 |
| 70 |
#endif |
| 71 |
|
| 72 |
#ifndef FALSE |
| 73 |
#define FALSE 0 |
| 74 |
#endif |
| 75 |
|
| 76 |
/* |
| 77 |
Here are some TYPE1IMAGER functions that are defined in terms of others: |
| 78 |
*/ |
| 79 |
|
| 80 |
#define t1_AddLoc(p1,p2) t1_Join(p1,p2) |
| 81 |
|
| 82 |
#ifndef NONAMES |
| 83 |
/* |
| 84 |
Define the simple form of all the subroutine names: |
| 85 |
*/ |
| 86 |
#define AddLoc(p1,p2) t1_AddLoc(p1,p2) |
| 87 |
#define Bezier(B,C,D) t1_Bezier(B,C,D) |
| 88 |
#define ClosePath(p) t1_ClosePath(p,0) |
| 89 |
#define Complement(area) t1_Complement(area) |
| 90 |
#define Destroy(o) t1_Destroy(o) |
| 91 |
#define Dup(o) t1_Dup(o) |
| 92 |
#define ErrorMsg() t1_ErrorMsg() |
| 93 |
#define HeadSegment(p) t1_HeadSegment(p) |
| 94 |
#define InitImager() t1_InitImager() |
| 95 |
#define Interior(p,rule) t1_Interior(p,rule) |
| 96 |
#define ILoc(S,x,y) t1_ILoc(S,x,y) |
| 97 |
#define Join(p1,p2) t1_Join(p1,p2) |
| 98 |
#define Line(P) t1_Line(P) |
| 99 |
#define Permanent(o) t1_Permanent(o) |
| 100 |
#define Phantom(o) t1_Phantom(o) |
| 101 |
#define Loc(S,x,y) t1_Loc(S,(DOUBLE)x,(DOUBLE)y) |
| 102 |
#define Scale(o,sx,sy) t1_Scale(o,(DOUBLE)sx,(DOUBLE)sy) |
| 103 |
#define Snap(o) t1_Snap(o) |
| 104 |
#define SubLoc(a,b) t1_SubLoc(a,b) |
| 105 |
#define Temporary(o) t1_Temporary(o) |
| 106 |
#define TermImager() t1_TermImager() |
| 107 |
#define Transform(o,cxx,cyx,cxy,cyy) t1_Transform(o,(DOUBLE)cxx,(DOUBLE)cyx,\ |
| 108 |
(DOUBLE)cxy,(DOUBLE)cyy) |
| 109 |
|
| 110 |
#endif |
| 111 |
|
| 112 |
#define WINDINGRULE -2 |
| 113 |
#define EVENODDRULE -3 |
| 114 |
|
| 115 |
#define CONTINUITY 0x80 /* can be added to above rules; e.g. WINDINGRULE+CONTINUITY */ |
| 116 |
|
| 117 |
/* |
| 118 |
Stroke() line style constants: |
| 119 |
*/ |
| 120 |
|
| 121 |
/* |
| 122 |
Coordinate space constants: |
| 123 |
*/ |
| 124 |
#define IDENTITY t1_Identity |
| 125 |
extern XYspace *IDENTITY; |
| 126 |
|
| 127 |
/* |
| 128 |
Generic null object definition: |
| 129 |
*/ |
| 130 |
#define NULLOBJECT ((xobject)NULL) |
| 131 |
|
| 132 |
/* |
| 133 |
Null path definition: |
| 134 |
*/ |
| 135 |
#define NULLPATH NULLOBJECT |
| 136 |
|
| 137 |
/* |
| 138 |
Full page and null region definition: |
| 139 |
*/ |
| 140 |
#define T1_INFINITY t1_Infinity |
| 141 |
#ifndef NOEXTERNS |
| 142 |
extern region *T1_INFINITY; |
| 143 |
#endif |
| 144 |
#ifdef NULLREGION |
| 145 |
#undef NULLREGION |
| 146 |
#endif |
| 147 |
#define NULLREGION NULLOBJECT |
| 148 |
|
| 149 |
#define FF_PARSE_ERROR 5 |
| 150 |
#define FF_PATH 1 |
| 151 |
|
| 152 |
extern pointer xiStub(); |