/* PIKA - Photo and Image Kooker Application
 * a rebranding of The GNU Image Manipulation Program (created with heckimp)
 * A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
 *
 * Original copyright, applying to most contents (license remains unchanged): 
 * Copyright (C) 1995 Spencer Kimball and Peter Mattis
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

#ifndef __PIKA_CHANNEL_SELECT_H__
#define __PIKA_CHANNEL_SELECT_H__


/*  basic selection functions  */

void   pika_channel_select_rectangle    (PikaChannel         *channel,
                                         gint                 x,
                                         gint                 y,
                                         gint                 w,
                                         gint                 h,
                                         PikaChannelOps       op,
                                         gboolean             feather,
                                         gdouble              feather_radius_x,
                                         gdouble              feather_radius_y,
                                         gboolean             push_undo);
void   pika_channel_select_ellipse      (PikaChannel         *channel,
                                         gint                 x,
                                         gint                 y,
                                         gint                 w,
                                         gint                 h,
                                         PikaChannelOps       op,
                                         gboolean             antialias,
                                         gboolean             feather,
                                         gdouble              feather_radius_x,
                                         gdouble              feather_radius_y,
                                         gboolean             push_undo);
void   pika_channel_select_round_rect   (PikaChannel         *channel,
                                         gint                 x,
                                         gint                 y,
                                         gint                 w,
                                         gint                 h,
                                         gdouble              corner_radius_x,
                                         gdouble              corner_radius_y,
                                         PikaChannelOps       op,
                                         gboolean             antialias,
                                         gboolean             feather,
                                         gdouble              feather_radius_x,
                                         gdouble              feather_radius_y,
                                         gboolean             push_undo);

/*  select by PikaScanConvert functions  */

void   pika_channel_select_scan_convert (PikaChannel         *channel,
                                         const gchar         *undo_desc,
                                         PikaScanConvert     *scan_convert,
                                         gint                 offset_x,
                                         gint                 offset_y,
                                         PikaChannelOps       op,
                                         gboolean             antialias,
                                         gboolean             feather,
                                         gdouble              feather_radius_x,
                                         gdouble              feather_radius_y,
                                         gboolean             push_undo);
void   pika_channel_select_polygon      (PikaChannel         *channel,
                                         const gchar         *undo_desc,
                                         gint                 n_points,
                                         const PikaVector2   *points,
                                         PikaChannelOps       op,
                                         gboolean             antialias,
                                         gboolean             feather,
                                         gdouble              feather_radius_x,
                                         gdouble              feather_radius_y,
                                         gboolean             push_undo);
void   pika_channel_select_vectors      (PikaChannel         *channel,
                                         const gchar         *undo_desc,
                                         PikaVectors         *vectors,
                                         PikaChannelOps       op,
                                         gboolean             antialias,
                                         gboolean             feather,
                                         gdouble              feather_radius_x,
                                         gdouble              feather_radius_y,
                                         gboolean             push_undo);
void   pika_channel_select_buffer       (PikaChannel         *channel,
                                         const gchar         *undo_desc,
                                         GeglBuffer          *add_on,
                                         gint                 offset_x,
                                         gint                 offset_y,
                                         PikaChannelOps       op,
                                         gboolean             feather,
                                         gdouble              feather_radius_x,
                                         gdouble              feather_radius_y);


/*  select by PikaChannel functions  */

void   pika_channel_select_channel      (PikaChannel         *channel,
                                         const gchar         *undo_desc,
                                         PikaChannel         *add_on,
                                         gint                 offset_x,
                                         gint                 offset_y,
                                         PikaChannelOps       op,
                                         gboolean             feather,
                                         gdouble              feather_radius_x,
                                         gdouble              feather_radius_y);
void   pika_channel_select_alpha        (PikaChannel         *channel,
                                         PikaDrawable        *drawable,
                                         PikaChannelOps       op,
                                         gboolean             feather,
                                         gdouble              feather_radius_x,
                                         gdouble              feather_radius_y);
void   pika_channel_select_component    (PikaChannel         *channel,
                                         PikaChannelType      component,
                                         PikaChannelOps       op,
                                         gboolean             feather,
                                         gdouble              feather_radius_x,
                                         gdouble              feather_radius_y);
void   pika_channel_select_fuzzy        (PikaChannel         *channel,
                                         PikaDrawable        *drawable,
                                         gboolean             sample_merged,
                                         gint                 x,
                                         gint                 y,
                                         gfloat               threshold,
                                         gboolean             select_transparent,
                                         PikaSelectCriterion  select_criterion,
                                         gboolean             diagonal_neighbors,
                                         PikaChannelOps       op,
                                         gboolean             antialias,
                                         gboolean             feather,
                                         gdouble              feather_radius_x,
                                         gdouble              feather_radius_y);
void   pika_channel_select_by_color     (PikaChannel         *channel,
                                         GList               *drawables,
                                         gboolean             sample_merged,
                                         const PikaRGB       *color,
                                         gfloat               threshold,
                                         gboolean             select_transparent,
                                         PikaSelectCriterion  select_criterion,
                                         PikaChannelOps       op,
                                         gboolean             antialias,
                                         gboolean             feather,
                                         gdouble              feather_radius_x,
                                         gdouble              feather_radius_y);
void   pika_channel_select_by_index     (PikaChannel         *channel,
                                         PikaDrawable        *drawable,
                                         gint                 index,
                                         PikaChannelOps       op,
                                         gboolean             feather,
                                         gdouble              feather_radius_x,
                                         gdouble              feather_radius_y);


#endif  /*  __PIKA_CHANNEL_SELECT_H__  */
