summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarypatterns.code.tex
blob: aebb9fb5ce625b67b1af85b19bd8af738fc848dd (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
% Copyright 2006 by Till Tantau
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.

\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarypatterns.code.tex,v 1.7 2006/10/11 15:22:26 tantau Exp $


% Lines in different directions

\pgfdeclarepatternformonly{horizontal lines}{\pgfpointorigin}{\pgfpoint{100pt}{1pt}}{\pgfpoint{100pt}{3pt}}%
{
  \pgfsetlinewidth{0.4pt}
  \pgfpathmoveto{\pgfpoint{0pt}{0.5pt}}
  \pgfpathlineto{\pgfpoint{100pt}{0.5pt}}
  \pgfusepath{stroke}
}

\pgfdeclarepatternformonly{vertical lines}{\pgfpointorigin}{\pgfpoint{1pt}{100pt}}{\pgfpoint{3pt}{100pt}}%
{
  \pgfsetlinewidth{0.4pt}
  \pgfpathmoveto{\pgfpoint{0.5pt}{0pt}}
  \pgfpathlineto{\pgfpoint{0.5pt}{100pt}}
  \pgfusepath{stroke}
}

\pgfdeclarepatternformonly{north east lines}{\pgfpoint{-1pt}{-1pt}}{\pgfpoint{4pt}{4pt}}{\pgfpoint{3pt}{3pt}}%
{
  \pgfsetlinewidth{0.4pt}
  \pgfpathmoveto{\pgfpoint{0pt}{0pt}}
  \pgfpathlineto{\pgfpoint{3.1pt}{3.1pt}}
  \pgfusepath{stroke}
}

\pgfdeclarepatternformonly{north west lines}{\pgfpoint{-1pt}{-1pt}}{\pgfpoint{4pt}{4pt}}{\pgfpoint{3pt}{3pt}}%
{
  \pgfsetlinewidth{0.4pt}
  \pgfpathmoveto{\pgfpoint{0pt}{3pt}}
  \pgfpathlineto{\pgfpoint{3.1pt}{-0.1pt}}
  \pgfusepath{stroke}
}

% Crossed lines in different directions

\pgfdeclarepatternformonly{grid}{\pgfpoint{-1pt}{-1pt}}{\pgfpoint{4pt}{4pt}}{\pgfpoint{3pt}{3pt}}%
{
  \pgfsetlinewidth{0.4pt}
  \pgfpathmoveto{\pgfpoint{0pt}{0pt}}
  \pgfpathlineto{\pgfpoint{0pt}{3.1pt}}
  \pgfpathmoveto{\pgfpoint{0pt}{0pt}}
  \pgfpathlineto{\pgfpoint{3.1pt}{0pt}}
  \pgfusepath{stroke}
}

\pgfdeclarepatternformonly{crosshatch}{\pgfpoint{-1pt}{-1pt}}{\pgfpoint{4pt}{4pt}}{\pgfpoint{3pt}{3pt}}%
{
  \pgfsetlinewidth{0.4pt}
  \pgfpathmoveto{\pgfpoint{3.1pt}{0pt}}
  \pgfpathlineto{\pgfpoint{0pt}{3.1pt}}
  \pgfpathmoveto{\pgfpoint{0pt}{0pt}}
  \pgfpathlineto{\pgfpoint{3.1pt}{3.1pt}}
  \pgfusepath{stroke}
}


% Dotted regions

\pgfdeclarepatternformonly{dots}{\pgfpoint{-1pt}{-1pt}}{\pgfpoint{1pt}{1pt}}{\pgfpoint{3pt}{3pt}}%
{
  \pgfpathcircle{\pgfpoint{0pt}{0pt}}{.5pt}
  \pgfusepath{fill}
}

\pgfdeclarepatternformonly{crosshatch dots}{\pgfpoint{-1pt}{-1pt}}{\pgfpoint{2.5pt}{2.5pt}}{\pgfpoint{3pt}{3pt}}%
{
  \pgfpathcircle{\pgfpoint{0pt}{0pt}}{.5pt}
  \pgfpathcircle{\pgfpoint{1.5pt}{1.5pt}}{.5pt}
  \pgfusepath{fill}
}




% Star shaped patterns

\pgfdeclarepatternformonly{fivepointed stars}{\pgfpointorigin}{\pgfpoint{3mm}{3mm}}{\pgfpoint{3mm}{3mm}}%
{
  \pgftransformshift{\pgfpoint{1mm}{1mm}}
  \pgfpathmoveto{\pgfpointpolar{18}{1mm}}
  \pgfpathlineto{\pgfpointpolar{162}{1mm}}
  \pgfpathlineto{\pgfpointpolar{306}{1mm}}
  \pgfpathlineto{\pgfpointpolar{90}{1mm}}
  \pgfpathlineto{\pgfpointpolar{234}{1mm}}
  \pgfpathclose%
  \pgfusepath{fill}
}

\pgfdeclarepatternformonly{sixpointed stars}{\pgfpointorigin}{\pgfpoint{3mm}{3mm}}{\pgfpoint{3mm}{3mm}}%
{
  \pgftransformshift{\pgfpoint{1mm}{1mm}}
  \pgfpathmoveto{\pgfpointpolar{30}{1mm}}
  \pgfpathlineto{\pgfpointpolar{150}{1mm}}
  \pgfpathlineto{\pgfpointpolar{270}{1mm}}
  \pgfpathclose%
  \pgfpathmoveto{\pgfpointpolar{-30}{1mm}}
  \pgfpathlineto{\pgfpointpolar{-270}{1mm}}
  \pgfpathlineto{\pgfpointpolar{-150}{1mm}}
  \pgfpathclose%
  \pgfsetnonzerorule
  \pgfusepath{fill}
}



% Bricks

\pgfdeclarepatternformonly{bricks}{\pgfpoint{-1pt}{-1pt}}{\pgfpoint{5mm}{5mm}}{\pgfpoint{4mm}{4mm}}%
{
  \pgfsetlinewidth{0.8pt}
  \pgfpathmoveto{\pgfpoint{0mm}{1mm}}
  \pgfpathlineto{\pgfpoint{4mm}{1mm}}
  \pgfpathmoveto{\pgfpoint{0mm}{3mm}}
  \pgfpathlineto{\pgfpoint{4mm}{3mm}}
  \pgfpathmoveto{\pgfpoint{1mm}{0mm}}
  \pgfpathlineto{\pgfpoint{1mm}{1mm}}
  \pgfpathmoveto{\pgfpoint{3mm}{1mm}}
  \pgfpathlineto{\pgfpoint{3mm}{3mm}}
  \pgfpathmoveto{\pgfpoint{1mm}{3mm}}
  \pgfpathlineto{\pgfpoint{1mm}{4mm}}
  \pgfusepath{stroke}
}




\endinput