Mercurial > hg > orthanc-stone
diff Samples/Sdl/TrackerSampleApp.cpp @ 882:31319fe867b9 am-dev
Merge
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Tue, 09 Jul 2019 11:46:43 +0200 |
parents | 4bc8d9609447 80829436ce0c |
children | 6e79e8c9021c |
line wrap: on
line diff
--- a/Samples/Sdl/TrackerSampleApp.cpp Tue Jul 09 11:41:16 2019 +0200 +++ b/Samples/Sdl/TrackerSampleApp.cpp Tue Jul 09 11:46:43 2019 +0200 @@ -121,8 +121,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); } @@ -162,12 +162,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"; @@ -351,8 +351,8 @@ CreateRandomMeasureTool(); break; case SDLK_s: - controller_->FitContent(compositor_->GetCanvasWidth(), - compositor_->GetCanvasHeight()); + controller_->FitContent(compositor_->GetWidth(), + compositor_->GetHeight()); break; case SDLK_z: @@ -390,8 +390,8 @@ case SDLK_c: TakeScreenshot( "screenshot.png", - compositor_->GetCanvasWidth(), - compositor_->GetCanvasHeight()); + compositor_->GetWidth(), + compositor_->GetHeight()); break; default: @@ -421,7 +421,7 @@ case SDL_BUTTON_RIGHT: return boost::shared_ptr<IFlexiblePointerTracker>(new ZoomSceneTracker - (controller_, e, compositor_->GetCanvasHeight())); + (controller_, e, compositor_->GetHeight())); case SDL_BUTTON_LEFT: { @@ -453,7 +453,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: