blob: e5ea49e9ed95bd9d525c38d1d129c1f93c39f07c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
% TeXdraw macros to access PostScript builtins
% $Id: txdps.tex,v 1.7 1993/04/10 texdraw-V2R0 $
% Copyright (C) 1991, 1992 Peter Kabal
% The routines in this file are provided free of charge without
% warranty of any kind. Note that the TeXdraw routines are copyrighted.
% They may be distributed freely provided that the recipients also
% acquire the right to distribute them freely. The notices to this
% effect must be preserved when the files are distributed.
% Peter Kabal
% Department of Electrical Engineering
% McGill University
% 3480 University
% Montreal, Quebec
% Canada H3A 2A7
% kabal@TSP.EE.McGill.CA
% ===============================================================
\chardef\catamp=\the\catcode`\@
\catcode`\@=11
% The TeXdraw macros assume that a PostScript currentpoint is always
% defined. When using the following macros, always finish off with
% by reestablishing a PostScript currentpoint. This can be done with
% a \PSmoveto command.
\def\PSsetlinecap #1 {\writeps{#1 setlinecap}}
\def\PSsetlinejoin #1 {\writeps{#1 setlinejoin}}
\def\PSstroke {\writeps{stroke}}
\def\PSnewpath {\writeps{newpath}}
\def\PSclosepath {\writeps{closepath}}
\def\PSfill {\writeps{fill}}
\def\PSlineto (#1 #2){\getpos (#1 #2)\a@rgx\a@rgy
\s@etpospix \a@rgx \a@rgy
\writeps {\the\x@pix\space \the\y@pix\space lineto}}
\def\PSmoveto (#1 #2){\getpos (#1 #2)\a@rgx\a@rgy
\s@etpospix \a@rgx \a@rgy
\writeps {\the\x@pix\space \the\y@pix\space moveto}}
\def\PSarc r:#1 sd:#2 ed:#3 (#4 #5){\getpos (#4 #5)\a@rgx\a@rgy
\s@etpospix \a@rgx \a@rgy
\coordtopix {#1}\t@pixa
\writeps{\the\x@pix\space \the\y@pix\space
\the\t@pixa\space #2 #3 arc}}
\def\PSarcn r:#1 sd:#2 ed:#3 (#4 #5){\getpos (#4 #5)\a@rgx\a@rgy
\s@etpospix \a@rgx \a@rgy
\coordtopix {#1}\t@pixa
\writeps{\the\x@pix\space \the\y@pix\space
\the\t@pixa\space #2 #3 arcn}}
\catcode`\@=\catamp
|