Mercurial > hg > orthanc-stone
diff Samples/Sdl/TrackerSampleApp.cpp @ 848:80829436ce0c am-mainline
starting to re-implement radiography editor with latest framework
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Thu, 13 Jun 2019 16:47:02 +0200 |
parents | e42b491f1fb2 |
children | 31319fe867b9 |
line wrap: on
line diff
--- a/Samples/Sdl/TrackerSampleApp.cpp Wed Jun 12 09:52:25 2019 +0200 +++ b/Samples/Sdl/TrackerSampleApp.cpp Thu Jun 13 16:47:02 2019 +0200 @@ -120,8 +120,8 @@ } // position the fixed info text in the upper right corner layerP->SetText(msgS.c_str()); - double cX = compositor_->GetCanvasWidth() * (-0.5); - double cY = compositor_->GetCanvasHeight() * (-0.5); + double cX = compositor_->GetWidth() * (-0.5); + double cY = compositor_->GetHeight() * (-0.5); GetScene()->GetCanvasToSceneTransform().Apply(cX,cY); layerP->SetPosition(cX, cY); } @@ -161,12 +161,12 @@ ScenePoint2D TrackerSampleApp::GetRandomPointInScene() const { - unsigned int w = compositor_->GetCanvasWidth(); - LOG(TRACE) << "compositor_->GetCanvasWidth() = " << - compositor_->GetCanvasWidth(); - unsigned int h = compositor_->GetCanvasHeight(); - LOG(TRACE) << "compositor_->GetCanvasHeight() = " << - compositor_->GetCanvasHeight(); + unsigned int w = compositor_->GetWidth(); + LOG(TRACE) << "compositor_->GetWidth() = " << + compositor_->GetWidth(); + unsigned int h = compositor_->GetHeight(); + LOG(TRACE) << "compositor_->GetHeight() = " << + compositor_->GetHeight(); if ((w >= RAND_MAX) || (h >= RAND_MAX)) LOG(WARNING) << "Canvas is too big : tools will not be randomly placed"; @@ -324,8 +324,8 @@ CreateRandomMeasureTool(); break; case SDLK_s: - controller_->FitContent(compositor_->GetCanvasWidth(), - compositor_->GetCanvasHeight()); + controller_->FitContent(compositor_->GetWidth(), + compositor_->GetHeight()); break; case SDLK_z: @@ -363,8 +363,8 @@ case SDLK_c: TakeScreenshot( "screenshot.png", - compositor_->GetCanvasWidth(), - compositor_->GetCanvasHeight()); + compositor_->GetWidth(), + compositor_->GetHeight()); break; default: @@ -394,7 +394,7 @@ case SDL_BUTTON_RIGHT: return boost::shared_ptr<IFlexiblePointerTracker>(new ZoomSceneTracker - (controller_, e, compositor_->GetCanvasHeight())); + (controller_, e, compositor_->GetHeight())); case SDL_BUTTON_LEFT: { @@ -426,7 +426,7 @@ controller_, e)); case GuiTool_Zoom: return boost::shared_ptr<IFlexiblePointerTracker>(new ZoomSceneTracker( - controller_, e, compositor_->GetCanvasHeight())); + controller_, e, compositor_->GetHeight())); //case GuiTool_AngleMeasure: // return new AngleMeasureTracker(GetScene(), e); //case GuiTool_CircleMeasure: