1 | canvas { |
---|
2 | default-points: false; |
---|
3 | default-lines: false; |
---|
4 | } |
---|
5 | |
---|
6 | node[test] { |
---|
7 | symbol-shape: circle; |
---|
8 | symbol-size: 5; |
---|
9 | symbol-fill-color: #8888ff; |
---|
10 | text-color: red; |
---|
11 | font-family: DejaVu Sans; |
---|
12 | _match: regexp_match("n(.+)", tag("test")); |
---|
13 | text: eval(concat("Test ", get(prop("_match"),1))); |
---|
14 | } |
---|
15 | |
---|
16 | /* Anchor position */ |
---|
17 | node[test=n1] { |
---|
18 | text-anchor-horizontal: center; |
---|
19 | text-anchor-vertical: center; |
---|
20 | } |
---|
21 | |
---|
22 | node[test=n2] { |
---|
23 | text-anchor-horizontal: left; |
---|
24 | text-anchor-vertical: center; |
---|
25 | text-color: green; |
---|
26 | } |
---|
27 | |
---|
28 | node[test=n3] { |
---|
29 | text-anchor-horizontal: right; |
---|
30 | text-anchor-vertical: center; |
---|
31 | text-color: rgba(0.1, 1.0, 0.1, 0.5); |
---|
32 | } |
---|
33 | |
---|
34 | node[test=n4] { |
---|
35 | text-anchor-horizontal: center; |
---|
36 | text-anchor-vertical: top; |
---|
37 | text-color: rgba(0.1, 1.0, 0.1, 1.0); |
---|
38 | text-opacity: 0.5; |
---|
39 | } |
---|
40 | |
---|
41 | node[test=n5] { |
---|
42 | text-anchor-horizontal: center; |
---|
43 | text-anchor-vertical: bottom; |
---|
44 | text-color: rgba(0.1, 1.0, 0.1, 0.8); |
---|
45 | text-opacity: 0.8; |
---|
46 | } |
---|
47 | |
---|
48 | node[test=n6] { |
---|
49 | text-anchor-horizontal: center; |
---|
50 | text-anchor-vertical: above; |
---|
51 | } |
---|
52 | |
---|
53 | node[test=n7] { |
---|
54 | text-anchor-horizontal: center; |
---|
55 | text-anchor-vertical: below; |
---|
56 | } |
---|
57 | |
---|
58 | node[test=n8] { |
---|
59 | text-anchor-horizontal: center; |
---|
60 | text-anchor-vertical: below; |
---|
61 | text-offset-x: -10; |
---|
62 | text-offset-y: -10; |
---|
63 | } |
---|
64 | |
---|
65 | node[test=n9] { |
---|
66 | text-anchor-horizontal: left; |
---|
67 | text-anchor-vertical: top; |
---|
68 | text-offset-x: 5; |
---|
69 | text-offset: 10; /* interpreted as offset-y */ |
---|
70 | } |
---|
71 | |
---|
72 | node[test=n10] { |
---|
73 | text-offset: list(2, -6); |
---|
74 | } |
---|
75 | |
---|
76 | /* Halo */ |
---|
77 | |
---|
78 | node[test=n11] { |
---|
79 | text-halo-radius: 1; |
---|
80 | text-halo-color: green; |
---|
81 | } |
---|
82 | |
---|
83 | node[test=n12] { |
---|
84 | text-halo-radius: 5; |
---|
85 | text-halo-opacity: 0.5; |
---|
86 | } |
---|
87 | |
---|
88 | node[test=n13] { |
---|
89 | text-halo-radius: 5; |
---|
90 | text-halo-color: rgba(0, 0, 1.0, 0.4); |
---|
91 | } |
---|
92 | |
---|
93 | node[test=n14] { |
---|
94 | text-halo-radius: 5; |
---|
95 | text-halo-color: rgba(0, 0, 1.0, 0.4); |
---|
96 | text-halo-opacity: 0.5; |
---|
97 | } |
---|
98 | |
---|
99 | node[test=n15] { |
---|
100 | /* ignored */ |
---|
101 | text-halo-radius: -2; |
---|
102 | } |
---|
103 | |
---|
104 | /* Text style */ |
---|
105 | |
---|
106 | node[test=n16] { |
---|
107 | font-size: 10; |
---|
108 | font-style: italic; |
---|
109 | } |
---|
110 | |
---|
111 | node[test=n17] { |
---|
112 | font-size: 5; |
---|
113 | text-color: green; |
---|
114 | } |
---|
115 | |
---|
116 | node[test=n18] { |
---|
117 | font-size: 12; |
---|
118 | font-weight: bold; |
---|
119 | } |
---|
120 | |
---|
121 | /* 19, 20: hover/disabled */ |
---|
122 | |
---|
123 | /* Text values */ |
---|
124 | node[test=n21] { |
---|
125 | text: test; |
---|
126 | } |
---|
127 | |
---|
128 | node[test=n22] { |
---|
129 | text: unused_key; |
---|
130 | } |
---|
131 | |
---|
132 | node[test=n23] { |
---|
133 | text: auto; |
---|
134 | } |
---|
135 | |
---|
136 | node[test=n24] { |
---|
137 | text: auto; |
---|
138 | } |
---|
139 | |
---|
140 | node[test=n25] { |
---|
141 | text: auto; |
---|
142 | } |
---|