class Bitmapped::Commands::PixelFillCommand
Public Instance Methods
command_id()
click to toggle source
# File lib/bitmapped/commands/pixel_fill_command.rb, line 10 def command_id "L" end
process_command(bitmap, input)
click to toggle source
# File lib/bitmapped/commands/pixel_fill_command.rb, line 14 def process_command(bitmap, input) Validators::ValidateBitmapInitialised.parse_and_validate(bitmap) column, row, color = Validators::ValidateFillInput.parse_and_validate(input) color_command(bitmap, column, row, color) end
Private Instance Methods
color_command(bitmap, x, y, color)
click to toggle source
# File lib/bitmapped/commands/pixel_fill_command.rb, line 21 def color_command(bitmap, x, y, color) x, y = coordinates_to_array_indexes(bitmap, x, y) bitmap.pixels[y][x] = color end