1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Merge pull request #27366 from chacha21:arrowedLine_clipped

Try to fix distant points to save time when ThickLine() calls FillConvexPoly() #27366

Proposal for #27365

cv::clipLine() is useful, but one should take care of a margin to preserve line caps.

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [X] The PR is proposed to the proper branch
- [X] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
Pierre Chatelier
2025-11-07 08:34:52 +01:00
committed by GitHub
parent 426aa598e7
commit 9fc556a83e
3 changed files with 21 additions and 9 deletions
+1 -1
View File
@@ -589,7 +589,7 @@ TEST(Drawing, longline)
Mat mat = Mat::zeros(256, 256, CV_8UC1);
line(mat, cv::Point(34, 204), cv::Point(46400, 47400), cv::Scalar(255), 3);
EXPECT_EQ(310, cv::countNonZero(mat));
EXPECT_EQ(264, cv::countNonZero(mat));
Point pt[6];
pt[0].x = 32;