comparison Framework/Radiography/RadiographyLayer.cpp @ 1336:379c00958553 broker

integration mainline->broker
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 31 Mar 2020 15:51:02 +0200
parents 7ec8fea061b9 a72c2c9af49a
children
comparison
equal deleted inserted replaced
1334:04055b6b9e2c 1336:379c00958553
235 { 235 {
236 BroadcastMessage(RadiographyLayer::LayerEditedMessage(*this)); 236 BroadcastMessage(RadiographyLayer::LayerEditedMessage(*this));
237 } 237 }
238 } 238 }
239 239
240 240 Extent2D RadiographyLayer::GetSceneExtent(bool /*minimal*/) const
241 Extent2D RadiographyLayer::GetExtent() const
242 { 241 {
243 Extent2D extent; 242 Extent2D extent;
244 243
245 unsigned int x, y, width, height; 244 unsigned int x, y, width, height;
246 GetCrop(x, y, width, height); 245 GetCrop(x, y, width, height);
248 double dx = static_cast<double>(x); 247 double dx = static_cast<double>(x);
249 double dy = static_cast<double>(y); 248 double dy = static_cast<double>(y);
250 double dwidth = static_cast<double>(width); 249 double dwidth = static_cast<double>(width);
251 double dheight = static_cast<double>(height); 250 double dheight = static_cast<double>(height);
252 251
252 // AddToExtent transforms the coordinates from image to scene
253 AddToExtent(extent, dx, dy); 253 AddToExtent(extent, dx, dy);
254 AddToExtent(extent, dx + dwidth, dy); 254 AddToExtent(extent, dx + dwidth, dy);
255 AddToExtent(extent, dx, dy + dheight); 255 AddToExtent(extent, dx, dy + dheight);
256 AddToExtent(extent, dx + dwidth, dy + dheight); 256 AddToExtent(extent, dx + dwidth, dy + dheight);
257 257