Fix Makefile whitespace errors
[shapes.git] / examples / doc / clip-text.shape
blob11f5d6f4956712a306886d1c0d58de09b940e586
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 2009, 2014 Henrik Tidefelt
17  **/
19 ##lookin ..Shapes
20 ##lookin ..Shapes..Geometry
21 ##lookin ..Shapes..Text
23 /** Color definitions borrowed from logo.shape. **/
24 shapes_gray: [Traits..gray 0.94]
25 shapes_yellow: [Traits..rgb 1 0.7 0]
26 shapes_blue: [Traits..rgb 0.3 0.6 1]
28 @size:20mm
31   content: Traits..@stroking:shapes_yellow & Traits..@width:2bp
32            |
33            [[Data..range 2mm @size-10mm 2mm].foldl
34             \ p e → p & [Graphics..stroke (1cm,e)--(6cm,e)]
35             Graphics..null]
37   IO..•page << [Graphics..clip content
38                  Traits..@nonstroking:shapes_gray & Traits..@stroking:shapes_blue & @rendering:[textmode] | ( newText << [kern `Shapes´] )]
39            >> [shift (0cm,0*@size)]
40   IO..•page << [Graphics..clip content
41                  Traits..@nonstroking:shapes_gray & Traits..@stroking:shapes_blue & @rendering:[textmode fill:true] | ( newText << [kern `Shapes´] )]
42            >> [shift (0cm,~1*@size)]
43   IO..•page << [Graphics..clip content
44                  Traits..@nonstroking:shapes_gray & Traits..@stroking:shapes_blue & @rendering:[textmode stroke:true] | ( newText << [kern `Shapes´] )]
45            >> [shift (0cm,~2*@size)]
46   IO..•page << [Graphics..clip content
47                  Traits..@nonstroking:shapes_gray & Traits..@stroking:shapes_blue & @rendering:[textmode fill:true stroke:true] | ( newText << [kern `Shapes´] )]
48            >> [shift (0cm,~3*@size)]