From bba8f695941fa52b1bef60c3c5cf8f251229fb18 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Tue, 10 Apr 2018 00:26:01 +0200 Subject: [PATCH] Revert "Bug 791512 - make the selection boundary detection the same as 2.8" This commit was fixing only a symptom of our channel/selection problem, making it appear things were fine. This reverts commit 27512d802b221df14b7c805e4ceccf710fcd0e4e. --- app/core/gimpboundary.h | 3 +-- app/core/gimpchannel.c | 4 ++-- app/core/gimplayer-floating-selection.c | 2 +- app/tools/gimpregionselecttool.c | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/core/gimpboundary.h b/app/core/gimpboundary.h index c2adc0aeda..29049ad932 100644 --- a/app/core/gimpboundary.h +++ b/app/core/gimpboundary.h @@ -20,8 +20,7 @@ /* half intensity for mask */ -#define GIMP_BOUNDARY_HALF_WAY_PERCEPTUAL 0.5 -#define GIMP_BOUNDARY_HALF_WAY_LINEAR 0.214041 +#define GIMP_BOUNDARY_HALF_WAY 0.5 typedef enum diff --git a/app/core/gimpchannel.c b/app/core/gimpchannel.c index b481550c86..f78add2b2e 100644 --- a/app/core/gimpchannel.c +++ b/app/core/gimpchannel.c @@ -1088,7 +1088,7 @@ gimp_channel_real_boundary (GimpChannel *channel, babl_format ("Y float"), GIMP_BOUNDARY_IGNORE_BOUNDS, x1, y1, x2, y2, - GIMP_BOUNDARY_HALF_WAY_LINEAR, + GIMP_BOUNDARY_HALF_WAY, &channel->num_segs_out); x1 = MAX (x1, x3); y1 = MAX (y1, y3); @@ -1101,7 +1101,7 @@ gimp_channel_real_boundary (GimpChannel *channel, babl_format ("Y float"), GIMP_BOUNDARY_WITHIN_BOUNDS, x1, y1, x2, y2, - GIMP_BOUNDARY_HALF_WAY_LINEAR, + GIMP_BOUNDARY_HALF_WAY, &channel->num_segs_in); } else diff --git a/app/core/gimplayer-floating-selection.c b/app/core/gimplayer-floating-selection.c index 236356a624..b1bac93393 100644 --- a/app/core/gimplayer-floating-selection.c +++ b/app/core/gimplayer-floating-selection.c @@ -267,7 +267,7 @@ floating_sel_boundary (GimpLayer *layer, babl_format ("A float"), GIMP_BOUNDARY_WITHIN_BOUNDS, 0, 0, width, height, - GIMP_BOUNDARY_HALF_WAY_LINEAR, + GIMP_BOUNDARY_HALF_WAY, &layer->fs.num_segs); /* offset the segments */ diff --git a/app/tools/gimpregionselecttool.c b/app/tools/gimpregionselecttool.c index c1674b4c8d..f1604a8660 100644 --- a/app/tools/gimpregionselecttool.c +++ b/app/tools/gimpregionselecttool.c @@ -310,7 +310,7 @@ gimp_region_select_tool_draw (GimpDrawTool *draw_tool) 0, 0, gegl_buffer_get_width (region_sel->region_mask), gegl_buffer_get_height (region_sel->region_mask), - GIMP_BOUNDARY_HALF_WAY_LINEAR, + GIMP_BOUNDARY_HALF_WAY, ®ion_sel->n_segs); }