class TilerBuilder
Public Class Methods
new(filename)
click to toggle source
Builder class for Tiler
# File lib/tiler.rb, line 20 def initialize filename @hue = 345 @image_width = 256 @image_height = 256 @ox = @image_width/2 @oy = @image_height/2 @scale = -24 @ticks = 22 @filename = filename @sat_major = 1 @sat_minor = 0.8 @projection_lambda = Complex(1.01891, 0.602565) self end
Public Instance Methods
build()
click to toggle source
# File lib/tiler.rb, line 71 def build t = Tiler.new(@image_width, @image_height, @scale, @hue, @sat_major, @sat_minor, @projection_lambda) t.tile(@ticks, @filename) end
set_hue(hue)
click to toggle source
# File lib/tiler.rb, line 40 def set_hue hue @hue = hue self end
set_image_size(width, height)
click to toggle source
# File lib/tiler.rb, line 55 def set_image_size width, height @image_width = width @image_height = height self end
set_projection_lambda(x, y)
click to toggle source
# File lib/tiler.rb, line 66 def set_projection_lambda x, y @projection_lambda = Complex(x, y) self end
set_sat_major(s)
click to toggle source
# File lib/tiler.rb, line 45 def set_sat_major s @sat_major = s self end
set_sat_minor(s)
click to toggle source
# File lib/tiler.rb, line 50 def set_sat_minor s @sat_minor = s self end
set_scale(scale)
click to toggle source
# File lib/tiler.rb, line 35 def set_scale scale @scale = scale self end
set_ticks(ticks)
click to toggle source
# File lib/tiler.rb, line 61 def set_ticks ticks @ticks = ticks self end