-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreuse.xml
More file actions
29 lines (22 loc) · 1.1 KB
/
reuse.xml
File metadata and controls
29 lines (22 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<svg>
<!-- Draw a 'pipeline' shape using a path element -->
<style>
.coin { fill: gold; stroke: silver; }
</style>
<specs>
<path id="pipeline" d="M $pipe_x {{$pipe_y + $pipe_w / 4}}
a {{$pipe_w / 2}} {{$pipe_w / 4}} 0 0 0 $pipe_w 0
a {{$pipe_w / 2}} {{$pipe_w / 4}} 0 0 0 {{-$pipe_w}} 0
v {{$pipe_h - $pipe_w / 2}}
a {{$pipe_w / 2}} {{$pipe_w / 4}} 0 0 0 $pipe_w 0
v {{-$pipe_h + $pipe_w / 2}}" />
<path id="box3d" d="M $target@tl l 2 -2 h $target~w l -2 2 z M $target@tr v $target~h l 2 -2 v -$target~h z"/>
</specs>
<reuse href="#pipeline" pipe_w="10" pipe_h="40" pipe_x="10" pipe_y="10" style="fill:red"/>
<reuse id="p1" href="#pipeline" pipe_w="20" pipe_h="13" pipe_x="30" pipe_y="10" class="coin"/>
<reuse id="p2" href="#pipeline" pipe_w="20" pipe_h="20" pipe_x="30" pipe_y="25" style="stroke-width: 0.1; fill: limegreen;"/>
<rect id="border" surround="#p1 #p2" margin="4"/>
<reuse href="#box3d" target="#border" style="fill:lightgrey"/>
<rect id="box" xy="10 60" wh="40 10"/>
<reuse href="#box3d" target="#box" style="fill:lightgrey"/>
</svg>