Class: RubySketch::Circle

Inherits:
Shape
  • Object
show all
Defined in:
lib/rubysketch/shape.rb

Overview

Circle shape object.

Instance Method Summary collapse

Methods inherited from Shape

#contact, #contact_end, #height, #sensor=, #sensor?, #width

Constructor Details

#initialize(x, y, size) ⇒ Circle

Initialize circle object.

Parameters:

  • x (Numeric)

    x of the circle shape position

  • y (Numeric)

    y of the circle shape position

  • size (Numeric)

    width and height of the circle shape



107
108
109
# File 'lib/rubysketch/shape.rb', line 107

def initialize(x, y, size)
  super Reflex::EllipseShape.new(frame: [x, y, size, size])
end