MCPcopy Create free account
hub / github.com/Kitware/VTK / vtkPieChartActor

Method vtkPieChartActor

Rendering/Annotation/vtkPieChartActor.cxx:51–124  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Instantiate object

Source from the content-addressed store, hash-verified

49//------------------------------------------------------------------------------
50// Instantiate object
51vtkPieChartActor::vtkPieChartActor()
52{
53 // Actor2D positions
54 this->PositionCoordinate->SetCoordinateSystemToNormalizedViewport();
55 this->PositionCoordinate->SetValue(0.1, 0.1);
56 this->Position2Coordinate->SetCoordinateSystemToNormalizedViewport();
57 this->Position2Coordinate->SetValue(0.9, 0.8);
58 this->Position2Coordinate->SetReferenceCoordinate(nullptr);
59
60 this->ConnectionHolder = vtkPieChartActorConnection::New();
61
62 this->ArrayNumber = 0;
63 this->ComponentNumber = 0;
64 this->TitleVisibility = 1;
65 this->Title = nullptr;
66 this->Labels = new vtkPieceLabelArray;
67 this->PieceMappers = nullptr;
68 this->PieceActors = nullptr;
69 this->LabelTextProperty = vtkTextProperty::New();
70 this->LabelTextProperty->SetFontSize(12);
71 this->LabelTextProperty->SetBold(1);
72 this->LabelTextProperty->SetItalic(1);
73 this->LabelTextProperty->SetShadow(0);
74 this->LabelTextProperty->SetFontFamilyToArial();
75 this->TitleTextProperty = vtkTextProperty::New();
76 this->TitleTextProperty->ShallowCopy(this->LabelTextProperty);
77 this->TitleTextProperty->SetFontSize(24);
78 this->TitleTextProperty->SetBold(1);
79 this->TitleTextProperty->SetItalic(0);
80 this->TitleTextProperty->SetShadow(1);
81 this->TitleTextProperty->SetFontFamilyToArial();
82 this->LabelVisibility = 1;
83
84 this->LegendVisibility = 1;
85
86 this->LegendActor->GetPositionCoordinate()->SetCoordinateSystemToViewport();
87 this->LegendActor->GetPosition2Coordinate()->SetCoordinateSystemToViewport();
88 this->LegendActor->GetPosition2Coordinate()->SetReferenceCoordinate(nullptr);
89 this->LegendActor->BorderOff();
90 this->LegendActor->SetNumberOfEntries(100); // initial allocation
91 this->LegendActor->SetPadding(2);
92 this->LegendActor->ScalarVisibilityOff();
93 this->GlyphSource = vtkGlyphSource2D::New();
94 this->GlyphSource->SetGlyphTypeToNone();
95 this->GlyphSource->DashOn();
96 this->GlyphSource->FilledOff();
97 this->GlyphSource->Update();
98
99 this->PlotData = vtkPolyData::New();
100 this->PlotMapper = vtkPolyDataMapper2D::New();
101 this->PlotMapper->SetInputData(this->PlotData);
102 this->PlotActor = vtkActor2D::New();
103 this->PlotActor->SetMapper(this->PlotMapper);
104
105 this->TitleMapper = vtkTextMapper::New();
106 this->TitleActor = vtkActor2D::New();
107 this->TitleActor->SetMapper(this->TitleMapper);
108 this->TitleActor->GetPositionCoordinate()->SetCoordinateSystemToViewport();

Callers

nothing calls this directly

Calls 9

SetFontSizeMethod · 0.80
SetNumberOfEntriesMethod · 0.80
NewFunction · 0.50
SetValueMethod · 0.45
ShallowCopyMethod · 0.45
SetPaddingMethod · 0.45
UpdateMethod · 0.45
SetInputDataMethod · 0.45
SetMapperMethod · 0.45

Tested by

no test coverage detected