Mercurial > hg > orthanc
diff Core/Images/ImageProcessing.cpp @ 3431:e0841192d7d0
improved FillPolygon
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Mon, 17 Jun 2019 23:36:37 +0200 |
parents | 9345710bbf12 |
children | d8f7c3970e25 |
line wrap: on
line diff
--- a/Core/Images/ImageProcessing.cpp Mon Jun 17 23:35:46 2019 +0200 +++ b/Core/Images/ImageProcessing.cpp Mon Jun 17 23:36:37 2019 +0200 @@ -1442,6 +1442,13 @@ cpy.push_back((double)points[i].GetY()); } + // Draw the lines segments + for (size_t i = 0; i < (points.size() -1); i++) + { + ImageProcessing::DrawLineSegment(image, points[i].GetX(), points[i].GetY(), points[i+1].GetX(), points[i+1].GetY(), value_); + } + ImageProcessing::DrawLineSegment(image, points[points.size() -1].GetX(), points[points.size() -1].GetY(), points[0].GetX(), points[0].GetY(), value_); + std::vector<int32_t> nodeX; nodeX.resize(cpSize); int nodes, pixelX, pixelY, i, j, swap ;