Updating documentation and examples with new core namespaces
[shapes.git] / examples / doc / bondgraph-labels.shape
blob7254fa4ac5e2c63deee999215921f3d80be26c6b
1 /** This file is part of Shapes.
2  **
3  ** Shapes is free software: you can redistribute it and/or modify
4  ** it under the terms of the GNU General Public License as published by
5  ** the Free Software Foundation, either version 3 of the License, or
6  ** any later version.
7  **
8  ** Shapes is distributed in the hope that it will be useful,
9  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
10  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  ** GNU General Public License for more details.
12  **
13  ** You should have received a copy of the GNU General Public License
14  ** along with Shapes.  If not, see <http://www.gnu.org/licenses/>.
15  **
16  ** Copyright 2008, 2010, 2014 Henrik Tidefelt
17  **/
19 ##needs ..Applications..Blockdraw
21 ##lookin ..Shapes
22 ##lookin ..Applications..Blockdraw
24 ##unit dx = 4cm
25 ##unit dy = 5cm
26 dc: (1.4cm,0)
28 helper: \ pos dc fun lbl →
29 [[shift pos]
31   p: (0cm,0cm)--dc
32   [ubond p]
33   &
34   [fun p]
35   &
36   [[shift (0,~2cm)] [Layout..shiftoff_wlm lbl Layout..to_bot]]
39 IO..•page << [helper (1dx,2dy) [rotate   0°][]dc [flowlabel lbl:[Graphics..TeX `$f_{1}$´] ...] [Graphics..TeX `\texttt{flowlabel}´]]
40 IO..•page << [helper (2dx,2dy) [rotate  90°][]dc [flowlabel lbl:[Graphics..TeX `$f_{1}$´] ...] [Graphics..TeX `\texttt{flowlabel}´]]
41 IO..•page << [helper (3dx,2dy) [rotate 180°][]dc [flowlabel lbl:[Graphics..TeX `$f_{1}$´] ...] [Graphics..TeX `\texttt{flowlabel}´]]
42 IO..•page << [helper (4dx,2dy) [rotate 270°][]dc [flowlabel lbl:[Graphics..TeX `$f_{1}$´] ...] [Graphics..TeX `\texttt{flowlabel}´]]
44 IO..•page << [helper (1dx,1dy) [rotate   0°][]dc [effortlabel lbl:[Graphics..TeX `$e_{1}$´] ...] [Graphics..TeX `\texttt{effortlabel}´]]
45 IO..•page << [helper (2dx,1dy) [rotate  90°][]dc [effortlabel lbl:[Graphics..TeX `$e_{1}$´] ...] [Graphics..TeX `\texttt{effortlabel}´]]
46 IO..•page << [helper (3dx,1dy) [rotate 180°][]dc [effortlabel lbl:[Graphics..TeX `$e_{1}$´] ...] [Graphics..TeX `\texttt{effortlabel}´]]
47 IO..•page << [helper (4dx,1dy) [rotate 270°][]dc [effortlabel lbl:[Graphics..TeX `$e_{1}$´] ...] [Graphics..TeX `\texttt{effortlabel}´]]