void TaskPointRenderer::Draw(const TaskPoint &tp, Layer layer) { const OrderedTaskPoint &otp = (const OrderedTaskPoint &)tp; const AATPoint &atp = (const AATPoint &)tp; switch (tp.GetType()) { case TaskPointType::UNORDERED: if (layer == LAYER_LEG && location.IsValid()) DrawTaskLine(location, tp.GetLocationRemaining()); if (layer == LAYER_SYMBOLS) DrawBearing(tp); index++; break; case TaskPointType::START: index = 0; DrawOrdered(otp, layer); if (layer == LAYER_SYMBOLS) { DrawBearing(tp); DrawTarget(tp); } break; case TaskPointType::AST: index++; DrawOrdered(otp, layer); if (layer == LAYER_SYMBOLS) { DrawBearing(tp); DrawTarget(tp); } break; case TaskPointType::AAT: index++; DrawOrdered(otp, layer); if (layer == LAYER_SYMBOLS) { DrawIsoline(atp); DrawBearing(tp); DrawTarget(tp); } break; case TaskPointType::FINISH: index++; DrawOrdered(otp, layer); if (layer == LAYER_SYMBOLS) { DrawBearing(tp); DrawTarget(tp); } break; } }
void TaskPointRenderer::DrawBearing(const TaskPoint &tp) { if (!location_available || !draw_bearing || !PointCurrent()) return; canvas.Select(task_look.bearing_pen); map_canvas.DrawLineWithOffset(location, tp.GetLocationRemaining()); }
void RenderTaskPoint::DrawBearing(const TaskPoint &tp) { if (!draw_bearing || !PointCurrent()) return; canvas.Select(task_look.bearing_pen); map_canvas.offset_line(location, tp.GetLocationRemaining()); }
void TaskPointRenderer::DrawTarget(const TaskPoint &tp) { if (!IsTargetVisible(tp)) return; RasterPoint sc; if (m_proj.GeoToScreenIfVisible(tp.GetLocationRemaining(), sc)) task_look.target_icon.Draw(canvas, sc.x, sc.y); }
void RenderTaskPoint::Draw(const TaskPoint &tp, Layer layer) { const OrderedTaskPoint &otp = (const OrderedTaskPoint &)tp; const AATPoint &atp = (const AATPoint &)tp; switch (tp.GetType()) { case TaskPoint::UNORDERED: if (layer == LAYER_LEG) DrawTaskLine(location, tp.GetLocationRemaining()); if (layer == LAYER_SYMBOLS) DrawBearing(tp); index++; break; case TaskPoint::START: index = 0; DrawOrdered(otp, layer); if (layer == LAYER_SYMBOLS) { DrawBearing(tp); DrawTarget(tp); } break; case TaskPoint::AST: index++; DrawOrdered(otp, layer); if (layer == LAYER_SYMBOLS) { DrawBearing(tp); DrawTarget(tp); } break; case TaskPoint::AAT: index++; DrawOrdered(otp, layer); if (layer == LAYER_SYMBOLS) { DrawIsoline(atp); DrawBearing(tp); DrawTarget(tp); } break; case TaskPoint::FINISH: index++; DrawOrdered(otp, layer); if (layer == LAYER_SYMBOLS) { DrawBearing(tp); DrawTarget(tp); } break; case TaskPoint::ROUTE: /* unreachable */ assert(false); break; } }