[gegl] linear-gradient: swap the 2 colors in the formula ...



commit bd6042e73ba11e7c6a53235e0a2d10643cd34295
Author: Thomas Manni <thomas manni free fr>
Date:   Thu Jul 25 14:13:48 2019 +0200

    linear-gradient: swap the 2 colors in the formula ...
    
    ... to have the start-color at the (start-x, start-y) coordinate and the
    end-color at the (end-x, end-y) coordinate.

 operations/common/linear-gradient.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/operations/common/linear-gradient.c b/operations/common/linear-gradient.c
index 9a1c579fa..321a63530 100644
--- a/operations/common/linear-gradient.c
+++ b/operations/common/linear-gradient.c
@@ -111,7 +111,7 @@ process (GeglOperation       *operation,
                 v = 0.0f;
 
               for (c = 0; c < 4; c++)
-                out_pixel[c] = color1[c] * v + color2[c] * (1.0f - v);
+                out_pixel[c] = color2[c] * v + color1[c] * (1.0f - v);
 
               out_pixel += 4;
             }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]