void OZWindow::OnPaint(Canvas &canvas) { canvas.ClearWhite(); if (oz == NULL) return; const int offset = 0; roz.Draw(canvas, OZRenderer::LAYER_SHADE, projection, *oz, offset); roz.Draw(canvas, OZRenderer::LAYER_INACTIVE, projection, *oz, offset); roz.Draw(canvas, OZRenderer::LAYER_ACTIVE, projection, *oz, offset); }
void OZWindow::OnPaint(Canvas &canvas) { canvas.ClearWhite(); if (oz == NULL) return; const int offset = 0; roz.Draw(canvas, OZRenderer::LAYER_SHADE, projection, *oz, offset); roz.Draw(canvas, OZRenderer::LAYER_INACTIVE, projection, *oz, offset); roz.Draw(canvas, OZRenderer::LAYER_ACTIVE, projection, *oz, offset); /* debugging for ObservationZone::GetBoundary() */ Pen pen(1, COLOR_RED); canvas.Select(pen); const OZBoundary boundary = oz->GetBoundary(); for (auto i = boundary.begin(), end = boundary.end(); i != end; ++i) { RasterPoint p = projection.GeoToScreen(*i); canvas.DrawLine(p.x - 3, p.y - 3, p.x + 3, p.y + 3); canvas.DrawLine(p.x + 3, p.y - 3, p.x - 3, p.y + 3); } }