| 1 |
%% xy16textures.tex from $Id: xy16textures.doc,v 3.7 2011/03/14 20:14:00 krisrose Exp $ |
| 2 |
%% |
| 3 |
%% Xy-pic ``Textures v1.6'' driver interface option. |
| 4 |
%% Copyright (c) 1995-1996 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 |
\ifx\xyloaded\undefined \input xy \fi |
| 24 |
\xyprovide{16textures}{Textures v1.6 driver}{\stripRCS$Revision: 3.7 $}% |
| 25 |
{Ross Moore}{[email protected]}% |
| 26 |
{Mathematics Department, Macquarie University, NSW~2109, Australia} |
| 27 |
\xydef@\oldTextures@@#1{\dvimessage@{Textures v1.6}{#1}} |
| 28 |
\newdriver{% |
| 29 |
\xyaddsupport{color}\oldtexturesColor@@ |
| 30 |
\xyaddsupport{crayon}\oldtexturesCrayon@@ |
| 31 |
\xyaddsupport{ps}\oldtexturesPS@@ |
| 32 |
\xyaddsupport{rotate}\oldtexturesRotate@@ |
| 33 |
\xyaddsupport{line}\oldtexturesLine@@ |
| 34 |
\xyaddsupport{frame}\oldtexturesFrames@@ |
| 35 |
\xyaddsupport{tile}\oldtexturesTiles@@ |
| 36 |
\xyaddsupport{cmtip}\relax |
| 37 |
} |
| 38 |
\xydef@\oldTexturesColours@{\oldtexturesPStypes@ |
| 39 |
\let\xylocalColor@=\xyNoColor@@ \def\xycolor@{\xycolor@@}% |
| 40 |
\expandafter\ifx\csname xyps-psloaded\endcsname\empty\DN@{% |
| 41 |
\xyinputorelse@{xyps-c}{\xydrivernoload@{ps-c}}% |
| 42 |
\installPScolor@ }\else\DN@{}\fi \next@ |
| 43 |
\ifx\xycolor@@\xyNoColor@ \let\xycolor@@=\xycolor@raw@@\fi |
| 44 |
\ifx\xycrayolaloaded\empty \DN@{\xystandardcolors@\oldtexturesCrayon@@{}}% |
| 45 |
\else\let\next@=\xystandardcolors@ \fi \next@ |
| 46 |
\let\xycolorwarning@=\relax |
| 47 |
\let\oldtexturesColor@@=\relax |
| 48 |
\let\UnloadColor@@=\NooldTexturesColor@ |
| 49 |
} |
| 50 |
\xydef@\oldtexturesColor@@{\oldTexturesColours@} |
| 51 |
\xydef@\NooldTexturesColor@{% |
| 52 |
\let\xylocalColor@=\xyNoColor@@ |
| 53 |
\let\xycolor@=\xyNoColor@ |
| 54 |
\let\xycolorwarning@=\xycolorwarning@@ |
| 55 |
\let\oldtexturesColor@@=\oldTexturesColours@ |
| 56 |
\let\UnloadColor@@=\UnloadColor@ |
| 57 |
} |
| 58 |
\xydef@\oldtexturesCrayon@@{\oldtexturesColor@@\oldtexturesCrayon@} |
| 59 |
\xydef@\oldtexturesCrayon@{\installCrayolaColors@}% |
| 60 |
\xydef@\oldtexturesPS@@{\oldtexturesPS@} |
| 61 |
\xydef@\oldtexturesPSunload@{\UnloadPS@ |
| 62 |
\ifx\xyrealshipout@\undefined\else |
| 63 |
\ifx\shipout\xyrealshipout@ |
| 64 |
\else \let\shipout=\xyrealshipout@\fi\fi |
| 65 |
\let\installxyps@@=\relax |
| 66 |
\let\UnloadPS@@=\UnloadPS@ |
| 67 |
\let\oldtexturesPS@@=\oldtexturesPS@ } |
| 68 |
\xydef@\oldTexturesSpecial@#1{\firstPS@@\special{postscript #1}} |
| 69 |
\xydef@\oldTexturesMacro@#1{\special{postscript {#1}xy}} |
| 70 |
\xydef@\oldTexturesInclude@#1{\firstPS@@\special{rawpostscriptfile #1}} |
| 71 |
\xydef@\oldTexturesRaw@#1{\firstPS@@\special{rawpostscript #1}} |
| 72 |
\xydef@\oldtexturesPStypes@{% |
| 73 |
\xyinputorelse@{xyps-ps}{\xydrivernoload@{ps-ps}}% |
| 74 |
\ifx\PSspecial@@\oldTexturesSpecial@\else |
| 75 |
\let\PSspecial@@=\oldTexturesSpecial@ |
| 76 |
\let\PSmacro@@=\oldTexturesMacro@ |
| 77 |
\let\PSdict@@=\oldTexturesRaw@ |
| 78 |
\let\PSraw@@=\oldTexturesRaw@ |
| 79 |
\let\PSinclude@@=\oldTexturesInclude@ |
| 80 |
\let\PSspecialdict@@=\oldTexturesRaw@ |
| 81 |
\let\xyPSobeylines@@=\obeyoldTextureslines@ |
| 82 |
\oldTextures@@{PostScript}% |
| 83 |
\fi |
| 84 |
\oldtexturesCurrpt@ \@PSshipout } |
| 85 |
{\catcode`\^^M=\active |
| 86 |
\gdef\next{\catcode`\^^M=\active \let^^M=\par \obeyspaces}} |
| 87 |
\xylet@\obeyoldTextureslines@=\next |
| 88 |
\xydef@\oldtexturesCurrpt@{\let\xyPScurrpt@@=\oldtexturesCurrpt@@}% |
| 89 |
\xydef@\oldtexturesCurrpt@@{\PSspecial@@{xyi}\PSraw@@{userdict begin xyx end}} |
| 90 |
\xydef@\oldtexturesPS@{\oldtexturesPStypes@ |
| 91 |
\let\oldtexturesPS@@=\relax |
| 92 |
\let\UnloadPS@@=\oldtexturesPSunload@ |
| 93 |
\let\installxyps@@=\@PSshipout \installxyps@ } |
| 94 |
\xydef@\oldtexturesRotate@@{\oldtexturesRotate@} |
| 95 |
\xydef@\oldtexturesRotate@{\oldtexturesPStypes@ |
| 96 |
\expandafter\ifx\csname xyps-psloaded\endcsname\empty\DN@{% |
| 97 |
\xyinputorelse@{xyps-r}{\xydrivernoload@{ps-r}}% |
| 98 |
\xyRotScale@@ \installPSrotscale@ }% |
| 99 |
\else\DN@{\xydriverfail@{rotations are}\UnloadRotate@\relax}\fi |
| 100 |
\next@ } |
| 101 |
\xydef@\oldtexturesLine@@{\oldtexturesLine@} |
| 102 |
\xydef@\oldtexturesLine@{\oldtexturesPStypes@ |
| 103 |
\expandafter\ifx\csname xyps-psloaded\endcsname\empty\DN@{% |
| 104 |
\xyinputorelse@{xyps-l}{\xydrivernoload@{ps-l}}% |
| 105 |
\installPSline@ }% |
| 106 |
\else\DN@{\xydriverfail@{line-styles are}\UnloadLine@\relax}\fi |
| 107 |
\next@ } |
| 108 |
\xydef@\oldtexturesFrames@@{\oldtexturesFrames@} |
| 109 |
\xydef@\oldtexturesFrames@{\oldtexturesPStypes@ |
| 110 |
\expandafter\ifx\csname xyps-psloaded\endcsname\empty\DN@{% |
| 111 |
\xyinputorelse@{xyps-f}{\xydrivernoload@{ps-f}}% |
| 112 |
\installPSframes@ }% |
| 113 |
\else\DN@{\xydriverfail@{frames are}\UnloadPSFrames@\relax}\fi |
| 114 |
\next@ } |
| 115 |
\xydef@\oldtexturesTiles@@{\oldtexturesTiles@} |
| 116 |
\xydef@\oldtexturesTiles@{\oldtexturesPStypes@ |
| 117 |
\expandafter\ifx\csname xyps-psloaded\endcsname\empty\DN@{% |
| 118 |
\xyinputorelse@{xyps-t}{\xydrivernoload@{ps-t}}% |
| 119 |
\installPSpatterns@ \xystandardpatterns@}% |
| 120 |
\else\DN@{\xydriverfail@{Patterns are}\UnloadPSpatterns@\relax}\fi |
| 121 |
\next@ } |
| 122 |
\xyendinput |