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

Method DrawSquareMarkers

IO/ExportPDF/vtkPDFContextDevice2D.cxx:2058–2083  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

2056
2057//------------------------------------------------------------------------------
2058void vtkPDFContextDevice2D::DrawSquareMarkers(
2059 bool, float* points, int n, unsigned char* colors, int nc_comps)
2060{
2061 const float markerSize = this->Pen->GetWidth();
2062 const float delta = markerSize * 0.5f;
2063
2064 if (!colors)
2065 {
2066 this->ApplyFillColor(this->Pen->GetColorObject().GetData(), 4);
2067 }
2068
2069 for (int i = 0; i < n; ++i)
2070 {
2071 float* p = points + i * 2;
2072 if (colors)
2073 {
2074 if (i != 0)
2075 {
2076 this->Fill();
2077 }
2078 this->ApplyFillColor(colors + i * nc_comps, nc_comps);
2079 }
2080 HPDF_Page_Rectangle(this->Impl->Page, p[0] - delta, p[1] - delta, markerSize, markerSize);
2081 }
2082 this->Fill();
2083}
2084
2085//------------------------------------------------------------------------------
2086void vtkPDFContextDevice2D::DrawCircleMarkers(

Callers 1

DrawMarkersMethod · 0.95

Calls 6

ApplyFillColorMethod · 0.95
FillMethod · 0.95
HPDF_Page_RectangleFunction · 0.85
GetWidthMethod · 0.45
GetDataMethod · 0.45
GetColorObjectMethod · 0.45

Tested by

no test coverage detected