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

Method PrepareTopRightLayout

Modules/Annotation/src/mitkLayoutAnnotationRenderer.cpp:203–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201 }
202 }
203 void LayoutAnnotationRenderer::PrepareTopRightLayout(int *displaySize)
204 {
205 double posX, posY;
206 Point2D margin;
207 posX = 0;
208 posY = displaySize[1];
209 mitk::Annotation::Bounds bounds;
210 AnnotationRankedMap &AnnotationMap = m_AnnotationContainerMap[TopRight];
211 for (auto it = AnnotationMap.cbegin(); it != AnnotationMap.cend(); ++it)
212 {
213 Annotation *Annotation = it->second;
214 margin = GetMargin2D(Annotation);
215 bounds = Annotation->GetBoundsOnDisplay(this->GetCurrentBaseRenderer());
216
217 posX = displaySize[0] - (bounds.Size[0] + margin[0]);
218 posY -= bounds.Size[1] + margin[1];
219 bounds.Position[0] = posX;
220 bounds.Position[1] = posY;
221 Annotation->SetBoundsOnDisplay(this->GetCurrentBaseRenderer(), bounds);
222 }
223 }
224
225 void LayoutAnnotationRenderer::PrepareRightLayout(int *displaySize)
226 {

Callers

nothing calls this directly

Calls 3

GetBoundsOnDisplayMethod · 0.45
SetBoundsOnDisplayMethod · 0.45

Tested by

no test coverage detected