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

Method PrepareRightLayout

Modules/Annotation/src/mitkLayoutAnnotationRenderer.cpp:225–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223 }
224
225 void LayoutAnnotationRenderer::PrepareRightLayout(int *displaySize)
226 {
227 double posY;
228 Point2D margin;
229 double height = GetHeight(m_AnnotationContainerMap[Right], GetCurrentBaseRenderer());
230 posY = (height / 2.0 + displaySize[1]) / 2.0;
231 mitk::Annotation::Bounds bounds;
232 AnnotationRankedMap &AnnotationMap = m_AnnotationContainerMap[Right];
233 for (auto it = AnnotationMap.cbegin(); it != AnnotationMap.cend(); ++it)
234 {
235 Annotation *Annotation = it->second;
236 margin = GetMargin2D(Annotation);
237 bounds = Annotation->GetBoundsOnDisplay(this->GetCurrentBaseRenderer());
238
239 posY -= bounds.Size[1] + margin[1];
240 bounds.Position[0] = displaySize[0] - (bounds.Size[0] + margin[0]);
241 bounds.Position[1] = posY + margin[1];
242 Annotation->SetBoundsOnDisplay(this->GetCurrentBaseRenderer(), bounds);
243 }
244 }
245
246 void LayoutAnnotationRenderer::PrepareLeftLayout(int *displaySize)
247 {

Callers

nothing calls this directly

Calls 3

GetBoundsOnDisplayMethod · 0.45
SetBoundsOnDisplayMethod · 0.45

Tested by

no test coverage detected