diff Framework/Toolbox/ViewportGeometry.h @ 109:53bd9277b025 wasm

using the Extent class
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 14 Jun 2017 15:34:08 +0200
parents c2dc924f1a63
children 7665ccbf33db
line wrap: on
line diff
--- a/Framework/Toolbox/ViewportGeometry.h	Wed Jun 14 15:13:32 2017 +0200
+++ b/Framework/Toolbox/ViewportGeometry.h	Wed Jun 14 15:34:08 2017 +0200
@@ -22,6 +22,7 @@
 #pragma once
 
 #include "../Viewport/CairoContext.h"
+#include "../Toolbox/Extent.h"
 
 namespace OrthancStone
 {
@@ -29,10 +30,7 @@
   {
   private:
     // Extent of the scene (in world units)
-    double   x1_;
-    double   y1_;
-    double   x2_;
-    double   y2_;
+    Extent   sceneExtent_;
 
     // Size of the display (in pixels)
     unsigned int  width_;
@@ -53,15 +51,12 @@
     void SetDisplaySize(unsigned int width,
                         unsigned int height);
 
-    void SetSceneExtent(double x1,
-                        double y1,
-                        double x2,
-                        double y2);
+    void SetSceneExtent(const Extent& extent);
 
-    void GetSceneExtent(double& x1,
-                        double& y1,
-                        double& x2,
-                        double& y2) const;
+    const Extent& GetSceneExtent() const
+    {
+      return sceneExtent_;
+    }
 
     void MapDisplayToScene(double& sceneX /* out */,
                            double& sceneY /* out */,