class CooCoo::Image::Clipper
Public Class Methods
new(width, height)
click to toggle source
# File lib/coo-coo/image.rb, line 162 def initialize(width, height) @width = width @height = height end
Public Instance Methods
call(pixel, x, y)
click to toggle source
# File lib/coo-coo/image.rb, line 167 def call(pixel, x, y) if x < 0 || x >= @width || y < 0 || y >= @height Array.new(pixel.size, 0.0) else pixel end end