[gimp] libgimpwidgets: add an out-of-gamut indicator to GimpColorArea
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimpwidgets: add an out-of-gamut indicator to GimpColorArea
- Date: Fri, 19 May 2017 09:01:54 +0000 (UTC)
commit c4dfef0779facb6c8f0df56431d0ccd2d1eb30d5
Author: Michael Natterer <mitch gimp org>
Date: Fri May 19 10:59:26 2017 +0200
libgimpwidgets: add an out-of-gamut indicator to GimpColorArea
libgimpwidgets/gimpcolorarea.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/libgimpwidgets/gimpcolorarea.c b/libgimpwidgets/gimpcolorarea.c
index 7a38f20..a1adae8 100644
--- a/libgimpwidgets/gimpcolorarea.c
+++ b/libgimpwidgets/gimpcolorarea.c
@@ -450,6 +450,23 @@ gimp_color_area_expose (GtkWidget *widget,
cairo_stroke (cr);
}
+ if (priv->config &&
+ (area->color.r < 0.0 || area->color.r > 1.0 ||
+ area->color.g < 0.0 || area->color.g > 1.0 ||
+ area->color.b < 0.0 || area->color.b > 1.0))
+ {
+ cairo_move_to (cr, area->width, 0);
+ cairo_line_to (cr, area->width - MIN (area->width, area->height), 0);
+ cairo_line_to (cr, area->width, MIN (area->width, area->height));
+ cairo_line_to (cr, area->width, 0);
+
+ cairo_set_source_rgb (cr,
+ priv->config->out_of_gamut_color.r,
+ priv->config->out_of_gamut_color.g,
+ priv->config->out_of_gamut_color.b);
+ cairo_fill (cr);
+ }
+
cairo_destroy (cr);
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]