------------------------------------------------------------------------------
| 2023 | |
| 2024 | //------------------------------------------------------------------------------ |
| 2025 | void vtkPDFContextDevice2D::DrawPlusMarkers( |
| 2026 | bool highlight, float* points, int n, unsigned char* colors, int nc_comps) |
| 2027 | { |
| 2028 | const float markerSize = this->Pen->GetWidth(); |
| 2029 | const float delta = markerSize * 0.5f; |
| 2030 | |
| 2031 | this->ApplyLineWidth(highlight ? 1.5f : 0.5f); |
| 2032 | this->ApplyLineType(vtkPen::SOLID_LINE); |
| 2033 | if (!colors) |
| 2034 | { |
| 2035 | this->ApplyStrokeColor(this->Pen->GetColorObject().GetData(), 4); |
| 2036 | } |
| 2037 | |
| 2038 | for (int i = 0; i < n; ++i) |
| 2039 | { |
| 2040 | float* p = points + i * 2; |
| 2041 | if (colors) |
| 2042 | { |
| 2043 | if (i != 0) |
| 2044 | { |
| 2045 | this->Stroke(); |
| 2046 | } |
| 2047 | this->ApplyStrokeColor(colors + i * nc_comps, nc_comps); |
| 2048 | } |
| 2049 | HPDF_Page_MoveTo(this->Impl->Page, p[0], p[1] + delta); |
| 2050 | HPDF_Page_LineTo(this->Impl->Page, p[0], p[1] - delta); |
| 2051 | HPDF_Page_MoveTo(this->Impl->Page, p[0] + delta, p[1]); |
| 2052 | HPDF_Page_LineTo(this->Impl->Page, p[0] - delta, p[1]); |
| 2053 | } |
| 2054 | this->Stroke(); |
| 2055 | } |
| 2056 | |
| 2057 | //------------------------------------------------------------------------------ |
| 2058 | void vtkPDFContextDevice2D::DrawSquareMarkers( |
no test coverage detected