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

Method PrepareLeftLayout

Modules/Annotation/src/mitkLayoutAnnotationRenderer.cpp:246–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244 }
245
246 void LayoutAnnotationRenderer::PrepareLeftLayout(int *displaySize)
247 {
248 double posY;
249 Point2D margin;
250 double height = GetHeight(m_AnnotationContainerMap[Left], GetCurrentBaseRenderer());
251 posY = (height / 2.0 + displaySize[1]) / 2.0;
252 mitk::Annotation::Bounds bounds;
253 AnnotationRankedMap &AnnotationMap = m_AnnotationContainerMap[Left];
254 for (auto it = AnnotationMap.cbegin(); it != AnnotationMap.cend(); ++it)
255 {
256 Annotation *Annotation = it->second;
257 margin = GetMargin2D(Annotation);
258 bounds = Annotation->GetBoundsOnDisplay(this->GetCurrentBaseRenderer());
259
260 posY -= bounds.Size[1] + margin[1];
261 bounds.Position[0] = margin[0];
262 bounds.Position[1] = posY;
263 Annotation->SetBoundsOnDisplay(this->GetCurrentBaseRenderer(), bounds);
264 }
265 }
266
267 void LayoutAnnotationRenderer::PrepareBottomLeftLayout(int * /*displaySize*/)
268 {

Callers

nothing calls this directly

Calls 3

GetBoundsOnDisplayMethod · 0.45
SetBoundsOnDisplayMethod · 0.45

Tested by

no test coverage detected