Beispiel #1
0
 void Framework::ShowRect(bool needApiPin, m2::PointD const & apiPinPoint,
                          bool needMyLoc, m2::PointD const & myLocPoint)
 {
   InitRenderPolicy(needApiPin, apiPinPoint, needMyLoc, myLocPoint);
   RenderMap();
   TeardownRenderPolicy();
 }
Beispiel #2
0
  void DrawWidget::SetMapStyle(MapStyle mapStyle)
  {
#ifndef USE_DRAPE
    if (m_framework->GetMapStyle() == mapStyle)
      return;

    makeCurrent();

    m_framework->SetRenderPolicy(nullptr);

    m_framework->SetMapStyle(mapStyle);

    // init new render policy
    InitRenderPolicy();

    m_framework->SetUpdatesEnabled(true);
#endif
  }
Beispiel #3
0
  void DrawWidget::initializeGL()
  {
    // we'll perform swap by ourselves, see issue #333
    setAutoBufferSwap(false);

    if (!m_isInitialized)
    {
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
      m_ratio = dynamic_cast<QApplication*>(qApp)->devicePixelRatio();
#endif

#ifndef USE_DRAPE
      m_videoTimer.reset(CreateVideoTimer());

      InitRenderPolicy();
#endif

      m_isInitialized = true;
    }
  }