class Rhythmmml::Figure::Bar

Public Class Methods

new(window, x1, y1, x2, y2, options={}) click to toggle source
Calls superclass method Rhythmmml::Figure::Base::new
# 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

Public Instance Methods

draw() click to toggle source
# File lib/rhythmmml/figure.rb, line 24
def draw
  @window.draw_line(@x1, @y1, @color,
                    @x2, @y2, @color,
                    @z_order)
end