------------------------------------------------------------------------------
| 1010 | |
| 1011 | //------------------------------------------------------------------------------ |
| 1012 | void vtkPDFContextDevice2D::DrawPolygon(float* f, int n) |
| 1013 | { |
| 1014 | assert(n > 0); |
| 1015 | assert(f != nullptr); |
| 1016 | |
| 1017 | if (this->Brush->GetColorObject().GetAlpha() == 0 && this->Brush->GetTexture() == nullptr) |
| 1018 | { |
| 1019 | return; |
| 1020 | } |
| 1021 | |
| 1022 | this->PushGraphicsState(); |
| 1023 | this->ApplyBrushState(); |
| 1024 | this->RegisterTexturePoints(f, n); |
| 1025 | |
| 1026 | HPDF_Page_MoveTo(this->Impl->Page, f[0], f[1]); |
| 1027 | |
| 1028 | for (int i = 1; i < n; ++i) |
| 1029 | { |
| 1030 | HPDF_Page_LineTo(this->Impl->Page, f[i * 2], f[i * 2 + 1]); |
| 1031 | } |
| 1032 | |
| 1033 | HPDF_Page_ClosePath(this->Impl->Page); |
| 1034 | |
| 1035 | this->Fill(); |
| 1036 | |
| 1037 | this->PopGraphicsState(); |
| 1038 | } |
| 1039 | |
| 1040 | //------------------------------------------------------------------------------ |
| 1041 | void vtkPDFContextDevice2D::DrawColoredPolygon( |