Class: Rhythmmml::Figure::Bar
- Inherits:
-
Object
- Object
- Rhythmmml::Figure::Bar
- Includes:
- Base
- Defined in:
- lib/rhythmmml/figure.rb
Instance Method Summary collapse
- #draw ⇒ Object
-
#initialize(window, x1, y1, x2, y2, options = {}) ⇒ Bar
constructor
A new instance of Bar.
Constructor Details
#initialize(window, x1, y1, x2, y2, options = {}) ⇒ Bar
Returns a new instance of Bar.
16 17 18 19 20 21 22 |
# File 'lib/rhythmmml/figure.rb', line 16 def initialize(window, x1, y1, x2, y2, ={}) super(window, ) @x1 = x1 @y1 = y1 @x2 = x2 @y2 = y2 end |
Instance Method Details
#draw ⇒ Object
24 25 26 27 28 |
# File 'lib/rhythmmml/figure.rb', line 24 def draw @window.draw_line(@x1, @y1, @color, @x2, @y2, @color, @z_order) end |