Sha256: 15a823f03ee31c2ae25d61c7e861f2d389fa3a4735ae3810e8e19837e7f30113
Contents?: true
Size: 408 Bytes
Versions: 2
Compression:
Stored size: 408 Bytes
Contents
# frozen_string_literal: true # Ruby2D::Pixel module Ruby2D # Draw a single pixel by calling +Pixel.draw(...)+ class Pixel def self.draw(x:, y:, size:, color:) color = color.to_a if color.is_a? Color ext_draw([x, y, x + size, y, x + size, y + size, x, y + size, color[0], color[1], color[2], color[3]]) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ruby2d-0.12.1 | lib/ruby2d/pixel.rb |
ruby2d-0.12.0 | lib/ruby2d/pixel.rb |