[gimp] app: fix out-of-gamut representation (pink triangle).



commit 11e1f6ea5e92c8e91f8f853e51da2e577767f886
Author: Jehan <jehan girinstud io>
Date:   Sat Apr 24 19:32:13 2021 +0200

    app: fix out-of-gamut representation (pink triangle).
    
    The small pink triangles were completely broken, i.e. displayed at the
    wrong coordinates.

 app/widgets/gimpfgbgeditor.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/app/widgets/gimpfgbgeditor.c b/app/widgets/gimpfgbgeditor.c
index 6a6dc10817..8e3a586550 100644
--- a/app/widgets/gimpfgbgeditor.c
+++ b/app/widgets/gimpfgbgeditor.c
@@ -400,7 +400,7 @@ gimp_fg_bg_editor_draw (GtkWidget *widget,
       gimp_fg_bg_editor_draw_color_frame (editor, cr, &color,
                                           rect.x,     rect.y,
                                           rect.width, rect.height,
-                                          +1,         +1);
+                                          -1,         -1);
 
       /*  draw the foreground frame  */
       gimp_context_get_foreground (editor->context, &color);
@@ -872,8 +872,8 @@ gimp_fg_bg_editor_draw_color_frame (GimpFgBgEditor *editor,
          ABS (color->r - color->b) > CHANNEL_EPSILON ||
          ABS (color->g - color->b) > CHANNEL_EPSILON))))
     {
-      gint    corner_x = x + 0.5 * (1.0 + corner_dx) * width;
-      gint    corner_y = y + 0.5 * (1.0 + corner_dy) * height;
+      gint    corner_x = x + 0.5 * (1.0 - corner_dx) * width;
+      gint    corner_y = y + 0.5 * (1.0 - corner_dy) * height;
       gint    side     = MIN (width, height) * 2 / 3;
       GimpRGB out_of_gamut_color;
 


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