1 /** This file is part of Shapes.
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
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.
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/>.
16 ** Copyright 2008, 2014 Henrik Tidefelt
19 ##needs ..Applications..Blockdraw
22 ##lookin ..Applications..Blockdraw
30 dynamic @p0 identity p0
31 dynamic @p1 identity p1
35 Text..@font:Text..Font..COURIER
37 (( @width:4bp & @stroking:Traits..RGB..RED | [spot @p0] & [spot @p1] )
38 & [putlabelAbove (Text..newText << `@p0´) @p0 0]
39 & [putlabelBelow (Text..newText << `@p1´) @p1 0]
40 & [[shift @p0+(1cm,~0.5cm)] [Layout..shiftoff_wlm (Text..newText << [Debug..sourceof pth]) Layout..to_bot]])
43 dynShift: \ pos → ( @p0:[[shift pos] p0] & @p1:[[shift pos] p1] )
45 [dynShift (1dx,0dy)] | { IO..•page << [helper [Debug..locate [hhconnect IO..•page @p0 @p1 0 ~5mm]]] }
46 [dynShift (2dx,0dy)] | { IO..•page << [helper [Debug..locate [hhconnect IO..•page @p0 @p1 0.5 0mm]]] }
47 [dynShift (3dx,0dy)] | { IO..•page << [helper [Debug..locate [hhconnect IO..•page @p0 @p1 1 5mm]]] }
49 [dynShift (1.5dx,~1dy)] | { IO..•page << [helper [Debug..locate [vhconnect IO..•page @p0 @p1]]] }
50 [dynShift (2.5dx,~1dy)] | { IO..•page << [helper [Debug..locate [hvconnect IO..•page @p0 @p1]]] }
52 [dynShift (1dx,~2dy)] | { IO..•page << [helper [Debug..locate [vvconnect IO..•page @p0 @p1 0 ~5mm]]] }
53 [dynShift (2dx,~2dy)] | { IO..•page << [helper [Debug..locate [vvconnect IO..•page @p0 @p1 0.5 0mm]]] }
54 [dynShift (3dx,~2dy)] | { IO..•page << [helper [Debug..locate [vvconnect IO..•page @p0 @p1 1 5mm]]] }