MCPcopy Create free account
hub / github.com/MITK/MITK / PrepareBottomLayout

Method PrepareBottomLayout

Modules/Annotation/src/mitkLayoutAnnotationRenderer.cpp:287–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285 }
286 }
287 void LayoutAnnotationRenderer::PrepareBottomLayout(int *displaySize)
288 {
289 double posX, posY;
290 Point2D margin;
291 posX = 0;
292 posY = 0;
293 mitk::Annotation::Bounds bounds;
294 AnnotationRankedMap &AnnotationMap = m_AnnotationContainerMap[Bottom];
295 for (auto it = AnnotationMap.cbegin(); it != AnnotationMap.cend(); ++it)
296 {
297 Annotation *Annotation = it->second;
298 margin = GetMargin2D(Annotation);
299 bounds = Annotation->GetBoundsOnDisplay(this->GetCurrentBaseRenderer());
300
301 posX = displaySize[0] / 2 - bounds.Size[0] / 2;
302 bounds.Position[0] = posX;
303 bounds.Position[1] = posY + margin[1];
304 Annotation->SetBoundsOnDisplay(this->GetCurrentBaseRenderer(), bounds);
305 posY += bounds.Size[1] + margin[1];
306 }
307 }
308 void LayoutAnnotationRenderer::PrepareBottomRightLayout(int *displaySize)
309 {
310 double posX, posY;

Callers

nothing calls this directly

Calls 3

GetBoundsOnDisplayMethod · 0.45
SetBoundsOnDisplayMethod · 0.45

Tested by

no test coverage detected