void GlueMapWindow::Render(Canvas &canvas, const PixelRect &rc) { MapWindow::Render(canvas, rc); if (IsNearSelf()) { draw_sw.Mark("DrawGlueMisc"); if (GetMapSettings().show_thermal_profile) DrawThermalBand(canvas, rc); DrawStallRatio(canvas, rc); DrawFlightMode(canvas, rc); DrawFinalGlide(canvas, rc); DrawVario(canvas, rc); DrawGPSStatus(canvas, rc, Basic()); } }
/** * Renders the upper symbology (compass, map scale, flight mode icon, * thermal band, final glide bar and gps status) * @param canvas The drawing canvas * @param rc The area to draw in */ void MapWindow::RenderSymbology_upper(Canvas &canvas, const RECT &rc) { const NMEA_INFO &data = Basic(); // overlays DrawCDI(); canvas.select(Fonts::Map); DrawMapScale(canvas, rc); DrawMapScale2(canvas, rc); DrawCompass(canvas, rc); // JMW Experimental only! EXPERIMENTAL #if 0 if (EnableAuxiliaryInfo) DrawHorizon(canvas, rc); #endif DrawFlightMode(canvas, rc); DrawThermalBand(canvas, rc); DrawFinalGlide(canvas,rc); DrawGPSStatus(canvas, rc, data.gps); }
// // CALLED BY THE DRAW_THREAD MAIN LOOP // void MapWindow::RenderMapWindow(RECT rc) { // First of all we set the flag for DrawBottom. This is critical. if (NOTANYPAN) DrawBottom=true; else DrawBottom=false; static DWORD fastzoomStart=0; // static short ZoomDelayTimes=0; // alternate rebouncing, with the lowest possible interval: 1 loop // We do this in order to wait for a late zoom request after another. // Did we get a BigZoom request? FastZoom=zoom.BigZoom(); if (FastZoom) { zoom.BigZoom(false); // How many times we shall loop waiting for a next bigzoom to come // ZoomDelayTimes=1; shortest possible fastzoomStart=GetTickCount(); // time granted delay } else { if (fastzoomStart) { // no bigzoom, but we wait a bit to detect another click for zoom // and avoid to redraw entirely in the meantime. We shall fall down here // because we have forced a map redraw after the first zoom, even with not // a click pressed. //if (ZoomDelayTimes >0) { // ZoomDelayTimes--; if ( (GetTickCount()-fastzoomStart) <(unsigned int)debounceTimeout ) { #if (WINDOWSPC>0) #if TESTBENCH FastZoom=true; #endif #else FastZoom=true; #endif // return; } else { fastzoomStart=0; } } } MapWindow::UpdateTimeStats(true); if (LockModeStatus) LockMode(9); // check if unlock is now possible POINT Orig, Orig_Aircraft; SetAutoOrientation(false); // false for no reset Old values CalculateOrigin(rc, &Orig); // // When BigZoom trigger, we shall not calculate waypoints and olc. // if (!QUICKDRAW) { // // this is calculating waypoint visible, and must be executed before rendermapwindowbg which calls // CalculateWayPointReachable new, setting values for visible wps! // This is also calculating CalculateScreenBounds 0.0 and placing it inside MapWindow::screenbounds_latlon // CalculateScreenPositions(Orig, rc, &Orig_Aircraft); LKUpdateOlc(); } else { CalculateScreenPositions(Orig, rc, &Orig_Aircraft); FastZoom=true; } RenderMapWindowBg(hdcDrawWindow, rc, Orig, Orig_Aircraft); // No reason to check for bigzoom here, because we are not drawing the map if (DONTDRAWTHEMAP) { DrawFlightMode(hdcDrawWindow, rc); DrawGPSStatus(hdcDrawWindow, rc); DrawFunctions1HZ(hdcDrawWindow,rc); return; } // Logger indicator, flight indicator, battery indicator // Not while panning if (!INPAN) DrawFlightMode(hdcDrawWindow, rc); // // When fast zoom requested, do not loose time with frills // if (QUICKDRAW) { // do a mapdirty and rerun the loop MapWindow::RefreshMap(); return; } // GPS FIX warnings DrawGPSStatus(hdcDrawWindow, rc); // Alarms &C. DrawFunctions1HZ(hdcDrawWindow,rc); }