浏览代码

Fix ModifyImageRight having wrong width and height usage

CPKreuz 1 年之前
父节点
当前提交
0216cfde07
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/ModifyImageRightNode.cs

+ 3 - 3
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/ModifyImageRightNode.cs

@@ -39,11 +39,11 @@ public class ModifyImageRightNode : Node
 
         using var surface = new Surface(size);
 
-        for (int y = 0; y < width; y++)
+        for (int y = 0; y < height; y++)
         {
-            for (int x = 0; x < height; x++)
+            for (int x = 0; x < width; x++)
             {
-                var context = new FieldContext(new VecD((double)x / width, (double)y / width), new VecI(width, height));
+                var context = new FieldContext(new VecD((double)x / width, (double)y / height), new VecI(width, height));
                 var color = Color.Value(context);
 
                 drawingPaint.Color = color;