Rect bounds(0,0,1,1);
Colour c(0,0,0,1);
- const char * output_to_bmp = NULL;
+ const char * input_bmp = NULL;
+ const char * output_bmp = NULL;
const char * input_filename = NULL;
int i = 0;
case 'o':
mode = OUTPUT_TO_BMP;
if (++i >= argc)
- Fatal("No argument following -o switch");
- output_to_bmp = argv[i];
+ Fatal("No input argument following -o switch");
+ input_bmp = argv[i];
+ if (++i >= argc)
+ Fatal("No output argument following -o switch");
+ output_bmp = argv[i];
+
break;
case 'c':
{
{
doc.Load(input_filename);
}
- else
+ else
{
doc.Add(RECT_FILLED, Rect(0.2,0.2,0.6,0.6));
}
if (mode == LOOP)
MainLoop(doc, bounds, c);
else if (mode == OUTPUT_TO_BMP)
- OverlayBMP(doc, output_to_bmp, bounds, c);
+ OverlayBMP(doc, input_bmp, output_bmp, bounds, c);
return 0;
}