-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrect-text.xml
More file actions
38 lines (35 loc) · 1.31 KB
/
rect-text.xml
File metadata and controls
38 lines (35 loc) · 1.31 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
30
31
32
33
34
35
36
37
38
<svg>
<defs>
<marker id="arrow" refX="1" refY="0.5" orient="auto-start-reverse" markerWidth="5" markerHeight="5" viewBox="0 0 1 1">
<path d="M 0 0 1 0.5 0 1" style="stroke-width: 0.2;"/>
</marker>
</defs>
<style>
<![CDATA[
rect, line {
stroke-width: 0.5;
stroke: black;
fill: white;
}
text {
font-family: "Ubuntu Mono", monospace;
font-size: 3px;
}
/* prior to top/bottom/left/right so they can override this */
text { dominant-baseline: central; text-anchor: middle; }
text.d-text-top { dominant-baseline: text-before-edge; }
text.d-text-bottom { dominant-baseline: text-after-edge; }
text.d-text-left { text-anchor: start; }
text.d-text-right { text-anchor: end; }
]]>
</style>
<rect xy="0" wh="15" text="Hi!" text-loc="tl" />
<rect xy="20 0" wh="15" text="Hi!" text-loc="t" />
<rect xy="40 0" wh="15" text="Hi!" text-loc="tr" />
<rect xy="0 20" wh="15" text="Hi!" text-loc="l" />
<rect xy="20 20" wh="15" text="Hi!" text-loc="c" />
<rect xy="40 20" wh="15" text="Hi!" text-loc="r" />
<rect xy="0 40" wh="15" text="Hi!" text-loc="bl" />
<rect xy="20 40" wh="15" text="Hi!" text-loc="b" />
<rect xy="40 40" wh="15" text="Hi!" text-loc="br" />
</svg>