| 1 |
%% |
| 2 |
%% This is file `flowchart.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% flowchart.dtx (with options: `package') |
| 8 |
%% |
| 9 |
%% Copyright (C) 2013 by Adrian P Robson |
| 10 |
%% [email protected] |
| 11 |
%% |
| 12 |
%% This work may be distributed and/or modified under the |
| 13 |
%% conditions of the LaTeX Project Public License, either |
| 14 |
%% version 1.3c of this license or (at your option) any later |
| 15 |
%% version. The latest version of this license is in |
| 16 |
%% http://www.latex-project.org/lppl.txt |
| 17 |
%% |
| 18 |
%% This work has the LPPL maintenance status `maintained'. |
| 19 |
%% The Current Maintainer of this work is Adrian Robson. |
| 20 |
%% |
| 21 |
%% This work consists of the files flowchart.dtx and |
| 22 |
%% flowchart.ins |
| 23 |
%% and the derived files flowchart.sty and |
| 24 |
%% flowchart.pdf |
| 25 |
%% |
| 26 |
\NeedsTeXFormat{LaTeX2e}[2011/06/27] |
| 27 |
\ProvidesPackage{flowchart} |
| 28 |
[2015/03/19 3.3 Flowchart shapes for TikZ] |
| 29 |
\RequirePackage{makeshape} |
| 30 |
\RequirePackage{tikz} |
| 31 |
\usetikzlibrary{shapes} |
| 32 |
\def\band{10pt} |
| 33 |
\def\predprocAnchorpath{ |
| 34 |
\pgf@xa=\ctbnex |
| 35 |
\pgf@ya=\ctbney |
| 36 |
\advance\pgf@xa by \band |
| 37 |
\mincorrect{\pgf@xa}{\pgfshapeminwidth} |
| 38 |
\advance\pgf@xa\pgfshapeouterxsep |
| 39 |
\mincorrect{\pgf@ya}{\pgfshapeminheight} |
| 40 |
\advance\pgf@ya\pgfshapeouterysep |
| 41 |
\pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}} |
| 42 |
\pgfpathlineto{\pgfpoint{\pgf@xa}{-\pgf@ya}} |
| 43 |
\pgfpathlineto{\pgfpoint{-\pgf@xa}{-\pgf@ya}} |
| 44 |
\pgfpathlineto{\pgfpoint{-\pgf@xa}{\pgf@ya}} |
| 45 |
\pgfpathclose |
| 46 |
} |
| 47 |
\def\predprocBackground{ |
| 48 |
\pgf@xa=\ctbnex |
| 49 |
\pgf@ya=\ctbney |
| 50 |
\advance\pgf@xa by \band |
| 51 |
\mincorrect{\pgf@xa}{\pgfshapeminwidth} |
| 52 |
\mincorrect{\pgf@ya}{\pgfshapeminheight} |
| 53 |
\pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}} |
| 54 |
\pgfpathlineto{\pgfpoint{\pgf@xa}{-\pgf@ya}} |
| 55 |
\pgfpathlineto{\pgfpoint{-\pgf@xa}{-\pgf@ya}} |
| 56 |
\pgfpathlineto{\pgfpoint{-\pgf@xa}{\pgf@ya}} |
| 57 |
\pgfpathclose |
| 58 |
\advance\pgf@xa by -\band |
| 59 |
\pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}} |
| 60 |
\pgfpathlineto{\pgfpoint{\pgf@xa}{-\pgf@ya}} |
| 61 |
\pgfpathmoveto{\pgfpoint{-\pgf@xa}{\pgf@ya}} |
| 62 |
\pgfpathlineto{\pgfpoint{-\pgf@xa}{-\pgf@ya}} |
| 63 |
} |
| 64 |
\pgfdeclareshape{predproc}{ |
| 65 |
\setpaths{\predprocAnchorpath}{\predprocBackground} |
| 66 |
\savedanchor{\northeast}{ |
| 67 |
\pgf@x = \ctbnex |
| 68 |
\advance\pgf@x by \band |
| 69 |
\mincorrect{\pgf@x}{\pgfshapeminwidth} |
| 70 |
\advance\pgf@x\pgfshapeouterxsep |
| 71 |
\pgf@y = \ctbney |
| 72 |
\mincorrect{\pgf@y}{\pgfshapeminheight} |
| 73 |
\advance\pgf@y\pgfshapeouterysep |
| 74 |
} |
| 75 |
\anchor{north}{ \northeast \pgf@x=0pt } |
| 76 |
\anchor{north east}{ \northeast } |
| 77 |
\anchor{east}{ \northeast \pgf@y=0pt } |
| 78 |
\anchor{south east}{ \northeast \pgf@y=-\pgf@y } |
| 79 |
\anchor{south}{ \northeast \pgf@x=0pt \pgf@y=-\pgf@y } |
| 80 |
\anchor{south west}{ \northeast \pgf@x=-\pgf@x \pgf@y=-\pgf@y } |
| 81 |
\anchor{west}{ \northeast \pgf@x=-\pgf@x \pgf@y=0pt } |
| 82 |
\anchor{north west}{ \northeast \pgf@x=-\pgf@x } |
| 83 |
} |
| 84 |
\def\storagepath{ |
| 85 |
\pgf@xa=\pgf@x \pgf@ya=\pgf@y |
| 86 |
\pgf@xb=-\pgf@xa \pgf@yb=-\pgf@ya |
| 87 |
\advance\pgf@xb by \pgf@xc |
| 88 |
\pgfpathmoveto{\pgfpoint{\pgf@xb}{\pgf@yb}} |
| 89 |
\pgfpatharc{210}{150}{2*\pgf@ya} |
| 90 |
\pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@ya}} |
| 91 |
\pgfpatharc{150}{210}{2*\pgf@ya} |
| 92 |
\pgfpathclose |
| 93 |
} |
| 94 |
\def\arcoffset#1#2{ |
| 95 |
\pgfmathsetlength#1{0.134*2*#2} |
| 96 |
} |
| 97 |
\def\storageParams{ |
| 98 |
\pgf@xa=\ctbnex |
| 99 |
\pgf@ya=\ctbney |
| 100 |
\mincorrect{\pgf@ya}{\pgfshapeminheight} |
| 101 |
\arcoffset{\pgf@xc}{\pgf@ya} |
| 102 |
\advance\pgf@xa by \pgf@xc |
| 103 |
\mincorrect{\pgf@xa}{\pgfshapeminwidth} |
| 104 |
\pgf@x=\pgf@xa |
| 105 |
\pgf@y=\pgf@ya |
| 106 |
} |
| 107 |
\def\storageParamsOuter{ |
| 108 |
\pgf@xa=\ctbnex |
| 109 |
\pgf@ya=\ctbney |
| 110 |
\mincorrect{\pgf@ya}{\pgfshapeminheight} |
| 111 |
\advance\pgf@ya\pgfshapeouterysep |
| 112 |
\arcoffset{\pgf@xc}{\pgf@ya} |
| 113 |
\advance\pgf@xa by \pgf@xc |
| 114 |
\mincorrect{\pgf@xa}{\pgfshapeminwidth} |
| 115 |
\advance\pgf@xa\pgfshapeouterxsep |
| 116 |
\pgf@x=\pgf@xa |
| 117 |
\pgf@y=\pgf@ya |
| 118 |
} |
| 119 |
\def\storageAnchorpath{ |
| 120 |
\storageParamsOuter |
| 121 |
\storagepath |
| 122 |
} |
| 123 |
\def\storageBackground{ |
| 124 |
\storageParams |
| 125 |
\storagepath |
| 126 |
} |
| 127 |
\pgfdeclareshape{storage}{ |
| 128 |
\setpaths{\storageAnchorpath}{\storageBackground} |
| 129 |
\savedanchor{\northeast}{ |
| 130 |
\storageParamsOuter |
| 131 |
} |
| 132 |
\savedanchor{\northeastArc}{ |
| 133 |
\storageParamsOuter |
| 134 |
\advance\pgf@x by -\pgf@xc |
| 135 |
} |
| 136 |
\anchor{north}{ \northeast \pgf@x=0pt } |
| 137 |
\anchor{north east}{ \northeast } |
| 138 |
\anchor{east}{ \northeastArc \pgf@y=0pt } |
| 139 |
\anchor{south east}{ \northeast \pgf@y=-\pgf@y } |
| 140 |
\anchor{south}{ \northeast \pgf@x=0pt \pgf@y=-\pgf@y } |
| 141 |
\anchor{south west}{ \northeastArc \pgf@x=-\pgf@x \pgf@y=-\pgf@y } |
| 142 |
\anchor{west}{ \northeast \pgf@x=-\pgf@x \pgf@y=0pt } |
| 143 |
\anchor{north west}{ \northeastArc \pgf@x=-\pgf@x } |
| 144 |
\anchor{east r}{ \northeast \pgf@y=0pt } |
| 145 |
\anchor{north west r}{ \northeast \pgf@x=-\pgf@x } |
| 146 |
\anchor{south west r}{ \northeast \pgf@x=-\pgf@x \pgf@y=-\pgf@y } |
| 147 |
} |
| 148 |
\pgfdeclareshape{process}{ |
| 149 |
\inheritsavedanchors[from=rectangle] |
| 150 |
\inheritanchor[from=rectangle]{center} |
| 151 |
\inheritanchor[from=rectangle]{text} |
| 152 |
\inheritanchor[from=rectangle]{north} |
| 153 |
\inheritanchor[from=rectangle]{north east} |
| 154 |
\inheritanchor[from=rectangle]{east} |
| 155 |
\inheritanchor[from=rectangle]{south east} |
| 156 |
\inheritanchor[from=rectangle]{south} |
| 157 |
\inheritanchor[from=rectangle]{south west} |
| 158 |
\inheritanchor[from=rectangle]{west} |
| 159 |
\inheritanchor[from=rectangle]{north west} |
| 160 |
\inheritbackgroundpath[from=rectangle] |
| 161 |
\inheritanchorborder[from=rectangle] |
| 162 |
} |
| 163 |
\def\decisionrefout{ |
| 164 |
\pgf@xa=\ctbnex |
| 165 |
\pgf@ya=\ctbney |
| 166 |
\pgf@xb=\ctbnex |
| 167 |
\pgf@yb=\ctbney |
| 168 |
\advance\pgf@xa by \pgf@yb |
| 169 |
\mincorrect{\pgf@xa}{\pgfshapeminwidth} |
| 170 |
\advance\pgf@xa by \pgfshapeouterxsep |
| 171 |
\advance\pgf@ya by \pgf@xb |
| 172 |
\mincorrect{\pgf@ya}{\pgfshapeminheight} |
| 173 |
\advance\pgf@ya by \pgfshapeouterysep |
| 174 |
} |
| 175 |
\def\decisionref{ |
| 176 |
\pgf@xa=\ctbnex |
| 177 |
\pgf@ya=\ctbney |
| 178 |
\pgf@xb=\ctbnex |
| 179 |
\pgf@yb=\ctbney |
| 180 |
\advance\pgf@xa by \pgf@yb |
| 181 |
\mincorrect{\pgf@xa}{\pgfshapeminwidth} |
| 182 |
\advance\pgf@ya by \pgf@xb |
| 183 |
\mincorrect{\pgf@ya}{\pgfshapeminheight} |
| 184 |
} |
| 185 |
\def\decisionpath{ |
| 186 |
\def\refx{\pgf@xa} |
| 187 |
\def\refy{\pgf@ya} |
| 188 |
\pgfpathmoveto{\pgfpoint{0}{\refy}} |
| 189 |
\pgfpathlineto{\pgfpoint{\refx}{0}} |
| 190 |
\pgfpathlineto{\pgfpoint{0}{-\refy}} |
| 191 |
\pgfpathlineto{\pgfpoint{-\refx}{0}} |
| 192 |
\pgfpathclose |
| 193 |
} |
| 194 |
\def\decisionanchor{ |
| 195 |
\decisionrefout |
| 196 |
\decisionpath |
| 197 |
} |
| 198 |
\def\decisionborder{ |
| 199 |
\decisionref |
| 200 |
\decisionpath |
| 201 |
} |
| 202 |
\pgfdeclareshape{decision}{ |
| 203 |
\setpaths{\decisionanchor}{\decisionborder} |
| 204 |
\savedanchor{\north}{ |
| 205 |
\decisionrefout |
| 206 |
\pgf@x = 0pt |
| 207 |
\pgf@y = \pgf@ya |
| 208 |
} |
| 209 |
\savedanchor{\east}{ |
| 210 |
\decisionrefout |
| 211 |
\pgf@x = \pgf@xa |
| 212 |
\pgf@y = 0pt |
| 213 |
} |
| 214 |
\savedanchor{\northeast}{ |
| 215 |
\decisionrefout |
| 216 |
\divide\pgf@xa by 2 |
| 217 |
\divide\pgf@ya by 2 |
| 218 |
\pgf@x = \pgf@xa |
| 219 |
\pgf@y = \pgf@ya |
| 220 |
} |
| 221 |
\anchor{north}{ \north } |
| 222 |
\anchor{north east}{ \northeast } |
| 223 |
\anchor{east}{ \east } |
| 224 |
\anchor{south east}{ \northeast \pgf@y=-\pgf@y } |
| 225 |
\anchor{south}{ \north \pgf@y=-\pgf@y } |
| 226 |
\anchor{south west}{ \northeast \pgf@x=-\pgf@x \pgf@y=-\pgf@y } |
| 227 |
\anchor{west}{ \east \pgf@x=-\pgf@x } |
| 228 |
\anchor{north west}{ \northeast \pgf@x=-\pgf@x } |
| 229 |
} |
| 230 |
\def\terminalrefneout{ |
| 231 |
\pgf@xa=\ctbnex |
| 232 |
\pgf@ya=\ctbney |
| 233 |
\advance\pgf@xa by \pgf@ya |
| 234 |
\mincorrect{\pgf@xa}{\pgfshapeminwidth} |
| 235 |
\advance\pgf@xa\pgfshapeouterxsep |
| 236 |
\mincorrect{\pgf@ya}{\pgfshapeminheight} |
| 237 |
\advance\pgf@ya\pgfshapeouterysep |
| 238 |
\advance\pgf@xa by -\pgf@ya |
| 239 |
} |
| 240 |
\def\terminalrefne{ |
| 241 |
\pgf@xa=\ctbnex |
| 242 |
\pgf@ya=\ctbney |
| 243 |
\advance\pgf@xa by \pgf@ya |
| 244 |
\mincorrect{\pgf@xa}{\pgfshapeminwidth} |
| 245 |
\mincorrect{\pgf@ya}{\pgfshapeminheight} |
| 246 |
\advance\pgf@xa by -\pgf@ya |
| 247 |
} |
| 248 |
\def\terminalpath{ |
| 249 |
\def\refx{\pgf@xa} |
| 250 |
\def\refy{\pgf@ya} |
| 251 |
\def\radius{\refy} |
| 252 |
\pgfpathmoveto{\pgfpoint{\refx}{\refy}} |
| 253 |
\pgfpathlineto{\pgfpoint{-\refx}{\refy}} |
| 254 |
\pgfpatharc{90}{270}{\radius} |
| 255 |
\pgfpathlineto{\pgfpoint{\refx}{-\refy}} |
| 256 |
\pgfpatharc{270}{360}{\radius} |
| 257 |
\pgfpatharc{0}{90}{\radius} |
| 258 |
\pgfpathclose |
| 259 |
} |
| 260 |
\def\terminalanchor{ |
| 261 |
\terminalrefneout |
| 262 |
\terminalpath |
| 263 |
} |
| 264 |
\def\terminalborder{ |
| 265 |
\terminalrefne |
| 266 |
\terminalpath |
| 267 |
} |
| 268 |
\pgfdeclareshape{terminal}{ |
| 269 |
\setpaths{\terminalanchor}{\terminalborder} |
| 270 |
\savedanchor{\northeast}{ |
| 271 |
\terminalrefneout |
| 272 |
\pgf@x = \pgf@xa |
| 273 |
\pgf@y = \pgf@ya |
| 274 |
} |
| 275 |
\savedanchor{\northeastBB}{ |
| 276 |
\terminalrefneout |
| 277 |
\advance \pgf@xa by \pgf@ya |
| 278 |
\pgf@x = \pgf@xa |
| 279 |
\pgf@y = \pgf@ya |
| 280 |
} |
| 281 |
\anchor{north}{ \northeast \pgf@x=0pt } |
| 282 |
\anchor{north east}{ \northeast } |
| 283 |
\anchor{east}{ \northeastBB \pgf@y=0pt } |
| 284 |
\anchor{south east}{ \northeast \pgf@y=-\pgf@y } |
| 285 |
\anchor{south}{ \northeast \pgf@x=0pt \pgf@y=-\pgf@y } |
| 286 |
\anchor{south west}{ \northeast \pgf@x=-\pgf@x \pgf@y=-\pgf@y } |
| 287 |
\anchor{west}{ \northeastBB \pgf@x=-\pgf@x \pgf@y=0pt } |
| 288 |
\anchor{north west}{ \northeast \pgf@x=-\pgf@x } |
| 289 |
\anchor{north east r}{\northeastBB} |
| 290 |
\anchor{south east r}{\northeastBB \pgf@y=-\pgf@y} |
| 291 |
\anchor{south west r}{\northeastBB \pgf@x=-\pgf@x \pgf@y=-\pgf@y} |
| 292 |
\anchor{north west r}{\northeastBB \pgf@x=-\pgf@x} |
| 293 |
} |
| 294 |
\endinput |
| 295 |
%% |
| 296 |
%% End of file `flowchart.sty'. |