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

Method RenderLabels

Rendering/Context2D/vtkLabeledContourPolyDataItem.cxx:720–737  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

718
719//------------------------------------------------------------------------------
720bool vtkLabeledContourPolyDataItem::RenderLabels(vtkContext2D* painter)
721{
722 double pos[3];
723
724 for (vtkIdType i = 0; i < this->NumberOfUsedTextActors; ++i)
725 {
726 this->TextActors[i]->GetPosition(pos);
727 char* s = this->TextActors[i]->GetInput();
728
729 this->Internal->currentTextProp->ShallowCopy(this->TextActors[i]->GetTextProperty());
730 this->Internal->currentTextProp->SetOrientation(this->LabelHelpers[i]->orientation);
731
732 painter->ApplyTextProp(this->Internal->currentTextProp);
733 painter->DrawString((float)pos[0], (float)pos[1], s);
734 }
735
736 return true;
737}
738
739//------------------------------------------------------------------------------
740bool vtkLabeledContourPolyDataItem::AllocateTextActors(vtkIdType num)

Callers 1

PaintMethod · 0.95

Calls 7

GetPositionMethod · 0.45
GetInputMethod · 0.45
ShallowCopyMethod · 0.45
GetTextPropertyMethod · 0.45
SetOrientationMethod · 0.45
ApplyTextPropMethod · 0.45
DrawStringMethod · 0.45

Tested by

no test coverage detected