Fix Makefile whitespace errors
[shapes.git] / examples / showcase / bracedemo.shape
blob8fc8a1b07c57ab94ee4b61509ab1abcc14792bda
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, 2014 Henrik Tidefelt
17  **/
19 ##needs ..Shapes..Graphics / braces
21 ##lookin ..Shapes
23 xStep: 5mm
24 lMin: 1.5cm
25 lMax: 10cm
26 lSteps: '20
28 IO..•page <<
29  [[Data..range '0 lSteps].foldl
30   \ p e →
31    {
32      l: lMin+e*(lMax-lMin)/(lSteps-'1)
33      br: [Graphics..someBrace (e*xStep,0cm) (e*xStep,l)]
34      p
35      &
36      [Graphics..stroke br]
37 |**     &
38 |**     ( Traits..@stroking:Traits..RGB..RED & Traits..@width:0.5bp | [Graphics..stroke [Geometry..controlling br]] )
39      &
40      ( Graphics..fill [] (Traits..@width:1bp|[Graphics..someClosedBrace (e*xStep,lMax+lMin) (e*xStep,l)]) )
41    }
42   Graphics..null]