blob: eecc52c09681487b8c22961a24a8c5db0fe3eef8 (
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
|
%% $Id: pstricks-dots.tex 269 2021-09-25 13:47:26Z herbert $
%%
%% This is file `pstricks-dots.tex',
%%
%% IMPORTANT NOTICE:
%%
%% Herbert Voss <hvoss@tug.org>
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN archives
%% in directory macros/latex/base/lppl.txt.
%%
%% DESCRIPTION:
%% `pstricks-dots' base code for dots
%%
%% fileversion and filedate see main file pstricks.tex
%%
\define@key[psset]{pstricks}{dotsize}[2pt 2]{%
\pst@expandafter\pst@getdimnum{#1} 0 {} {}\@nil%
\edef\psk@@dotsize{\pst@number\pst@dimg}%
\let\psk@@@dotsize\pst@tempg%
\edef\psk@dotsize{ /DS \psk@@dotsize \psk@@@dotsize CLW mul add 2 div def }}
\psset[pstricks]{dotsize=2pt 2}
%
\define@key[psset]{pstricks}{dotscale}[1]{%
\pst@getscale{#1}\psk@dotscale
\ifx\psk@dotscale\@empty
\def\psk@xdotscale{1 }%
\def\psk@ydotscale{1 }%
\else
\let\psk@xdotscale\pst@tempg
\let\psk@ydotscale\pst@temph
\fi}
%
\def\pst@Getangle#1#2{%
\pst@getangle{#1}\pst@tempg
\def\pst@temph{0. }%
\ifx\pst@tempg\pst@temph\def#2{}\else\edef#2{\pst@tempg\space rotate }\fi}
%
\define@key[psset]{pstricks}{dotangle}[0]{%
\pst@getangle{#1}\psk@@dotangle
\ifdim\psk@@dotangle\p@=\z@
\let\psk@dotangle\@empty
\else
\edef\psk@dotangle{\psk@@dotangle rotate }%
\fi}
\psset[pstricks]{dotangle=0}
%
\def\pst@getdotsize{%
\pst@dimg=\psk@@@dotsize\pslinewidth
\advance\pst@dimg\psk@@dotsize\p@
\pst@dimh=\psk@ydotscale\pst@dimg
\pst@dimg=\psk@xdotscale\pst@dimg
\divide\pst@dimh 2
\divide\pst@dimg 2\relax}
%
\psset[pstricks]{dotscale=1}
%
\def\psdot{\pst@object{psdot}}
\def\psdot@i{\@ifnextchar({\psdot@ii}{\psdot@ii(\z@,\z@)}}
\def\psdot@ii(#1){%
\begin@SpecialObj%
% hv modification 1.13 2005-11-28
\solid@star%
% hv modification end
\pst@@getcoor{#1}%
\addto@pscode{
\psk@dotsize
\@nameuse{psds@\psk@dotstyle}
\tx@setStrokeTransparency
\pst@coor Dot}%
\end@SpecialObj}
%
\def\psdots{\pst@object{psdots}}
\def\psdots@i{%
\begin@SpecialObj%
\pst@getcoors[\psdots@ii}
\def\psdots@ii{%
\addto@pscode{ false \tx@NArray \psdots@iii }%
\end@SpecialObj}
\def\psdots@iii{%
\psk@dotsize
\@nameuse{psds@\psk@dotstyle}
\tx@setStrokeTransparency
newpath
n { transform floor .5 add exch floor .5 add exch itransform Dot } repeat }
%
% DG: dead code (to suppress until \psset[pstricks]{dotstyle) ? - Aug. 4, 1997
\def\tx@SQ{SQ }
\def\tx@ST{ST }
\def\tx@SP{SP }
%
\def\pst@gdot#1{ /Dot { gsave T \psk@dotangle \psk@dotscale #1 grestore } def }
%
\@namedef{psds@*}{\pst@gdot{ 0 0 DS \tx@SD }}
\@namedef{psds@o}{%
/r2 DS CLW sub def
\pst@gdot{ 0 0 DS \tx@SD \pst@usecolor\psfillcolor SLW 0 0 r2 \tx@SD }}
\@namedef{psds@square*}{ /r1 DS .886 mul def \pst@gdot{r1 \tx@SQ }}
\@namedef{psds@square}{%
/r1 DS .886 mul def /r2 r1 CLW sub def
\pst@gdot{r1 \tx@SQ \pst@usecolor\psfillcolor r2 \tx@SQ}}
\@namedef{psds@triangle*}{%
/y1 DS .778 mul neg def /x1 y1 1.732 mul neg def
\pst@gdot{x1 y1 \tx@ST}}
\@namedef{psds@triangle}{%
/y1 DS .778 mul neg def /x1 y1 1.732 mul neg def
/y2 y1 CLW add def /x2 y2 1.732 mul neg def
\pst@gdot{x1 y1 \tx@ST x2 y2 \tx@ST}}
\@namedef{psds@pentagon*}{%
/r1 DS 1.149 mul def
\pst@gdot{r1 \tx@SP}}
\@namedef{psds@pentagon}{%
DS .93 mul dup 1.236 mul /r1 ED CLW sub 1.236 mul /r2 ED
\pst@gdot{r1 \tx@SP r2 \tx@SP}}
\@namedef{psds@+}{%
/DS DS 1.253 mul def
\pst@gdot{DS 0 moveto DS neg 0 L stroke 0 DS moveto 0 DS neg L stroke}}
\@namedef{psds@|}{%
\psk@tbarsize CLW mul add 2 div /DS ED
\pst@gdot{0 DS moveto 0 DS neg L stroke}}
% DG: end dead code?
%
\define@key[psset]{pstricks}{dotstyle}[*]{%
\@ifundefined{psds@#1}%
{\@pstrickserr{Dot style `#1' not defined}\@eha}%
{\edef\psk@dotstyle{#1}}}
%
\psset[pstricks]{dotstyle=*}
%
\def\tx@FontDot{FontDot }
\def\newpsfontdot#1[#2]#3#4{%
\@namedef{psds@#1}{%
/#3 \psk@@dotangle [#2] \tx@FontDot
/Dot { moveto gsave \psk@dotscale #4 show grestore } bind def
}}
\def\newpsfontdotH#1[#2]#3#4#5{% for filled objects
\@namedef{psds@#1}{%
/#3 \psk@@dotangle [#2] \tx@FontDot
/Dot {
moveto
gsave \psk@dotscale \pst@usecolor\psfillcolor #5 show grestore % fill first
gsave \psk@dotscale #4 show grestore % show the unfilled one
} bind def
}}
%
\ifPSTlualatex\else\pstheader{pst-dots.pro}\fi % load the type 1 font
%%40
% /.notdef /BoldAdd /.notdef /BoldCircle /BoldDiamond /SolidOtimes /BoldOctogon /SolidHexagon
% /BoldHexagon /BoldBar /SolidAsterisk /BoldAsterisk /.notdef /BOplus /BOtimes /.notdef
%%50
% /BoldPentagon /.notdef /.notdef /BoldSquare /BoldTriangle /.notdef /.notdef /.notdef
% /BoldMul /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
%%60
% /.notdef /Add /Bullet /Circle /Diamond /SolidOplus /Octogon /SolidOctogon
% /Hexagon /Bar /.notdef /Asterisk /SolidDiamond /Oplus /Otimes /.notdef
%%70
% /Pentagon /SolidPentagon /SolidSquare /Square /Triangle /SolidTriangle /.notdef /.notdef
% /Mul /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
\newpsfontdot{B+}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<41>}
\newpsfontdot{BoldAdd}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<41>}
\newpsfontdot{Bo}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<43>}
\newpsfontdot{BoldCircle}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<43>}
\newpsfontdot{BoldDiamond}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<44>}
\newpsfontdot{Bdiamond}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<44>}
\newpsfontdot{SolidOtimes}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<45>}
\newpsfontdot{BoldOctogon}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<46>}
\newpsfontdot{SolidHexagon}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<47>}
\newpsfontdot{BoldHexagon}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<48>}
\newpsfontdot{BoldBar}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<49>}
\newpsfontdot{B|}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<49>}
\newpsfontdot{Asterisk*}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<4A>}
\newpsfontdot{SolidAsterisk}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<4A>}
\newpsfontdot{BoldAsterisk}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<4B>}
\newpsfontdot{Basterisk}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<4B>}
\newpsfontdot{BoldOplus}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<4D>}
\newpsfontdot{BoldOtimes}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<4E>}
\newpsfontdot{BoldPentagon}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<50>}
\newpsfontdot{Bpentagon}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<50>}
\newpsfontdot{BoldSquare}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<53>}
\newpsfontdot{Bsquare}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<53>}
\newpsfontdot{Btriangle}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<54>}
\newpsfontdot{BoldTriangle}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<54>}
\newpsfontdot{BoldMul}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<58>}
%
\newpsfontdot{+}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<61>}
\newpsfontdot{Add}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<61>}
\newpsfontdot{bullet}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<62>}
\newpsfontdot{Bullet}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<62>}
\newpsfontdot{*}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<62>}
\newpsfontdot{o}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<63>}
\newpsfontdot{Circle}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<63>}
\newpsfontdot{Diamond}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<64>}
\newpsfontdot{diamond}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<64>}
\newpsfontdot{Oplus*}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<65>}
\newpsfontdot{SolidOplus}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<65>}
\newpsfontdot{Octogon}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<66>}
\newpsfontdot{Octogon*}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<67>}
\newpsfontdot{Hexagon}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<68>}
\newpsfontdot{Bar}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<69>}
\newpsfontdot{|}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<69>}
\newpsfontdot{asterisk}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<6B>}
\newpsfontdot{Asterisk}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<6B>}
\newpsfontdot{SolidDiamond}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<6C>}
\newpsfontdot{diamond*}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<6C>}
\newpsfontdot{oplus}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<6D>}
\newpsfontdot{Oplus}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<6D>}
\newpsfontdot{otimes}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<6E>}
\newpsfontdot{Otimes}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<6E>}
%
\newpsfontdot{pentagon}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<70>}
\newpsfontdot{SolidPentagon}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<71>}
\newpsfontdot{Pentagon}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<70>}
\newpsfontdot{pentagon*}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<71>}
\newpsfontdot{square*}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<72>}
\newpsfontdot{SolidSquare}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<72>}
\newpsfontdot{square}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<73>}
\newpsfontdot{Square}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<73>}
\newpsfontdot{triangle}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<74>}
\newpsfontdot{Triangle}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<74>}
\newpsfontdot{triangle*}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<75>}
\newpsfontdot{SolidTriangle}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<75>}
\newpsfontdot{x}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<78>}
\newpsfontdot{Mul}[1.5 0.0 0.0 1.5 0 0]{PSTricksDotFont}{<78>}
%
%% END: pstricks-dots.tex
\endinput
|