#!ruby -Ks
require 'phi'
form = Phi::Form.new
button = Phi::Button.new form
button.on_click = proc{
  bitmap = Phi::Bitmap.new
  bitmap.load('D:\Borland\Shared\Images\Splash\256color\factory.bmp');
  bitmap.height.times{|y|
    str = bitmap.scan_line[y]
    bitmap.width.times{|x|
      str[x] = y
    }
    bitmap.scan_line[y] = str
  }
  form.canvas.draw(0,0,bitmap);
}
form.show
Phi.mainloop