class RayTracerChallenge::Canvas

Defined in:

ray_tracer_challenge/canvas.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(width : Int32, height : Int32, color = Color.new(0, 0, 0)) #

[View source]

Instance Method Detail

def at(x, y) #

[View source]
def each(&) #

[View source]
def each_index(&) #

[View source]
def each_with_index(&) #

[View source]
def flipped_each_index(&) #

[View source]
def flipped_each_with_index(&) #

yields |x, y, value| however, iterates the y from max down to 0

similar to each_with_index, however the y axis order is reversed.


[View source]
def height : Int32 #

[View source]
def width : Int32 #

[View source]
def write(x, y, color) #

[View source]