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

Method ApplyFillAlpha

IO/ExportPDF/vtkPDFContextDevice2D.cxx:1712–1724  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1710
1711//------------------------------------------------------------------------------
1712void vtkPDFContextDevice2D::ApplyFillAlpha(unsigned char alpha)
1713{
1714 auto gstateIter = this->Impl->AlphaGStateMap.find(alpha);
1715 if (gstateIter == this->Impl->AlphaGStateMap.end())
1716 {
1717 HPDF_ExtGState gstate = HPDF_CreateExtGState(this->Impl->Document);
1718 HPDF_ExtGState_SetAlphaFill(gstate, alpha / 255.f);
1719 auto tmp = this->Impl->AlphaGStateMap.insert(std::make_pair(alpha, gstate));
1720 gstateIter = tmp.first;
1721 }
1722 HPDF_ExtGState alphaState = gstateIter->second;
1723 HPDF_Page_SetExtGState(this->Impl->Page, alphaState);
1724}
1725
1726//------------------------------------------------------------------------------
1727void vtkPDFContextDevice2D::Fill(bool stroke)

Callers 3

DrawPointSpritesMethod · 0.95
ApplyFillColorMethod · 0.95

Calls 6

HPDF_CreateExtGStateFunction · 0.85
HPDF_Page_SetExtGStateFunction · 0.85
findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected