diff Samples/Shared/RadiographyEditorApp.cpp @ 889:6e79e8c9021c am-dev

integration mainline->am-dev
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 10 Jul 2019 12:05:02 +0200
parents 56e4e9281076
children
line wrap: on
line diff
--- a/Samples/Shared/RadiographyEditorApp.cpp	Wed Jul 10 11:29:53 2019 +0200
+++ b/Samples/Shared/RadiographyEditorApp.cpp	Wed Jul 10 12:05:02 2019 +0200
@@ -121,8 +121,8 @@
     }
     // position the fixed info text in the upper right corner
     layerP->SetText(msgS.c_str());
-    double cX = compositor_->GetWidth() * (-0.5);
-    double cY = compositor_->GetHeight() * (-0.5);
+    double cX = compositor_->GetCanvasWidth() * (-0.5);
+    double cY = compositor_->GetCanvasHeight() * (-0.5);
     GetScene()->GetCanvasToSceneTransform().Apply(cX,cY);
     layerP->SetPosition(cX, cY);
   }
@@ -162,12 +162,12 @@
 
   ScenePoint2D RadiographyEditorApp::GetRandomPointInScene() const
   {
-    unsigned int w = compositor_->GetWidth();
-    LOG(TRACE) << "compositor_->GetWidth() = " <<
-                  compositor_->GetWidth();
-    unsigned int h = compositor_->GetHeight();
-    LOG(TRACE) << "compositor_->GetHeight() = " <<
-                  compositor_->GetHeight();
+    unsigned int w = compositor_->GetCanvasWidth();
+    LOG(TRACE) << "compositor_->GetCanvasWidth() = " <<
+                  compositor_->GetCanvasWidth();
+    unsigned int h = compositor_->GetCanvasHeight();
+    LOG(TRACE) << "compositor_->GetCanvasHeight() = " <<
+                  compositor_->GetCanvasHeight();
 
     if ((w >= RAND_MAX) || (h >= RAND_MAX))
       LOG(WARNING) << "Canvas is too big : tools will not be randomly placed";
@@ -287,8 +287,8 @@
       CreateRandomMeasureTool();
       break;
     case 's':
-      controller_->FitContent(compositor_->GetWidth(),
-                              compositor_->GetHeight());
+      controller_->FitContent(compositor_->GetCanvasWidth(),
+                              compositor_->GetCanvasHeight());
       break;
     case 'z':
       LOG(TRACE) << "z has been pressed. modifier = " << modifiers;
@@ -325,8 +325,8 @@
     case 'c':
       TakeScreenshot(
             "screenshot.png",
-            compositor_->GetWidth(),
-            compositor_->GetHeight());
+            compositor_->GetCanvasWidth(),
+            compositor_->GetCanvasHeight());
       break;
 
     }
@@ -471,8 +471,8 @@
         CreateRandomMeasureTool();
         break;
       case SDLK_s:
-        controller_->FitContent(compositor_->GetWidth(),
-                                compositor_->GetHeight());
+        controller_->FitContent(compositor_->GetCanvasWidth(),
+                                compositor_->GetCanvasHeight());
         break;
 
       case SDLK_z:
@@ -510,8 +510,8 @@
       case SDLK_c:
         TakeScreenshot(
               "screenshot.png",
-              compositor_->GetWidth(),
-              compositor_->GetHeight());
+              compositor_->GetCanvasWidth(),
+              compositor_->GetCanvasHeight());
         break;
 
       default:
@@ -541,7 +541,7 @@
 
     case OrthancStone::MouseButton_Right:
       return boost::shared_ptr<IFlexiblePointerTracker>(new ZoomSceneTracker
-                                                        (controller_, e, compositor_->GetHeight()));
+                                                        (controller_, e, compositor_->GetCanvasHeight()));
 
     case OrthancStone::MouseButton_Left:
     {
@@ -573,7 +573,7 @@
                                                               controller_, e));
         case GuiTool_Zoom:
           return boost::shared_ptr<IFlexiblePointerTracker>(new ZoomSceneTracker(
-                                                              controller_, e, compositor_->GetHeight()));
+                                                              controller_, e, compositor_->GetCanvasHeight()));
           //case GuiTool_AngleMeasure:
           //  return new AngleMeasureTracker(GetScene(), e);
           //case GuiTool_CircleMeasure: