SixLabors / ImageSharp.Drawing

:pen: Extensions to ImageSharp containing a cross-platform 2D polygon manipulation API and drawing operations.
https://sixlabors.com/products/imagesharp-drawing/
Other
285 stars 39 forks source link

Fix IndexOutOfRangeException when drawing lines outside of image #119

Closed JimBobSquarePants closed 3 years ago

JimBobSquarePants commented 3 years ago

Prerequisites

Description

Updates PolygonScanner to correctly handle scanlines outside of the image frame. Lines are still centered correctly. Fixes #108

Angle starting and finishing outside of the frame angle

Stroke 3 Top t-3

Stroke 3 Bottom b-3

Stroke 3 Left l-3

Stroke 3 Right r-3

codecov[bot] commented 3 years ago

Codecov Report

Merging #119 (15dad17) into master (5b168f9) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #119   +/-   ##
=======================================
  Coverage   71.05%   71.05%           
=======================================
  Files          86       86           
  Lines        5472     5472           
  Branches     1119     1119           
=======================================
  Hits         3888     3888           
  Misses       1359     1359           
  Partials      225      225           
Flag Coverage Δ
unittests 71.05% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...arp.Drawing/Shapes/Rasterization/PolygonScanner.cs 97.75% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5b168f9...15dad17. Read the comment docs.