Class: Ra::Pixel
- Inherits:
-
Object
- Object
- Ra::Pixel
- Defined in:
- lib/ra/pixel.rb
Overview
A pixel is a point in an image. It pairs the coordinates (x,y) with the color for that point.
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(x:, y:, color:) ⇒ Pixel
constructor
A new instance of Pixel.
Constructor Details
#initialize(x:, y:, color:) ⇒ Pixel
Returns a new instance of Pixel.
21 22 23 24 25 |
# File 'lib/ra/pixel.rb', line 21 def initialize(x:, y:, color:) @x = x @y = y @color = color end |
Instance Attribute Details
#x ⇒ Integer
8 9 10 |
# File 'lib/ra/pixel.rb', line 8 def x @x end |
#y ⇒ Integer
12 13 14 |
# File 'lib/ra/pixel.rb', line 12 def y @y end |