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