MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / renderWeatherOverlay

Method renderWeatherOverlay

app/src/UI/Widgets/GPS.cpp:718–732  ·  view source on GitHub ↗

* @brief Draws the NASA GIBS weather overlay tile if available in the cache. */

Source from the content-addressed store, hash-verified

716 * @brief Draws the NASA GIBS weather overlay tile if available in the cache.
717 */
718void Widgets::GPS::renderWeatherOverlay(
719 QPainter* painter, int wrappedTx, int ty, int baseZoom, const QRect& targetRect)
720{
721 if (!m_showNasaWeather || baseZoom > WEATHER_GIBS_MAX_ZOOM)
722 return;
723
724 const QString gibsUrl = nasaWeatherUrl(wrappedTx, ty, baseZoom);
725 if (!s_tileCache.contains(gibsUrl))
726 return;
727
728 painter->save();
729 painter->setCompositionMode(QPainter::CompositionMode_Screen);
730 painter->drawImage(targetRect, *s_tileCache.object(gibsUrl));
731 painter->restore();
732}
733
734/**
735 * @brief Draws the reference layer tile on top of the base tile.

Callers

nothing calls this directly

Calls 4

saveMethod · 0.80
drawImageMethod · 0.80
containsMethod · 0.45
restoreMethod · 0.45

Tested by

no test coverage detected