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



commit 93094c67ed7aa71e77444cbbe6cf1df51158d8cd
Author: Thomas Manni <thomas manni free fr>
Date:   Thu Jul 25 14:21:33 2019 +0200

    radial-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/radial-gradient.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/operations/common/radial-gradient.c b/operations/common/radial-gradient.c
index 0383c7840..a6b912cef 100644
--- a/operations/common/radial-gradient.c
+++ b/operations/common/radial-gradient.c
@@ -97,7 +97,7 @@ process (GeglOperation       *operation,
                 v = 1.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]