comparison Samples/WebAssembly/BasicMPR.cpp @ 822:76e8224bc300

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 29 May 2019 14:19:06 +0200
parents 270c31978df1
children 467d58a59718
comparison
equal deleted inserted replaced
821:5c7b08bf84af 822:76e8224bc300
89 void Refresh() 89 void Refresh()
90 { 90 {
91 compositor_.Refresh(); 91 compositor_.Refresh();
92 } 92 }
93 93
94 void FitContent()
95 {
96 GetScene().FitContent(context_.GetCanvasWidth(), context_.GetCanvasHeight());
97 }
98
94 const std::string& GetCanvasIdentifier() const 99 const std::string& GetCanvasIdentifier() const
95 { 100 {
96 return context_.GetCanvasIdentifier(); 101 return context_.GetCanvasIdentifier();
97 } 102 }
98 103
301 306
302 for (unsigned int z = 0; z < depth; z++) 307 for (unsigned int z = 0; z < depth; z++)
303 { 308 {
304 planes_[z] = geometry.GetProjectionSlice(projection_, z); 309 planes_[z] = geometry.GetProjectionSlice(projection_, z);
305 } 310 }
311
312 Refresh();
313
314 viewport_.FitContent();
306 } 315 }
307 316
308 public: 317 public:
309 VolumeSlicerViewport(MessageBroker& broker, 318 VolumeSlicerViewport(MessageBroker& broker,
310 const std::string& canvas, 319 const std::string& canvas,
348 { 357 {
349 if (source_.get() != NULL && 358 if (source_.get() != NULL &&
350 currentPlane_ < planes_.size()) 359 currentPlane_ < planes_.size())
351 { 360 {
352 source_->Update(planes_[currentPlane_]); 361 source_->Update(planes_[currentPlane_]);
362 viewport_.Refresh();
353 } 363 }
354 } 364 }
355 }; 365 };
356 366
357 367