Method: Fox::Canvas::Shape#hit?

Defined in:
lib/fox16/canvas.rb

#hit?(xpos, ypos) ⇒ Boolean

Hit test

Returns:

  • (Boolean)


44
45
46
# File 'lib/fox16/canvas.rb', line 44

def hit?(xpos, ypos)
  (xpos >= x) && (xpos < x+width) && (ypos >= y) && (ypos < y+height)
end