From a789c6e5e28b923d0a2bc84aee2d2be45a28fcb3 Mon Sep 17 00:00:00 2001 From: Ell Date: Mon, 9 Oct 2017 13:03:50 -0400 Subject: [PATCH] app: in GimpOperationBlend, swap leftmost and rightmost colors when ... ... rendering a reversed gradient Finishes up the last commit. --- app/operations/gimpoperationblend.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/operations/gimpoperationblend.c b/app/operations/gimpoperationblend.c index f6be809ba4..e0b9517f42 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! */