void TriangleWindow::OnPaint(wxPaintEvent & event)
{
const int RADIUS = 2;
wxPaintDC(this);
if (corners == 1)
dc.DrawEllpse(x[0] - RADIUS, y[0] - RADIUS,
2 * RADIUS, 2 * RADIUS);
if (corners >= 2)
dc.DrawLine(x[0], y[0], x[1], y[1]);
if (corners >= 3)
{
dc.DrawLine(x[1], y[1], x[2], y[2]);
dc.DrawLine(x[2], y[2], x[0], y[0]);
}
}