Mercurial > hg > orthanc-stone
comparison Framework/Scene2DViewport/ViewportController.cpp @ 916:a911f5bb48da am-dev
MultiPlatform Basic Scene sample (so far: SDL + Qt)
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Fri, 19 Jul 2019 15:06:36 +0200 |
parents | 52b1c6ff10c5 |
children | ac88989817e3 |
comparison
equal
deleted
inserted
replaced
915:912cc77be3b4 | 916:a911f5bb48da |
---|---|
159 { | 159 { |
160 viewport_.GetScene().FitContent(canvasWidth, canvasHeight); | 160 viewport_.GetScene().FitContent(canvasWidth, canvasHeight); |
161 BroadcastMessage(SceneTransformChanged(*this)); | 161 BroadcastMessage(SceneTransformChanged(*this)); |
162 } | 162 } |
163 | 163 |
164 void ViewportController::FitContent() | |
165 { | |
166 viewport_.GetScene().FitContent(viewport_.GetCanvasWidth(), viewport_.GetCanvasHeight()); | |
167 BroadcastMessage(SceneTransformChanged(*this)); | |
168 } | |
169 | |
164 void ViewportController::AddMeasureTool(boost::shared_ptr<MeasureTool> measureTool) | 170 void ViewportController::AddMeasureTool(boost::shared_ptr<MeasureTool> measureTool) |
165 { | 171 { |
166 ORTHANC_ASSERT(std::find(measureTools_.begin(), measureTools_.end(), measureTool) | 172 ORTHANC_ASSERT(std::find(measureTools_.begin(), measureTools_.end(), measureTool) |
167 == measureTools_.end(), "Duplicate measure tool"); | 173 == measureTools_.end(), "Duplicate measure tool"); |
168 measureTools_.push_back(measureTool); | 174 measureTools_.push_back(measureTool); |