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

Function SetFormattedString

Rendering/Label/vtkLabeledDataMapper.cxx:348–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346 }
347
348 void SetFormattedString(int i, const char* resultString)
349 {
350 this->Self->TextMappers[i + this->Self->NumberOfLabels]->SetInput(resultString);
351
352 // Find the correct property type
353 int type = 0;
354 if (this->TypeArr)
355 {
356 type = this->TypeArr->GetValue(i);
357 }
358 vtkTextProperty* prop = this->Self->Implementation->TextProperties[type];
359 if (!prop)
360 {
361 prop = this->Self->Implementation->TextProperties[0];
362 }
363 this->Self->TextMappers[i + this->Self->NumberOfLabels]->SetTextProperty(prop);
364
365 double x[3];
366 this->Input->GetPoint(i, x);
367 this->Self->LabelPositions[3 * (i + this->Self->NumberOfLabels)] = x[0];
368 this->Self->LabelPositions[3 * (i + this->Self->NumberOfLabels) + 1] = x[1];
369 this->Self->LabelPositions[3 * (i + this->Self->NumberOfLabels) + 2] = x[2];
370 }
371
372 void operator()(const std::string& FormatString)
373 {

Callers

nothing calls this directly

Calls 4

SetInputMethod · 0.45
GetValueMethod · 0.45
SetTextPropertyMethod · 0.45
GetPointMethod · 0.45

Tested by

no test coverage detected