class CooCoo::Image::Scale

Public Class Methods

new(sx, sy) click to toggle source
Calls superclass method
# File lib/coo-coo/image.rb, line 189
def initialize(sx, sy)
  super()
  @sx = sx
  @sy = sy || sx
end

Public Instance Methods

call(x, y) click to toggle source
# File lib/coo-coo/image.rb, line 195
def call(x, y)
  [ (x / @sx).floor, (y / @sy).floor ]
end