Exemplo n.º 1
0
void MouseHandler::AddVertex(Point2D & p)
{
	Window* window = Window::Create();
	window->vertexes->push_back(p);
	DrawEvent* draw = new DrawEvent();
	draw->add(1, &p);
	window->AddNext(draw);
	delete draw;
	draw = NULL;
}
Exemplo n.º 2
0
void MouseHandler::ReadVertexesFromFile()
{
	Window* window = Window::Create();
	if (window->vertexes != NULL)
	{
		if (!window->vertexes->empty()) window->vertexes->clear();
		delete window->vertexes;
		window->vertexes = NULL;
	}
	window->clear();
	window->vertexes = Helper::ReadPoints("Resources/Input Data.txt");
	DrawEvent* draw = new DrawEvent();
	draw->add(window->vertexes);
	window->AddNext(draw);
	delete draw;
	draw = NULL;
}