12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- #include "stdafx.h"
- #include <iostream>
- #include "img.h"
- #include "graphmap.h"
- using namespace std;
- int main()
- {
- BMP img;
- cout << "Start read...";
- img.read("test29.bmp");
-
- cout << "End." << endl;
- cout << "Building tree...";
- Graph map(img);
- cout << "End." << endl;
- try
- {
- cout << "Drowing roud...";
- map.calcdijkstra(Position(220, 220));
- BMP out = map.drowRoad(Position(860, 860));
- out.write("output30.bmp");
- cout << "End." << endl;
- }
- catch (char* error)
- {
- cout << error <<endl;
- }
- system("pause");
-
-
- cout << "End." << endl;
-
- return 0;
- }
|