Class: Ruby2D::Pixel

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby2d/pixel.rb

Class Method Summary collapse

Class Method Details

.draw(opts = {}) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/ruby2d/pixel.rb', line 6

def self.draw(opts = {})
  ext_draw([
    opts[:x]              , opts[:y],
    opts[:x] + opts[:size], opts[:y],
    opts[:x] + opts[:size], opts[:y] + opts[:size],
    opts[:x]              , opts[:y] + opts[:size],
    opts[:color][0], opts[:color][1], opts[:color][2], opts[:color][3]
  ])
end