------------------------------------------------------------------------------
| 1990 | |
| 1991 | //------------------------------------------------------------------------------ |
| 1992 | void vtkPDFContextDevice2D::DrawCrossMarkers( |
| 1993 | bool highlight, float* points, int n, unsigned char* colors, int nc_comps) |
| 1994 | { |
| 1995 | const float markerSize = this->Pen->GetWidth(); |
| 1996 | const float delta = markerSize * 0.5f; |
| 1997 | |
| 1998 | this->ApplyLineWidth(highlight ? 1.5f : 0.5f); |
| 1999 | this->ApplyLineType(vtkPen::SOLID_LINE); |
| 2000 | if (!colors) |
| 2001 | { |
| 2002 | this->ApplyStrokeColor(this->Pen->GetColorObject().GetData(), 4); |
| 2003 | } |
| 2004 | |
| 2005 | for (int i = 0; i < n; ++i) |
| 2006 | { |
| 2007 | float* p = points + i * 2; |
| 2008 | if (colors) |
| 2009 | { |
| 2010 | if (i != 0) |
| 2011 | { |
| 2012 | this->Stroke(); |
| 2013 | } |
| 2014 | this->ApplyStrokeColor(colors + i * nc_comps, nc_comps); |
| 2015 | } |
| 2016 | HPDF_Page_MoveTo(this->Impl->Page, p[0] + delta, p[1] + delta); |
| 2017 | HPDF_Page_LineTo(this->Impl->Page, p[0] - delta, p[1] - delta); |
| 2018 | HPDF_Page_MoveTo(this->Impl->Page, p[0] + delta, p[1] - delta); |
| 2019 | HPDF_Page_LineTo(this->Impl->Page, p[0] - delta, p[1] + delta); |
| 2020 | } |
| 2021 | this->Stroke(); |
| 2022 | } |
| 2023 | |
| 2024 | //------------------------------------------------------------------------------ |
| 2025 | void vtkPDFContextDevice2D::DrawPlusMarkers( |
no test coverage detected