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

Method PrepareTopLeftLayout

Modules/Annotation/src/mitkLayoutAnnotationRenderer.cpp:162–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160 PrepareRightLayout(size);
161 }
162 void LayoutAnnotationRenderer::PrepareTopLeftLayout(int *displaySize)
163 {
164 double posX, posY;
165 Point2D margin;
166 posX = 0;
167 posY = displaySize[1];
168 mitk::Annotation::Bounds bounds;
169 AnnotationRankedMap &AnnotationMap = m_AnnotationContainerMap[TopLeft];
170 for (auto it = AnnotationMap.cbegin(); it != AnnotationMap.cend(); ++it)
171 {
172 Annotation *Annotation = it->second;
173 margin = GetMargin2D(Annotation);
174 bounds = Annotation->GetBoundsOnDisplay(this->GetCurrentBaseRenderer());
175
176 posY -= bounds.Size[1] + margin[1];
177 bounds.Position[0] = posX + margin[0];
178 bounds.Position[1] = posY;
179 Annotation->SetBoundsOnDisplay(this->GetCurrentBaseRenderer(), bounds);
180 }
181 }
182 void LayoutAnnotationRenderer::PrepareTopLayout(int *displaySize)
183 {
184 double posX, posY;

Callers

nothing calls this directly

Calls 3

GetBoundsOnDisplayMethod · 0.45
SetBoundsOnDisplayMethod · 0.45

Tested by

no test coverage detected