浏览代码

Fixed gradient orientation

Clement Espeute 2 年之前
父节点
当前提交
7dcd42ab49
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      hrt/impl/Gradient.hx

+ 1 - 1
hrt/impl/Gradient.hx

@@ -106,7 +106,7 @@ class Gradient {
             // and use this copy in the genPixels function. But at this moment we consider that it's a bug
             if(newHash != oldHash) throw "gradient data has changed between first generation and realloc";
             #end
-            var xScale = data.isVertical ? 1 : 0;
+            var xScale = data.isVertical ? 0 : 1;
             var yScale = 1 - xScale;
             var pixels = hxd.Pixels.alloc(data.resolution * xScale + 1 * yScale,1 * xScale + data.resolution * yScale, ARGB);