Class: Rubygame::Surface

Inherits:
Object
  • Object
show all
Defined in:
lib/rubygame-util/gfx.rb

Instance Method Summary collapse

Instance Method Details

#draw_path(path, color) ⇒ Object



4
5
6
7
8
# File 'lib/rubygame-util/gfx.rb', line 4

def draw_path(path, color)
  (0..path.size - 2).each do |index|
    _draw_line path.to_a[index], path.to_a[index + 1], color, false
  end
end

#draw_path_a(path, color) ⇒ Object



10
11
12
13
14
# File 'lib/rubygame-util/gfx.rb', line 10

def draw_path_a(path, color)
  (0..path.size - 2).each do |index|
    _draw_line path.to_a[index], path.to_a[index + 1], color, true
  end
end