00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include "Canvas.h"
00012 #include "color.h"
00013 #include <iostream>
00014
00015 using namespace columbia;
00016
00017 int main()
00018 {
00019 try
00020 {
00021 Canvas canvas;
00022 canvas.filename = "lec11.ppm";
00023
00024 for(int row = 0; row < canvas.vReso; row++)
00025 for(int col = 0; col < canvas.hReso; col++)
00026 {
00027 canvas[row][col] = (col/32 + row/32) % 2 ? White : Black;
00028 }
00029
00030 canvas.WritePPM();
00031 }
00032 catch(char const* msg)
00033 {
00034 std :: cerr << msg << std :: endl;
00035 }
00036
00037 return 0;
00038 }