astromapper 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/astromapper/svg.rb +84 -12
- data/lib/astromapper/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5273245b8abdf862d99dd54fdfd64e35d96ff1f2
|
4
|
+
data.tar.gz: 5dbe72dbc3c3af5ee68adb9707379267ae91906e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6ce1000f285d0af740dbd56ebb28fcbf4f84075e6b644c1fd11bebf32c00996930ef7fb67a9189bdbe5c431d3603524fb4da911af63940317c097097c38fa1c
|
7
|
+
data.tar.gz: b474772f11906d013f6466e3db164966f39df072971779bb4836a16a27725a05937fd423905810ac9b5ee168a2000643cd87f4ea4e861dda438ac9a3b6e163ea
|
data/lib/astromapper/svg.rb
CHANGED
@@ -71,24 +71,44 @@ module Astromapper
|
|
71
71
|
:side_w => (@side / 2).tweak,
|
72
72
|
:width => @side
|
73
73
|
}
|
74
|
+
# @style = {
|
75
|
+
# :circle => "fill='#{@color[:black]}' stroke='#{@color[:white]}' stroke-width='1'",
|
76
|
+
# :polyline => "fill='none'",
|
77
|
+
# :polygon => "fill='#{@color[:black]}' stroke='none' stroke-width='1'",
|
78
|
+
# :ellipse => "fill='none' stroke='#{@color[:base02]}' stroke-width='1'",
|
79
|
+
# :Belt => "stroke='#{@color[:white]}' stroke-width='1'",
|
80
|
+
# :AZ_zone => "fill='none' stroke='#{@color[:zone]['AZ']}' stroke-width='3' stroke-dasharray='5%,5%'",
|
81
|
+
# :RZ_zone => "fill='none' stroke='#{@color[:zone]['RZ']}' stroke-width='3'",
|
82
|
+
# :Planet => "fill='#{@color[:black]}' stroke='#{@color[:black]}' stroke-width='1'",
|
83
|
+
# :Desert => "fill='none' stroke='#{@color[:black]}' stroke-width='2'",
|
84
|
+
# :Frame => "fill='none' stroke='#{@color[:black]}' stroke-width='4'",
|
85
|
+
# :Tract => "fill='none' stroke='#{@color[:hex]}' stroke-width='1'",
|
86
|
+
# :Hexgrid => "fill='none' stroke='#{@color[:hex]}' stroke-width='1'",
|
87
|
+
# :Name => "text-anchor='middle' font-size='#{@side/5}px' fill='#{@color[:world_text]}' font-family='Verdana'",
|
88
|
+
# :symbol => "text-anchor='middle' font-size='#{@side/2.5}px' fill='#{@color[:black]}' font-family='Verdana'",
|
89
|
+
# :Spaceport => "text-anchor='middle' font-size='#{@side/3}px' fill='#{@color[:world_text]}' font-family='Verdana'",
|
90
|
+
# :TractID => "text-anchor='middle' font-size='#{@side*3}px' fill='#{@color[:tract_id]}' font-family='Verdana'",
|
91
|
+
# :VolumeId => "text-anchor='middle' font-size='#{@side/5}px' fill='#{@color[:hex_id]}' font-family='Verdana'",
|
92
|
+
# :rect => "fill='#{@color[:background]}'"
|
93
|
+
# }
|
74
94
|
@style = {
|
75
95
|
:circle => "fill='#{@color[:black]}' stroke='#{@color[:white]}' stroke-width='1'",
|
76
96
|
:polyline => "fill='none'",
|
77
97
|
:polygon => "fill='#{@color[:black]}' stroke='none' stroke-width='1'",
|
78
98
|
:ellipse => "fill='none' stroke='#{@color[:base02]}' stroke-width='1'",
|
79
99
|
:Belt => "stroke='#{@color[:white]}' stroke-width='1'",
|
80
|
-
:AZ_zone => "
|
81
|
-
:RZ_zone => "
|
82
|
-
:Planet => "
|
83
|
-
:Desert => "
|
84
|
-
:Frame => "
|
85
|
-
:Tract => "
|
86
|
-
:Hexgrid => "
|
87
|
-
:Name => "
|
88
|
-
:symbol => "
|
89
|
-
:Spaceport => "
|
90
|
-
:TractID => "
|
91
|
-
:VolumeId => "
|
100
|
+
:AZ_zone => "class='lowsec'",
|
101
|
+
:RZ_zone => "class='lowsec'",
|
102
|
+
:Planet => "",
|
103
|
+
:Desert => "",
|
104
|
+
:Frame => "",
|
105
|
+
:Tract => "",
|
106
|
+
:Hexgrid => "",
|
107
|
+
:Name => "",
|
108
|
+
:symbol => "",
|
109
|
+
:Spaceport => "",
|
110
|
+
:TractID => "",
|
111
|
+
:VolumeId => "",
|
92
112
|
:rect => "fill='#{@color[:background]}'"
|
93
113
|
}
|
94
114
|
@style[:UWP] = @style[:Name]
|
@@ -119,6 +139,58 @@ module Astromapper
|
|
119
139
|
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
120
140
|
<svg width="#{@width}px" height="#{@height}px" version="1.1" xmlns="http://www.w3.org/2000/svg" blackground-color='#{@color[:white]}'>
|
121
141
|
<desc>Subsector Map Grid</desc>
|
142
|
+
<style>
|
143
|
+
text {
|
144
|
+
text-anchor: middle;
|
145
|
+
fill: #567;
|
146
|
+
font: 8px sans-serif;
|
147
|
+
}
|
148
|
+
text.subsector-name {
|
149
|
+
text-anchor: left;
|
150
|
+
fill: #eed;
|
151
|
+
font: 120px sans-serif;
|
152
|
+
}
|
153
|
+
text.sector-name {
|
154
|
+
font-size: 13px;
|
155
|
+
}
|
156
|
+
text.scout {
|
157
|
+
font-size: 14px;
|
158
|
+
fill: #222;
|
159
|
+
}
|
160
|
+
g.coordinates text {
|
161
|
+
fill: #DDD;
|
162
|
+
}
|
163
|
+
polyline {
|
164
|
+
fill: none;
|
165
|
+
stroke: #9AA;
|
166
|
+
stroke: #DDD;
|
167
|
+
stroke-width: 1;
|
168
|
+
}
|
169
|
+
g.gas-giant {
|
170
|
+
stroke: #034;
|
171
|
+
}
|
172
|
+
g.gas-giant circle {
|
173
|
+
fill: #034;
|
174
|
+
stroke: #034;
|
175
|
+
stroke-width:1;
|
176
|
+
}
|
177
|
+
g.gas-giant ellipse {
|
178
|
+
fill: #034;
|
179
|
+
fill: none;
|
180
|
+
stroke-width: 1;
|
181
|
+
}
|
182
|
+
circle {
|
183
|
+
fill: #222;
|
184
|
+
stroke: #fff;
|
185
|
+
stroke-width: 1;
|
186
|
+
}
|
187
|
+
.lowsec {
|
188
|
+
fill: none;
|
189
|
+
stroke: #B90;
|
190
|
+
stroke-width: 3;
|
191
|
+
stroke-dasharray: 3,6;
|
192
|
+
}
|
193
|
+
</style>
|
122
194
|
<rect #{@style[:rect]} width='#{@width}' height='#{@height}' />
|
123
195
|
EOS
|
124
196
|
end
|
data/lib/astromapper/version.rb
CHANGED