Method: Ruby2D::Line.draw
- Defined in:
- lib/ruby2d/line.rb
.draw(x1:, y1:, x2:, y2:, width:, color:) ⇒ Object
Draw a line without creating a Line
75 76 77 78 79 80 81 82 83 |
# File 'lib/ruby2d/line.rb', line 75 def self.draw(x1:, y1:, x2:, y2:, width:, color:) Window.render_ready_check ext_draw([ x1, y1, x2, y2, width, # splat each colour's components *color[0], *color[1], *color[2], *color[3] ]) end |