class Vissen::Output::Pixel
The `Pixel` object is used by the `PixelBuffer` to store the colors of its points.
TODO: How do we want the pixel to saturate? When written or when read?
Public Instance Methods
clear!()
click to toggle source
Reset the pixel color to black (0, 0, 0).
@return [self]
# File lib/vissen/output/pixel.rb, line 13 def clear! self.r = 0 self.g = 0 self.b = 0 self end
inspect()
click to toggle source
@return [String] a string representation of the pixel.
# File lib/vissen/output/pixel.rb, line 21 def inspect format '(%.1f, %.1f, %.1f)', r, g, b end