[gimp] app: Add diagonal_neighbors parameter to gimp_channel_select_fuzzy()



commit e0b1aa1c26660f99f65b72081ec0167d765eacb5
Author: Ell <ell_se yahoo com>
Date:   Mon Jan 11 11:02:27 2016 +0000

    app: Add diagonal_neighbors parameter to gimp_channel_select_fuzzy()
    
    and propagate it to gimp_pickable_contiguous_region_by_seed(), in
    preperation for adding a diagonal-neighbors setting to PDB.

 app/core/gimpchannel-select.c        |    3 ++-
 app/core/gimpchannel-select.h        |    1 +
 app/pdb/image-select-cmds.c          |    1 +
 app/pdb/selection-tools-cmds.c       |    2 ++
 tools/pdbgen/pdb/image_select.pdb    |    1 +
 tools/pdbgen/pdb/selection_tools.pdb |    4 +++-
 6 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/app/core/gimpchannel-select.c b/app/core/gimpchannel-select.c
index 22f230c..9da4049 100644
--- a/app/core/gimpchannel-select.c
+++ b/app/core/gimpchannel-select.c
@@ -494,6 +494,7 @@ gimp_channel_select_fuzzy (GimpChannel         *channel,
                            gfloat               threshold,
                            gboolean             select_transparent,
                            GimpSelectCriterion  select_criterion,
+                           gboolean             diagonal_neighbors,
                            GimpChannelOps       op,
                            gboolean             antialias,
                            gboolean             feather,
@@ -519,7 +520,7 @@ gimp_channel_select_fuzzy (GimpChannel         *channel,
                                                     threshold,
                                                     select_transparent,
                                                     select_criterion,
-                                                    FALSE /* no diagonal neighbors */,
+                                                    diagonal_neighbors,
                                                     x, y);
 
   if (! sample_merged)
diff --git a/app/core/gimpchannel-select.h b/app/core/gimpchannel-select.h
index e335380..ac6e5fb 100644
--- a/app/core/gimpchannel-select.h
+++ b/app/core/gimpchannel-select.h
@@ -130,6 +130,7 @@ void   gimp_channel_select_fuzzy        (GimpChannel         *channel,
                                          gfloat               threshold,
                                          gboolean             select_transparent,
                                          GimpSelectCriterion  select_criterion,
+                                         gboolean             diagonal_neighbors,
                                          GimpChannelOps       op,
                                          gboolean             antialias,
                                          gboolean             feather,
diff --git a/app/pdb/image-select-cmds.c b/app/pdb/image-select-cmds.c
index 054301d..3bbfac2 100644
--- a/app/pdb/image-select-cmds.c
+++ b/app/pdb/image-select-cmds.c
@@ -129,6 +129,7 @@ image_select_contiguous_color_invoker (GimpProcedure         *procedure,
                                      pdb_context->sample_threshold,
                                      pdb_context->sample_transparent,
                                      pdb_context->sample_criterion,
+                                     FALSE /* no diagonal neighnors */,
                                      operation,
                                      pdb_context->antialias,
                                      pdb_context->feather,
diff --git a/app/pdb/selection-tools-cmds.c b/app/pdb/selection-tools-cmds.c
index e92a5e7..c39ecdb 100644
--- a/app/pdb/selection-tools-cmds.c
+++ b/app/pdb/selection-tools-cmds.c
@@ -275,6 +275,7 @@ fuzzy_select_invoker (GimpProcedure         *procedure,
                                  threshold / 255.0,
                                  FALSE /* don't select transparent */,
                                  GIMP_SELECT_CRITERION_COMPOSITE,
+                                 FALSE /* no diagonal neighbors */,
                                  operation,
                                  antialias,
                                  feather,
@@ -332,6 +333,7 @@ fuzzy_select_full_invoker (GimpProcedure         *procedure,
                                  threshold / 255.0,
                                  select_transparent,
                                  select_criterion,
+                                 FALSE /* no diagonal neighbors */,
                                  operation,
                                  antialias,
                                  feather,
diff --git a/tools/pdbgen/pdb/image_select.pdb b/tools/pdbgen/pdb/image_select.pdb
index 4c021ea..7b04ecd 100644
--- a/tools/pdbgen/pdb/image_select.pdb
+++ b/tools/pdbgen/pdb/image_select.pdb
@@ -143,6 +143,7 @@ HELP
                                  pdb_context->sample_threshold,
                                  pdb_context->sample_transparent,
                                  pdb_context->sample_criterion,
+                                 FALSE /* no diagonal neighnors */,
                                  operation,
                                  pdb_context->antialias,
                                  pdb_context->feather,
diff --git a/tools/pdbgen/pdb/selection_tools.pdb b/tools/pdbgen/pdb/selection_tools.pdb
index 58fd2f8..6bf398e 100644
--- a/tools/pdbgen/pdb/selection_tools.pdb
+++ b/tools/pdbgen/pdb/selection_tools.pdb
@@ -236,6 +236,7 @@ sub fuzzy_select {
                              threshold / 255.0,
                              FALSE /* don't select transparent */,
                              GIMP_SELECT_CRITERION_COMPOSITE,
+                             FALSE /* no diagonal neighbors */,
                              operation,
                              antialias,
                              feather,
@@ -294,8 +295,9 @@ sub fuzzy_select_full {
                              sample_merged,
                              x, y,
                              threshold / 255.0,
-                            select_transparent,
+                             select_transparent,
                              select_criterion,
+                             FALSE /* no diagonal neighbors */,
                              operation,
                              antialias,
                              feather,


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