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

Method DrawQuadStrip

IO/ExportPDF/vtkPDFContextDevice2D.cxx:981–1009  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

979
980//------------------------------------------------------------------------------
981void vtkPDFContextDevice2D::DrawQuadStrip(float* p, int n)
982{
983 assert(n > 0);
984 assert(p != nullptr);
985
986 if (this->Brush->GetColorObject().GetAlpha() == 0 && this->Brush->GetTexture() == nullptr)
987 {
988 return;
989 }
990
991 this->PushGraphicsState();
992 this->ApplyBrushState();
993 this->RegisterTexturePoints(p, n);
994
995 size_t numQuads = n / 2 - 1;
996 for (size_t quad = 0; quad < numQuads; ++quad)
997 {
998 const size_t i = quad * 4;
999
1000 HPDF_Page_MoveTo(this->Impl->Page, p[i], p[i + 1]);
1001 HPDF_Page_LineTo(this->Impl->Page, p[i + 2], p[i + 3]);
1002 HPDF_Page_LineTo(this->Impl->Page, p[i + 4], p[i + 5]);
1003 HPDF_Page_LineTo(this->Impl->Page, p[i + 6], p[i + 7]);
1004 HPDF_Page_ClosePath(this->Impl->Page);
1005 }
1006
1007 this->Fill();
1008 this->PopGraphicsState();
1009}
1010
1011//------------------------------------------------------------------------------
1012void vtkPDFContextDevice2D::DrawPolygon(float* f, int n)

Callers

nothing calls this directly

Calls 12

PushGraphicsStateMethod · 0.95
ApplyBrushStateMethod · 0.95
RegisterTexturePointsMethod · 0.95
FillMethod · 0.95
PopGraphicsStateMethod · 0.95
HPDF_Page_MoveToFunction · 0.85
HPDF_Page_LineToFunction · 0.85
HPDF_Page_ClosePathFunction · 0.85
GetAlphaMethod · 0.80
assertFunction · 0.50
GetColorObjectMethod · 0.45
GetTextureMethod · 0.45

Tested by

no test coverage detected