Method: Astromapper::Svg#volumes
- Defined in:
- lib/astromapper/svg.rb
#volumes ⇒ Object
296 297 298 299 300 301 302 303 304 305 306 |
# File 'lib/astromapper/svg.rb', line 296 def volumes output = "<g class='volumes'>" (@rows+2).times do |r| (@columns+1).times do |c| x = @side + ((c-1) * @side * 1.5) y = (c % 2 == 1) ? (r-1) * @side * @factor + (0.2 * @side) : (r-1) * @side * @factor + @hex[:side_h]+ (0.2 * @side) output += "<text x='#{x.to_i}' y='#{y.to_i}'>%02d%02d</text>\n" % [c,r] end end output += "</g>" end |