Browse Source

Fix pen tool creating 1-pixel gaps sometimes

Equbuxu 2 years ago
parent
commit
905fd9be96
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/ChunkyImageLib/Operations/BresenhamLineOperation.cs

+ 1 - 1
src/ChunkyImageLib/Operations/BresenhamLineOperation.cs

@@ -40,7 +40,7 @@ internal class BresenhamLineOperation : IDrawOperation
 
     public HashSet<VecI> FindAffectedChunks(VecI imageSize)
     {
-        RectI bounds = RectI.FromTwoPoints(from, to + new VecI(1));
+        RectI bounds = RectI.FromTwoPixels(from, to);
         return OperationHelper.FindChunksTouchingRectangle(bounds, ChunkyImage.FullChunkSize);
     }