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

Method AddAlignmentProperty

Modules/Annotation/src/mitkLayoutAnnotationRenderer.cpp:48–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46 }
47
48 void LayoutAnnotationRenderer::AddAlignmentProperty(Annotation *Annotation,
49 Alignment activeAlignment,
50 Point2D margin,
51 int priority)
52 {
53 EnumerationProperty::Pointer alignmentProperty(mitk::EnumerationProperty::New());
54 alignmentProperty->AddEnum("TopLeft", TopLeft);
55 alignmentProperty->AddEnum("Top", Top);
56 alignmentProperty->AddEnum("TopRight", TopRight);
57 alignmentProperty->AddEnum("BottomLeft ", BottomLeft);
58 alignmentProperty->AddEnum("Bottom", Bottom);
59 alignmentProperty->AddEnum("BottomRight", BottomRight);
60 alignmentProperty->AddEnum("Left", Left);
61 alignmentProperty->AddEnum("Right", Right);
62 alignmentProperty->SetValue(activeAlignment);
63 Annotation->AddProperty(PROP_LAYOUT_ALIGNMENT, alignmentProperty.GetPointer());
64 Annotation->SetIntProperty(PROP_LAYOUT_PRIORITY, priority);
65 SetMargin2D(Annotation, margin);
66 }
67
68 void LayoutAnnotationRenderer::OnAnnotationRenderersChanged()
69 {

Callers

nothing calls this directly

Calls 6

GetPointerMethod · 0.80
NewFunction · 0.50
AddEnumMethod · 0.45
SetValueMethod · 0.45
AddPropertyMethod · 0.45
SetIntPropertyMethod · 0.45

Tested by

no test coverage detected