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

Method PaintBuffers

Views/Infovis/vtkGraphItem.cxx:187–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185}
186
187void vtkGraphItem::PaintBuffers(vtkContext2D* painter)
188{
189 if (this->Internal->EdgePositions.empty())
190 {
191 return;
192 }
193 vtkIdType numEdges = static_cast<vtkIdType>(this->Internal->EdgePositions.size());
194 for (vtkIdType edgeIdx = 0; edgeIdx < numEdges; ++edgeIdx)
195 {
196 if (this->Internal->EdgePositions[edgeIdx].empty())
197 {
198 continue;
199 }
200 painter->GetPen()->SetWidth(this->Internal->EdgeWidths[edgeIdx]);
201 painter->DrawPoly(this->Internal->EdgePositions[edgeIdx][0].GetData(),
202 static_cast<int>(this->Internal->EdgePositions[edgeIdx].size()),
203 this->Internal->EdgeColors[edgeIdx][0].GetData(), 4);
204 }
205
206 if (this->Internal->VertexPositions.empty())
207 {
208 return;
209 }
210 painter->GetPen()->SetWidth(this->Internal->VertexSizes[0]);
211 painter->GetBrush()->SetTextureProperties(vtkBrush::Linear);
212 painter->DrawPointSprites(this->Sprite, this->Internal->VertexPositions[0].GetData(),
213 static_cast<int>(this->Internal->VertexPositions.size()),
214 this->Internal->VertexColors[0].GetData(), 4);
215}
216
217vtkIdType vtkGraphItem::NumberOfVertices()
218{

Callers 1

PaintMethod · 0.95

Calls 8

emptyMethod · 0.45
sizeMethod · 0.45
SetWidthMethod · 0.45
GetPenMethod · 0.45
DrawPolyMethod · 0.45
GetDataMethod · 0.45
GetBrushMethod · 0.45
DrawPointSpritesMethod · 0.45

Tested by

no test coverage detected