浏览代码

Fix pen tool creating 1-pixel gaps sometimes

Equbuxu 3 年之前
父节点
当前提交
905fd9be96
共有 1 个文件被更改,包括 1 次插入1 次删除
  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);
     }