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

Method vtkBarChartActor

Rendering/Annotation/vtkBarChartActor.cxx:39–117  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

37//------------------------------------------------------------------------------
38// Instantiate object
39vtkBarChartActor::vtkBarChartActor()
40{
41 // Actor2D positions
42 this->PositionCoordinate->SetCoordinateSystemToNormalizedViewport();
43 this->PositionCoordinate->SetValue(0.1, 0.1);
44 this->Position2Coordinate->SetCoordinateSystemToNormalizedViewport();
45 this->Position2Coordinate->SetValue(0.9, 0.8);
46 this->Position2Coordinate->SetReferenceCoordinate(nullptr);
47
48 this->Input = nullptr;
49 this->ArrayNumber = 0;
50 this->ComponentNumber = 0;
51 this->TitleVisibility = 1;
52 this->Title = nullptr;
53 this->Labels = new vtkBarLabelArray;
54 this->BarMappers = nullptr;
55 this->BarActors = nullptr;
56 this->LabelTextProperty = vtkTextProperty::New();
57 this->LabelTextProperty->SetFontSize(12);
58 this->LabelTextProperty->SetBold(1);
59 this->LabelTextProperty->SetItalic(1);
60 this->LabelTextProperty->SetShadow(0);
61 this->LabelTextProperty->SetFontFamilyToArial();
62 this->TitleTextProperty = vtkTextProperty::New();
63 this->TitleTextProperty->ShallowCopy(this->LabelTextProperty);
64 this->TitleTextProperty->SetFontSize(24);
65 this->TitleTextProperty->SetBold(1);
66 this->TitleTextProperty->SetItalic(0);
67 this->TitleTextProperty->SetShadow(1);
68 this->TitleTextProperty->SetFontFamilyToArial();
69 this->LabelVisibility = 1;
70
71 this->LegendVisibility = 1;
72
73 this->LegendActor->GetPositionCoordinate()->SetCoordinateSystemToViewport();
74 this->LegendActor->GetPosition2Coordinate()->SetCoordinateSystemToViewport();
75 this->LegendActor->GetPosition2Coordinate()->SetReferenceCoordinate(nullptr);
76 this->LegendActor->BorderOff();
77 this->LegendActor->SetNumberOfEntries(100); // initial allocation
78 this->LegendActor->SetPadding(2);
79 this->LegendActor->ScalarVisibilityOff();
80 this->GlyphSource = vtkGlyphSource2D::New();
81 this->GlyphSource->SetGlyphTypeToNone();
82 this->GlyphSource->DashOn();
83 this->GlyphSource->FilledOff();
84 this->GlyphSource->Update();
85
86 this->YAxis = vtkAxisActor2D::New();
87 this->YAxis->GetPositionCoordinate()->SetCoordinateSystemToViewport();
88 this->YAxis->GetPosition2Coordinate()->SetCoordinateSystemToViewport();
89 this->YAxis->SetProperty(this->GetProperty());
90 this->YAxis->SizeFontRelativeToAxisOn();
91 this->YTitle = new char[1];
92 auto result = vtk::format_to_n(this->YTitle, 1, "{:s}", "");
93 *result.out = '\0';
94
95 this->PlotData = vtkPolyData::New();
96 this->PlotMapper = vtkPolyDataMapper2D::New();

Callers

nothing calls this directly

Calls 12

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

Tested by

no test coverage detected