[gimp] app: in GimpOperationBlend, swap leftmost and rightmost colors when ...



commit a789c6e5e28b923d0a2bc84aee2d2be45a28fcb3
Author: Ell <ell_se yahoo com>
Date:   Mon Oct 9 13:03:50 2017 -0400

    app: in GimpOperationBlend, swap leftmost and rightmost colors when ...
    
    ... rendering a reversed gradient
    
    Finishes up the last commit.

 app/operations/gimpoperationblend.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/app/operations/gimpoperationblend.c b/app/operations/gimpoperationblend.c
index f6be809..e0b9517 100644
--- a/app/operations/gimpoperationblend.c
+++ b/app/operations/gimpoperationblend.c
@@ -1077,6 +1077,15 @@ gimp_operation_blend_process (GeglOperation       *operation,
                                                   gimp_gradient_segment_get_last (
                                                     rbd.gradient->segments),
                                                   &rbd.rightmost_color);
+
+      if (rbd.reverse)
+        {
+          GimpRGB temp;
+
+          temp                = rbd.leftmost_color;
+          rbd.leftmost_color  = rbd.rightmost_color;
+          rbd.rightmost_color = temp;
+        }
     }
 
   /* Render the gradient! */


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