diff Framework/Viewport/ViewportBase.h @ 1053:32b403a47b19

simplifying IViewport
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 10 Oct 2019 15:24:48 +0200
parents 6a9300ecfa13
children af456106576c
line wrap: on
line diff
--- a/Framework/Viewport/ViewportBase.h	Thu Oct 10 14:37:23 2019 +0200
+++ b/Framework/Viewport/ViewportBase.h	Thu Oct 10 15:24:48 2019 +0200
@@ -28,6 +28,10 @@
 {
   class ViewportBase : public IViewport
   {
+  private:
+    std::string                 identifier_;
+    boost::shared_ptr<Scene2D>  scene_;
+
   public:
     ViewportBase(const std::string& identifier);
 
@@ -44,36 +48,6 @@
       return identifier_;
     }
 
-    virtual ScenePoint2D GetPixelCenterCoordinates(int x, int y) const ORTHANC_OVERRIDE;
-
-    virtual unsigned int GetCanvasWidth() const ORTHANC_OVERRIDE
-    {
-      if (GetCompositor())
-        return GetCompositor()->GetCanvasWidth();
-      else
-        return 0;
-    }
-
-    virtual unsigned int GetCanvasHeight() const ORTHANC_OVERRIDE
-    {
-      if (GetCompositor())
-        return GetCompositor()->GetCanvasHeight();
-      else
-        return 0;
-    }
-
-#if ORTHANC_ENABLE_LOCALE == 1
-    virtual void SetFont(size_t index,
-      Orthanc::EmbeddedResources::FileResourceId resource,
-      unsigned int fontSize,
-      Orthanc::Encoding codepage) ORTHANC_OVERRIDE
-    {
-      return GetCompositor()->SetFont(index, resource, fontSize, codepage);
-    }
-#endif
-
-  private:
-    std::string                 identifier_;
-    boost::shared_ptr<Scene2D>  scene_;
+    virtual ScenePoint2D GetPixelCenterCoordinates(int x, int y) ORTHANC_OVERRIDE;
   };
 }