Fix Makefile whitespace errors
[shapes.git] / examples / doc / bondgraph-termbonds.shape
blob762367bf772ac20e53c97bf3d12c03034b9f8dd1
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 ..Shapes..Geometry
23 ##lookin ..Applications..Blockdraw
25 ##unit dx = 6cm
26 ##unit dy = 6cm
27 dc: (2cm,0cm)
29 centermark: Traits..@stroking:[Traits..gray 0.7] | [Graphics..stroke (~1cm,0cm)--(1cm,0cm) & (0cm,~1cm)--(0cm,1cm) ]
31 helper: \ pos dc fun lbl →
33   •dst: Graphics..newGroup
34   •dst << [[shift dc] centermark]
35        << sjunction
36        << [Graphics..stroke [fun •dst Graphics..pointpicture dc [Graphics..TeX `I: $m_{1}$´]] head:[Graphics..ShapesArrow width:4 ...]]
37        << [[shift (0,~2.5cm)] [Layout..shiftoff_wlm lbl Layout..to_bot]]
38   [shift pos] [] (•dst)
41 IO..•page << [helper (1dx,2dy) [rotate 0°][]dc terminalfrom [Graphics..TeX `\texttt{terminalfrom}´]]
42 IO..•page << [helper (2dx,2dy) [rotate 90°][]dc terminalfrom [Graphics..TeX `\texttt{terminalfrom}´]]
43 IO..•page << [helper (3dx,2dy) [rotate 180°][]dc terminalfrom [Graphics..TeX `\texttt{terminalfrom}´]]
44 IO..•page << [helper (4dx,2dy) [rotate 270°][]dc terminalfrom [Graphics..TeX `\texttt{terminalfrom}´]]
46 IO..•page << [helper (1dx,1dy) [rotate 0°][]dc terminalto [Graphics..TeX `\texttt{terminalto}´]]
47 IO..•page << [helper (2dx,1dy) [rotate 90°][]dc terminalto [Graphics..TeX `\texttt{terminalto}´]]
48 IO..•page << [helper (3dx,1dy) [rotate 180°][]dc terminalto [Graphics..TeX `\texttt{terminalto}´]]
49 IO..•page << [helper (4dx,1dy) [rotate 270°][]dc terminalto [Graphics..TeX `\texttt{terminalto}´]]