summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/xypic/xytextures.tex
blob: e69f1de5f213bf45659c1ff9a68c01aca7885238 (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
%% xytextures.tex from $Id: xytextures.doc,v 3.7 2011/03/14 20:14:00 krisrose Exp $
%%
%% Xy-pic ``Textures'' driver interface option.
%% Copyright (c) 1995-1996 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/.
%%
\ifx\xyloaded\undefined \input xy \fi
\xyprovide{textures}{Textures driver}{\stripRCS$Revision: 3.7 $}%
 {Ross Moore}{ross.moore@mq.edu.au}%
 {Mathematics Department, Macquarie University, NSW~2109, Australia}
\xydef@\Textures@@#1{\dvimessage@{Textures}{#1}}
\newdriver{%
 \xyaddsupport{color}\texturesColor@@
 \xyaddsupport{crayon}\texturesCrayon@@
 \xyaddsupport{ps}\texturesPS@@
 \xyaddsupport{rotate}\texturesRotate@@
 \xyaddsupport{line}\texturesLine@@
 \xyaddsupport{frame}\texturesFrames@@
 \xyaddsupport{tile}\texturesTiles@@
 \xyaddsupport{cmtip}\relax
}
\xydef@\TexturesColor@push#1{\special{color push}\special{color #1}}
\xydef@\TexturesColours@{\texturesPStypes@
 \let\xylocalColor@=\xystackcolor@
 \let\xycolor@push=\TexturesColor@push
 \def\xycolor@{\xycolor@@}%
 \expandafter\ifx\csname xyps-psloaded\endcsname\empty\DN@{%
 \xyinputorelse@{xyps-c}{\xydrivernoload@{ps-c}}%
 \installPScolor@ }\else\DN@{}\fi \next@
 \ifx\xycolor@@\xyNoColor@ \let\xycolor@@=\xycolor@raw@@\fi
 \ifx\xycrayolaloaded\empty \DN@{\xystandardcolors@\texturesCrayon@@{}}%
 \else\let\next@=\xystandardcolors@ \fi \next@ 
 \let\xycolorwarning@=\relax \Textures@@{color}%
 \let\texturesColor@@=\relax
 \let\UnloadColor@@=\NoTexturesColor@
 }
\xydef@\texturesColor@@{\TexturesColours@}
\xydef@\NoTexturesColor@{%
 \let\xylocalColor@=\xyNoColor@@
 \let\xycolor@=\xyNoColor@
 \let\xycolorwarning@=\xycolorwarning@@
 \let\texturesColor@@=\TexturesColours@
 \let\UnloadColor@@=\UnloadColor@
 }
\xydef@\texturesCrayon@@{\texturesColor@@\texturesCrayon@}
\xydef@\texturesCrayon@{\installCrayolaColors@}%
\xydef@\texturesPS@@{\texturesPS@}
\xydef@\texturesPSunload@{\UnloadPS@
 \let\UnloadPS@@=\UnloadPS@
 \let\texturesPS@@=\texturesPS@ }
\xydef@\texturesPStypes@{%
 \xyinputorelse@{xyps-ps}{\xydrivernoload@{ps-ps}}%
 \ifx\PSspecial@@\TexturesSpecial@\else
 \let\PSspecial@@=\TexturesSpecial@
 \let\PSmacro@@=\TexturesMacro@
 \let\PSdict@@=\TexturesDict@
 \let\PSraw@@=\TexturesRaw@
 \let\PSinclude@@=\TexturesInclude@
 \let\PSspecialdict@@=\TexturesSpecialDict@
 \let\xyPSobeylines@@=\obeyTextureslines@
 \Textures@@{PostScript}%
 \fi \texturesCurrpt@ \XYpredict@ }
\xydef@\TexturesSpecial@#1{\firstPS@@\special{postscript #1}}
\xydef@\TexturesMacro@#1{\special{postscript {#1}xy}}
\xydef@\TexturesDict@#1{\special{prePostScript #1}}
\xydef@\TexturesSpecialDict@#1{\special{prePostScript #1}}
\xydef@\TexturesInclude@#1{\firstPS@@\special{prePostScriptfile #1}}
\xydef@\TexturesRaw@#1{\firstPS@@\special{rawpostscript #1}}%
{\catcode`\^^M=\active%
 \gdef\next{\catcode`\^^M=\active \let^^M=\par%
 \let\PSspecial@@=\TexturesDict@ \obeyspaces}}
\xylet@\obeyTextureslines@=\next
\xydef@\texturesCurrpt@{\let\xyPScurrpt@@=\texturesCurrpt@@}%
\xydef@\texturesCurrpt@@{\PSspecial@@{xyi}\PSraw@@{userdict begin xyx end}}
\xydef@\texturesPS@{\texturesPStypes@
 \let\texturesPS@@=\relax
 \let\UnloadPS@@=\texturesPSunload@ 
 \let\installxyps@@=\relax \installxyps@ }
\xydef@\texturesRotate@@{\texturesRotate@}
\xydef@\texturesRotate@{\texturesPStypes@
 \expandafter\ifx\csname xyps-psloaded\endcsname\empty\DN@{%
 \xyinputorelse@{xyps-r}{\xydrivernoload@{ps-r}}%
 \xyRotScale@@ \installPSrotscale@ }%
 \else\DN@{\xydriverfail@{rotations are}\UnloadRotate@\relax}\fi
 \next@}
\xydef@\texturesLine@@{\texturesLine@}
\xydef@\texturesLine@{\texturesPStypes@
 \expandafter\ifx\csname xyps-psloaded\endcsname\empty\DN@{%
 \xyinputorelse@{xyps-l}{\xydrivernoload@{ps-l}}%
 \installPSline@ }%
 \else\DN@{\xydriverfail@{line-widths are}\UnloadLine@\relax}\fi
 \next@ }
\xydef@\texturesFrames@@{\texturesFrames@}
\xydef@\texturesFrames@{\texturesPStypes@
 \expandafter\ifx\csname xyps-psloaded\endcsname\empty\DN@{%
 \xyinputorelse@{xyps-f}{\xydrivernoload@{ps-f}}%
 \installPSframes@ }%
 \else\DN@{\xydriverfail@{frames are}\UnloadPSFrames@\relax}\fi
 \next@ }
\xydef@\texturesTiles@@{\texturesTiles@}
\xydef@\texturesTiles@{\texturesPStypes@
 \expandafter\ifx\csname xyps-psloaded\endcsname\empty\DN@{%
 \xyinputorelse@{xyps-t}{\xydrivernoload@{ps-t}}%
 \installPSpatterns@ \xystandardpatterns@}%
 \else\DN@{\xydriverfail@{Patterns are}\UnloadPSpatterns@\relax}\fi
 \next@ }
\xyendinput