summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/xypic/xyps-f.tex
blob: 83b5766591b3822559beb67ef3b9ad4b26ad82ab (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
%% xyps-f.tex from $Id: xyps-f.doc,v 3.11 2011/03/14 20:14:00 krisrose Exp $
%%
%% Xy-pic ``Frame extension'' PostScript backend support.
%% Copyright (c) 1995-1997 Ross Moore <ross.moore@mq.edu.au>
%%
%% This file is part of the Xy-pic package for graphs and diagrams in TeX.
%% See the companion README and INSTALL files for further information.
%% Copyright (c) 1991-2011 Kristoffer H. Rose <krisrose@tug.org>
%%
%% The Xy-pic package is free software; you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by the
%% Free Software Foundation; either version 2 of the License, or (at your
%% option) any later version.
%%
%% The Xy-pic package is distributed in the hope that it will be useful, but
%% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
%% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
%% for more details.
%%
%% You should have received a copy of the GNU General Public License along
%% with this package; if not, see http://www.gnu.org/licenses/.
%%
%% As a special exception, you may use this file and all files derived
%% from it without restrictions. This special exception was added with
%% version 3.7 of Xy-pic.
%%
\expandafter\ifx\csname xyps-floaded\endcsname\empty
 \message{not reloaded}\endinput \fi
\expandafter\let\csname xyps-floaded\endcsname=\empty \xycatcodes
\xydef@\installPSframes@{%
 \let\framed@body@@=\xyPSframed@body@
 \let\circled@x@@=\xyPScircled@x@
 \let\ellipsed@x@@=\xyPSellipsed@x@
 \installPSfills@
 \xyuncatcodes}
\xydef@\UsePSframes{\installPSframes@}
\xydef@\NoPSframes{\UnloadFrames@}
\xydef@\xyPSframed@body@{\DN@{\framed@body@}%
 \ifx\framehfill\frm@solidh@@
 \DN@{\xyPSframed@oval@\xyPSoval@Special}%
 \else\ifdim\R@=\z@\else
 \ifx\framehfill\frm@dashh@@
 \DN@{\xyPSframed@oval@\xyPSdashoval@Special}%
 \else\ifx\framehfill\frm@doth@@
 \DN@{\xyPSframed@oval@\xyPSdotoval@Special}%
 \fi\fi
 \fi\fi \next@ }
\xydef@\xyPSframed@oval@#1{\vglue\U@c
 \hbox{\hglue\L@c\xypsoval@#1\hglue\R@c}\vglue\D@c}
\xydef@\xyPScircled@x@{\DN@{\xyPScircled@x@@\xyPScirc@Special}%
 \ifx\framehfill\frm@doth@@
 \DN@{\xyPScircled@x@@\xyPSdotcirc@Special}%
 \else\ifx\framehfill\frm@dashh@@
 \DN@{\xyPScircled@x@@\xyPSdashcirc@Special}%
 \fi\fi \next@ }
\xydef@\xyPScircled@x@@#1{\vglue2\R@
 \hbox{\hglue2\R@\xypscircle@#1\hglue2\R@}%
 \vglue2\R@}
\xydef@\xyPSellipsed@x@#1#2{%
 \DN@{\xyPSellipsed@x@@\xyPScirc@Special}%
 \ifx\framehfill\frm@doth@@
 \DN@{\xyPSellipsed@x@@\xyPSdotcirc@Special}%
 \else\ifx\framehfill\frm@dashh@@
 \DN@{\xyPSellipsed@x@@\xyPSdashcirc@Special}%
 \fi\fi \next@{#1}{#2}}
\xydef@\xyPSellipsed@x@@#1#2#3{\vglue #3\vglue #3\relax
 \hbox{\L@c = #2\relax \R@c=\L@c \D@c = #3\relax \U@c=\D@c 
 \hglue#2\hglue#2\relax\xypsellipse@#1\hglue#2\hglue#2\relax}%
 \vglue #3\vglue #3\relax}
\xydef@\xyPSdashhfill@{{\SemiDirectionChar=95 \Direction=3072 \xyPSdash@}}
\xydef@\xyPSdashvfill@{{\SemiDirection=31 \Direction=1023 \xyPSdash@}}
\xydef@\xypsoval@#1{%
 \dimen@=\L@c \advance\dimen@\R@c
 \dimen@ii=\U@c \advance\dimen@ii\D@c 
 \ifdim\dimen@ii<\dimen@ \relax \dimen@=\dimen@ii\fi \divide\dimen@\tw@
 \ifdim\R@>\dimen@ \relax \R@=\dimen@ \fi
 \D@c=-\D@c \L@c=-\L@c 
 \edef\tmp@{\expandafter\removePT@\the\R@
 \space\expandafter\removePT@\the\R@c 
 \space\expandafter\removePT@\the\D@c 
 \space\expandafter\removePT@\the\L@c 
 \space\expandafter\removePT@\the\U@c }%
 \expandafter#1\expandafter{\tmp@}}
\xydef@\xypscircle@#1{\dimen@=\R@
 \edef\tmp@{\expandafter\removePT@\the\dimen@}%
 \expandafter#1\expandafter{\tmp@}}
\xydef@\xypsellipse@#1{\edef\tmp@{%
 \expandafter\removePT@\the\U@c \space
 \expandafter\removePT@\the\D@c \space
 \expandafter\removePT@\the\L@c \space
 \expandafter\removePT@\the\R@c }%
 \expandafter#1\expandafter{\tmp@}}
\xydef@\xyPSoval@Special#1{\PSmacro@{#1 ov}}
\xydef@\xyPScirc@Special#1{\PSmacro@{#1 ox}}
\xydef@\xyPSdotcirc@Special#1{\PSmacro@{#1 ot}}
\xydef@\xyPSdashcirc@Special#1{\PSmacro@{#1 od}}
\xydef@\xyPSdotoval@Special#1{\PSmacro@{#1 vt}}
\xydef@\xyPSdashoval@Special#1{\PSmacro@{#1 vd}}
\xydef@\xyPSfilledRegion#1#2{\setboxz@h{\lower\D@c\vbox{%
 \vglue\U@c\hbox{#1#2\empty\hglue\L@c\hglue\R@c}\vglue\D@c}}%
 \ht\z@=\z@ \dp\z@=\z@ \wd\z@=\z@ \boxz@}
\xydef@\filledRectangle@PS{%
 \xyPSfilledRegion{\xypsoval@\xyPSfilloval@Special}}
\xydef@\filledCircle@PS#1{{\R@c=\R@ \L@c=\R@ \U@c=\R@ \D@c=\R@
 \xyPSfilledRegion{\xypscircle@\xyPSfillcirc@Special}#1}}
\xydef@\filledEllipse@PS{%
 \xyPSfilledRegion{\xypsellipse@\xyPSfillellipse@Special}}
\xydef@\filledOval@PS{%
 \xyPSfilledRegion{\xypsoval@\xyPSfilloval@Special}}
\xydef@\frame@emph@PS#1{\filled@{#1}\relax}
\xydef@\installPSfills@{%
 \let\frame@emph@@=\frame@emph@PS
 \let\filledRectangle@@=\filledRectangle@PS
 \let\filledOval@@=\filledOval@PS
 \let\filledCircle@@=\filledCircle@PS
 \let\filledEllipse@@=\filledEllipse@PS
}
\xydef@\xyPSfilloval@Special#1#2{%
 \ifx#2\relax\PSmacro@{#1 sfo}%
 \else\PSmacro@{#1 fo}\fi}
\xydef@\xyPSfillcirc@Special#1#2{%
 \ifx#2\relax\PSmacro@{#1 sfc}%
 \else\PSmacro@{#1 fc}\fi}
\xydef@\xyPSfillellipse@Special#1#2{%
 \ifx#2\relax\PSmacro@{#1 sfe}%
 \else\PSmacro@{#1 fe}\fi}
\endinput