Class: Rhythmmml::Figure::Bar

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/rhythmmml/figure.rb

Instance Method Summary collapse

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, options={})
  super(window, options)
  @x1 = x1
  @y1 = y1
  @x2 = x2
  @y2 = y2
end

Instance Method Details

#drawObject



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