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

Method PrepareBottomRightLayout

Modules/Annotation/src/mitkLayoutAnnotationRenderer.cpp:308–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306 }
307 }
308 void LayoutAnnotationRenderer::PrepareBottomRightLayout(int *displaySize)
309 {
310 double posX, posY;
311 Point2D margin;
312 posX = 0;
313 posY = 0;
314 mitk::Annotation::Bounds bounds;
315 AnnotationRankedMap &AnnotationMap = m_AnnotationContainerMap[BottomRight];
316 for (auto it = AnnotationMap.cbegin(); it != AnnotationMap.cend(); ++it)
317 {
318 Annotation *Annotation = it->second;
319 margin = GetMargin2D(Annotation);
320 bounds = Annotation->GetBoundsOnDisplay(this->GetCurrentBaseRenderer());
321
322 posX = displaySize[0] - (bounds.Size[0] + margin[0]);
323 bounds.Position[0] = posX;
324 bounds.Position[1] = posY + margin[1];
325 Annotation->SetBoundsOnDisplay(this->GetCurrentBaseRenderer(), bounds);
326 posY += bounds.Size[1] + margin[1];
327 }
328 }
329
330 double LayoutAnnotationRenderer::GetHeight(AnnotationRankedMap &annotations, BaseRenderer *renderer)
331 {

Callers

nothing calls this directly

Calls 3

GetBoundsOnDisplayMethod · 0.45
SetBoundsOnDisplayMethod · 0.45

Tested by

no test coverage detected