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