void RenderSpeed(Canvas &canvas, const PixelRect rc, const ChartLook &chart_look, const FlightStatistics &fs, const NMEAInfo &nmea_info, const DerivedInfo &derived_info, const TaskManager &task) { ChartRenderer chart(chart_look, canvas, rc); if (!fs.task_speed.HasResult() || !task.CheckOrderedTask()) { chart.DrawNoData(); return; } chart.ScaleXFromData(fs.task_speed); chart.ScaleYFromData(fs.task_speed); chart.ScaleYFromValue(0); chart.ScaleXFromValue(fs.task_speed.GetMinX()); DrawLegs(chart, task, nmea_info, derived_info, true); chart.DrawXGrid(0.5, ChartLook::STYLE_THINDASHPAPER, 0.5, true); chart.DrawYGrid(Units::ToSysTaskSpeed(10), ChartLook::STYLE_THINDASHPAPER, 10, true); chart.DrawLineGraph(fs.task_speed, ChartLook::STYLE_MEDIUMBLACK); chart.DrawTrend(fs.task_speed, ChartLook::STYLE_BLUETHIN); chart.DrawXLabel(_T("t"), _T("hr")); chart.DrawYLabel(_T("h"), Units::GetTaskSpeedName()); }
void Person::Draw(ModelviewStack* ms) { useLighting(1); setColour(1.0, 0.0, 0.0); ms->Push(); { ms->Translate(_transform.position); DrawBody(ms); //DrawNeck(ms); DrawHead(ms); DrawArms(ms); DrawLegs(ms); } ms->Pop(); }
void RenderBarograph(Canvas &canvas, const PixelRect rc, const ChartLook &chart_look, const CrossSectionLook &cross_section_look, const FlightStatistics &fs, const NMEAInfo &nmea_info, const DerivedInfo &derived_info, const ProtectedTaskManager *_task) { ChartRenderer chart(chart_look, canvas, rc); if (!fs.altitude.HasResult()) { chart.DrawNoData(); return; } chart.ScaleXFromData(fs.altitude); chart.ScaleYFromData(fs.altitude); chart.ScaleYFromValue(0); chart.ScaleXFromValue(fs.altitude.GetMinX()); if (_task != nullptr) { ProtectedTaskManager::Lease task(*_task); DrawLegs(chart, task, nmea_info, derived_info, false); } canvas.SelectNullPen(); canvas.Select(cross_section_look.terrain_brush); chart.DrawFilledLineGraph(fs.altitude_terrain); canvas.SelectWhitePen(); canvas.SelectWhiteBrush(); chart.DrawXGrid(0.5, ChartLook::STYLE_THINDASHPAPER, 0.5, true); chart.DrawYGrid(Units::ToSysAltitude(1000), ChartLook::STYLE_THINDASHPAPER, 1000, true); chart.DrawLineGraph(fs.altitude, ChartLook::STYLE_MEDIUMBLACK); chart.DrawTrend(fs.altitude_base, ChartLook::STYLE_BLUETHIN); chart.DrawTrend(fs.altitude_ceiling, ChartLook::STYLE_BLUETHIN); chart.DrawXLabel(_T("t"), _T("hr")); chart.DrawYLabel(_T("h"), Units::GetAltitudeName()); }
void RenderBarographSpark(Canvas &canvas, const PixelRect rc, const ChartLook &chart_look, const CrossSectionLook &cross_section_look, bool inverse, const FlightStatistics &fs, const NMEAInfo &nmea_info, const DerivedInfo &derived_info, const ProtectedTaskManager *_task) { ScopeLock lock(fs.mutex); ChartRenderer chart(chart_look, canvas, rc); chart.padding_bottom = 0; chart.padding_left = 0; if (!fs.altitude.HasResult()) return; chart.ScaleXFromData(fs.altitude); chart.ScaleYFromData(fs.altitude); chart.ScaleYFromValue(0); if (_task != nullptr) { ProtectedTaskManager::Lease task(*_task); canvas.SelectHollowBrush(); DrawLegs(chart, task, nmea_info, derived_info, false); } canvas.SelectNullPen(); canvas.Select(cross_section_look.terrain_brush); chart.DrawFilledLineGraph(fs.altitude_terrain); Pen pen(2, inverse ? COLOR_WHITE : COLOR_BLACK); chart.DrawLineGraph(fs.altitude, pen); }