1
1
mirror of https://gitlab.gnome.org/GNOME/gimp.git synced 2025-10-06 01:12:40 +02:00

Compare commits

...

102 Commits

Author SHA1 Message Date
Ajay Ramanathan
7f21332564 minor enum to boolean error 2013-09-26 17:38:28 +05:30
Ajay Ramanathan
3f7109a0d4 merge conflicts 2013-09-22 00:22:47 +05:30
Ajay Ramanathan
ca52dd7392 merge conflicts 2013-09-21 08:38:02 +05:30
Ajay Ramanathan
61fde4961d enums list 2013-09-20 18:59:58 +05:30
Ajay Ramanathan
d2f65f3152 app: polygon selection tool 2013-09-19 09:13:11 +05:30
Ajay Ramanathan
e429dba7ab commented selectbycontenttool 2013-09-19 09:13:11 +05:30
Ajay Ramanathan
b34c75959f minor changes 2013-09-19 09:13:11 +05:30
Ajay Ramanathan
6350319f23 removed few extra functions 2013-09-19 09:13:11 +05:30
Ajay Ramanathan
1175823bc8 removed selectbycontent from comment 2013-09-19 09:13:11 +05:30
Ajay Ramanathan
ab97ae55ca app: n-polygon options number of side 2013-09-19 09:13:10 +05:30
Sven Claussner
c4d69b105a Fix libgimp/gimp.def
Add missing item gimp_shape_type_get_type
to fix the failing Jenkins build.
2013-09-19 09:13:10 +05:30
Ajay Ramanathan
d35fdff6aa app: stable build 2013-09-19 09:13:10 +05:30
Ajay Ramanathan
cdec50aba2 commented out selectbycontentool] 2013-09-19 09:13:10 +05:30
Ajay Ramanathan
28abea1a77 app: selectbycontent file 2013-09-19 09:13:10 +05:30
Ajay Ramanathan
39a55b0aca app: select by content header file 2013-09-19 09:13:10 +05:30
Ajay Ramanathan
cebf0942ef app: selectbycontent added few header files 2013-09-19 09:13:10 +05:30
Ajay Ramanathan
02b20b58f8 app:tools: options for content select 2013-09-19 09:13:10 +05:30
Ajay Ramanathan
b86edb353b app:selectbyshape Minor edits 2013-09-19 09:13:10 +05:30
Ajay Ramanathan
a397583bd3 app:selectbyshape Polygon tool Comments added 2013-09-19 09:13:10 +05:30
Ajay Ramanathan
a9e30328fc app:selectbyshape Polygon tool 2013-09-19 09:13:10 +05:30
Ajay Ramanathan
a7aa4354da app:gimp-tools removed selectbycontent from comment 2013-09-19 09:13:09 +05:30
Ajay Ramanathan
9570a0e912 app:too_draw added functions for othwer shapes 2013-09-19 09:13:09 +05:30
Ajay Ramanathan
e5bc43cd04 gimpselectbycontent 2013-09-19 09:13:09 +05:30
Ajay Ramanathan
e84113c58b app:gimpselectbycontent.h 2013-09-19 09:13:09 +05:30
Ajay Ramanathan
6bbc2a2d35 app:stable gimpselectbyshape 2013-09-19 09:13:09 +05:30
Ajay Ramanathan
91c022379a app:Removed few backup files 2013-09-19 09:13:09 +05:30
Ajay Ramanathan
4373240fcd app: selectbyshapetool added base functions 2013-09-19 09:13:09 +05:30
Ajay Ramanathan
a0b8909f44 app:added lines in selectbyshape 2013-09-19 09:13:09 +05:30
Ajay Ramanathan
a95dd2ec40 app:deleted some backup files 2013-09-19 09:13:09 +05:30
Ajay Ramanathan
2cb7110350 app: created backup error copy 2013-09-19 09:13:09 +05:30
Ajay Ramanathan
b0661c2731 Created a backup of gimpselectbyshapetool 2013-09-19 09:13:09 +05:30
Ajay Ramanathan
fb594d49c1 app: Selectbyshape:tool_draw Commented out some code 2013-09-19 09:13:08 +05:30
Ajay Ramanathan
eb07c48a09 app: gimp_select_by_shape_tool_draw added new features 2013-09-19 09:13:08 +05:30
Ajay Ramanathan
8ac989826c app:selectbyshape Single row select tool 2013-09-19 09:13:08 +05:30
Ajay Ramanathan
a41b3f8ecb app:Single Row selection tool 2013-09-19 09:13:08 +05:30
Ajay Ramanathan
294da02527 app:added function for single row selection tool 2013-09-19 09:13:08 +05:30
Ajay Ramanathan
a6b5a88bcb po:POTFILES.in added file; corrected error 2013-09-19 09:13:08 +05:30
Ajay Ramanathan
fda0646ba3 po: Edited POTFILES.in 2013-09-19 09:13:08 +05:30
Ajay Ramanathan
5f82464d2c app:Some small changes in selectbyshape.c 2013-09-19 09:13:08 +05:30
Ajay Ramanathan
7529786c79 app:add line_orientation; to the list of options 2013-09-19 09:13:08 +05:30
Ajay Ramanathan
1340ac7803 app:changed he rounded radius into percentage 2013-09-19 09:13:08 +05:30
Ajay Ramanathan
d527497753 app:Solved Bug; switch case goes to default 2013-09-19 09:13:08 +05:30
Ajay Ramanathan
1f09c8fd3b app:corrected some bugs 2013-09-19 09:13:07 +05:30
Ajay Ramanathan
5b66fbeda9 app:Added scale for rounded radius and n-polygon 2013-09-19 09:13:07 +05:30
Ajay Ramanathan
ef5a277648 app:added enum in core-enums and edited rectangleselectoptions 2013-09-19 09:12:56 +05:30
Ajay Ramanathan
2cf47c0ed7 app:Solved warning; unintiated toggle 2013-09-19 09:12:55 +05:30
Ajay Ramanathan
9899b535d2 Added new Ui options inside rectangleselectoptions gimpregionselectoptions 2013-09-19 09:12:55 +05:30
Ajay Ramanathan
a333b5ea9f Arranged Makefil.am Alphabetically 2013-09-19 09:12:55 +05:30
Ajay Ramanathan
099ca3ab04 Added new tools in gimphelp-ids.h & linked pngs to function 2013-09-19 09:12:55 +05:30
Ajay Ramanathan
78b0ecca68 Edited Makefile.am and gimp-tools.c 2013-09-19 09:12:55 +05:30
Ajay Ramanathan
de7d503fa6 Add New pngs and edit Makefiles.am 2013-09-19 09:12:54 +05:30
Ajay Ramanathan
cc1f9943da Added files; .c & .h for the new tools 2013-09-19 09:12:54 +05:30
Michael Henning
6e1ba8af48 autogen.sh: also look for automake 1.14
(cherry picked from commit 9a6b42a4fd)
(cherry picked from commit 3ce15deed9)
2013-09-15 13:49:26 +02:00
Ajay Ramanathan
2f1e2e1c17 app: polygon selection tool 2013-09-15 10:39:24 +05:30
Ajay Ramanathan
520dbb97ec commented selectbycontenttool 2013-09-15 10:37:10 +05:30
Ajay Ramanathan
2f33cd2b72 minor changes 2013-09-15 10:37:10 +05:30
Ajay Ramanathan
c1bf659f7c removed few extra functions 2013-09-15 10:37:10 +05:30
Ajay Ramanathan
8ab74b05bb removed selectbycontent from comment 2013-09-15 10:37:10 +05:30
Ajay Ramanathan
27ce67c81b app: n-polygon options number of side 2013-09-15 10:37:09 +05:30
Sven Claussner
bcb6bfd190 Fix libgimp/gimp.def
Add missing item gimp_shape_type_get_type
to fix the failing Jenkins build.
2013-09-14 08:37:29 +02:00
Ajay Ramanathan
3e5b0d2ddd app: stable build 2013-09-10 00:15:42 +05:30
Ajay Ramanathan
42ae6366d9 commented out selectbycontentool] 2013-09-09 20:26:31 +05:30
Ajay Ramanathan
0aecb9ad7f app: selectbycontent file 2013-09-09 19:11:14 +05:30
Ajay Ramanathan
d67459f182 app: select by content header file 2013-09-09 18:17:48 +05:30
Ajay Ramanathan
b715ac919c app: selectbycontent added few header files 2013-09-08 12:55:16 +05:30
Ajay Ramanathan
de6052807c app:tools: options for content select 2013-09-08 11:33:52 +05:30
Ajay Ramanathan
c359df6348 app:selectbyshape Minor edits 2013-09-08 09:40:08 +05:30
Ajay Ramanathan
1b4283fe1b app:selectbyshape Polygon tool Comments added 2013-09-07 11:31:55 +05:30
Ajay Ramanathan
b8c9dd6c30 app:selectbyshape Polygon tool 2013-09-07 11:31:15 +05:30
Ajay Ramanathan
d05c9152bf app:gimp-tools removed selectbycontent from comment 2013-08-27 18:45:37 +05:30
Ajay Ramanathan
d86c80c336 app:too_draw added functions for othwer shapes 2013-08-27 18:25:16 +05:30
Ajay Ramanathan
f2f8e5d7db gimpselectbycontent 2013-08-24 18:38:27 +05:30
Ajay Ramanathan
e6f12791b9 app:gimpselectbycontent.h 2013-08-24 08:09:19 +05:30
Ajay Ramanathan
c355e6399a app:stable gimpselectbyshape 2013-08-23 10:41:06 +05:30
Ajay Ramanathan
03397ae9f9 app:Removed few backup files 2013-08-23 10:23:42 +05:30
Ajay Ramanathan
016669bfa6 app: selectbyshapetool added base functions 2013-07-26 18:37:59 +05:30
Ajay Ramanathan
6247c0790c app:added lines in selectbyshape 2013-07-21 16:06:43 +05:30
Ajay Ramanathan
fb40054eed app:deleted some backup files 2013-07-21 15:16:36 +05:30
Ajay Ramanathan
814add81dc app: created backup error copy 2013-07-21 15:15:32 +05:30
Ajay Ramanathan
31b14c2cbf Created a backup of gimpselectbyshapetool 2013-07-15 08:52:45 +05:30
Ajay Ramanathan
0f2d1c1c99 app: Selectbyshape:tool_draw Commented out some code 2013-07-15 08:45:04 +05:30
Ajay Ramanathan
cfb39e6df3 app: gimp_select_by_shape_tool_draw added new features 2013-07-13 12:14:54 +05:30
Ajay Ramanathan
c2d8e13780 app:selectbyshape Single row select tool 2013-07-09 07:58:53 +05:30
Ajay Ramanathan
094e575bab app:Single Row selection tool 2013-07-09 06:50:44 +05:30
Ajay Ramanathan
72c909441d app:added function for single row selection tool 2013-07-05 19:28:17 +05:30
Ajay Ramanathan
67551bd0cd po:POTFILES.in added file; corrected error 2013-07-01 21:16:22 +05:30
Ajay Ramanathan
c5e603d988 po: Edited POTFILES.in 2013-06-30 09:56:12 +05:30
Ajay Ramanathan
ca57ccbf65 app:Some small changes in selectbyshape.c 2013-06-28 11:38:21 +05:30
Ajay Ramanathan
428ce9a129 app:add line_orientation; to the list of options 2013-06-26 19:42:40 +05:30
Ajay Ramanathan
56cf78b1f1 app:changed he rounded radius into percentage 2013-06-26 19:40:12 +05:30
Ajay Ramanathan
087507a495 app:Solved Bug; switch case goes to default 2013-06-26 01:55:57 +05:30
Ajay Ramanathan
c482cd2b91 app:corrected some bugs 2013-06-25 21:24:27 +05:30
Ajay Ramanathan
bfca31d4d3 app:Added scale for rounded radius and n-polygon 2013-06-25 17:25:21 +05:30
Ajay Ramanathan
6d8e91774a devel-docs & enumgen.pl edited files 2013-06-25 14:06:46 +05:30
Ajay Ramanathan
055c3f33a3 app:added enum in core-enums and edited rectangleselectoptions 2013-06-25 13:41:11 +05:30
Ajay Ramanathan
9edbb1e174 app:Solved warning; unintiated toggle 2013-06-25 13:35:01 +05:30
Ajay Ramanathan
d97ee14868 Added new Ui options inside rectangleselectoptions gimpregionselectoptions 2013-06-23 15:41:04 +05:30
Ajay Ramanathan
e225fa7eb5 Arranged Makefil.am Alphabetically 2013-06-23 15:33:10 +05:30
Ajay Ramanathan
e5594a461c Added new tools in gimphelp-ids.h & linked pngs to function 2013-06-23 15:08:55 +05:30
Ajay Ramanathan
aba9fd7656 Edited Makefile.am and gimp-tools.c 2013-06-23 14:59:04 +05:30
Ajay Ramanathan
a3d6b03a6f Add New pngs and edit Makefiles.am 2013-06-23 14:54:42 +05:30
Ajay Ramanathan
637052d545 Added files; .c & .h for the new tools 2013-06-23 14:50:32 +05:30
33 changed files with 5393 additions and 295 deletions

View File

@@ -8,6 +8,41 @@
#include "gimp-intl.h"
/* enumerations from "./core-enums.h" */
GType
gimp_shape_type_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_SHAPE_RECTANGLE, "GIMP_SHAPE_RECTANGLE", "rectangle" },
{ GIMP_SHAPE_ELLIPSE, "GIMP_SHAPE_ELLIPSE", "ellipse" },
{ GIMP_SHAPE_ROUNDED_RECT, "GIMP_SHAPE_ROUNDED_RECT", "rounded-rect" },
{ GIMP_SHAPE_N_POLYGON, "GIMP_SHAPE_N_POLYGON", "n-polygon" },
{ GIMP_SHAPE_SINGLE_ROW, "GIMP_SHAPE_SINGLE_ROW", "single-row" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_SHAPE_RECTANGLE, "GIMP_SHAPE_RECTANGLE", NULL },
{ GIMP_SHAPE_ELLIPSE, "GIMP_SHAPE_ELLIPSE", NULL },
{ GIMP_SHAPE_ROUNDED_RECT, "GIMP_SHAPE_ROUNDED_RECT", NULL },
{ GIMP_SHAPE_N_POLYGON, "GIMP_SHAPE_N_POLYGON", NULL },
{ GIMP_SHAPE_SINGLE_ROW, "GIMP_SHAPE_SINGLE_ROW", NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpShapeType", values);
gimp_type_set_translation_context (type, "shape-type");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_component_mask_get_type (void)
{

View File

@@ -34,7 +34,18 @@
/*
* these enums are registered with the type system
*/
#define GIMP_TYPE_SHAPE_TYPE (gimp_shape_type_get_type ())
GType gimp_shape_type_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_SHAPE_RECTANGLE,
GIMP_SHAPE_ELLIPSE,
GIMP_SHAPE_ROUNDED_RECT,
GIMP_SHAPE_N_POLYGON,
GIMP_SHAPE_SINGLE_ROW
} GimpShapeType;
#define GIMP_TYPE_COMPONENT_MASK (gimp_component_mask_get_type ())

View File

@@ -166,6 +166,12 @@ libapptools_a_sources = \
gimpseamlesscloneoptions.h \
gimpseamlessclonetool.c \
gimpseamlessclonetool.h \
gimpselectbycolortool.c \
gimpselectbycolortool.h \
gimpselectbycontenttool.c \
gimpselectbycontenttool.h \
gimpselectbyshapetool.c \
gimpselectbyshapetool.h \
gimpselectionoptions.c \
gimpselectionoptions.h \
gimpselectiontool.c \

View File

@@ -79,6 +79,9 @@
#include "gimprectangleselecttool.h"
#include "gimprotatetool.h"
#include "gimpseamlessclonetool.h"
#include "gimpselectbycolortool.h"
#include "gimpselectbyshapetool.h"
#include "gimpselectbycontenttool.h"
#include "gimpscaletool.h"
#include "gimpsheartool.h"
#include "gimpsmudgetool.h"
@@ -181,12 +184,15 @@ gimp_tools_init (Gimp *gimp)
gimp_foreground_select_tool_register,
#if 0
gimp_iscissors_tool_register,
gimp_select_by_content_tool_register,
#endif
gimp_by_color_select_tool_register,
gimp_fuzzy_select_tool_register,
gimp_free_select_tool_register,
gimp_ellipse_select_tool_register,
gimp_rectangle_select_tool_register
gimp_rectangle_select_tool_register,
gimp_select_by_color_tool_register,
gimp_select_by_shape_tool_register
};
GList *default_order = NULL;

View File

@@ -25,10 +25,16 @@
#include "tools-types.h"
#include "config/gimpcoreconfig.h"
#include "core/gimp.h"
#include "core/gimptoolinfo.h"
#include "widgets/gimppropwidgets.h"
#include "gimpiscissorstool.h"
#include "gimpiscissorsoptions.h"
#include "gimpselectbycontenttool.h"
#include "gimp-intl.h"
@@ -36,7 +42,8 @@
enum
{
PROP_0,
PROP_INTERACTIVE
PROP_INTERACTIVE,
PROP_MAGNETIC
};
@@ -70,6 +77,13 @@ gimp_iscissors_options_class_init (GimpIscissorsOptionsClass *klass)
"as you drag a control node"),
FALSE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_MAGNETIC,
"magnetic",
N_("Make the selection magnetic "
"as you drag a control node"),
FALSE,
GIMP_PARAM_STATIC_STRINGS);
}
static void
@@ -91,6 +105,10 @@ gimp_iscissors_options_set_property (GObject *object,
options->interactive = g_value_get_boolean (value);
break;
case PROP_MAGNETIC:
options->magnetic = g_value_get_boolean (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -111,6 +129,10 @@ gimp_iscissors_options_get_property (GObject *object,
g_value_set_boolean (value, options->interactive);
break;
case PROP_MAGNETIC:
options->magnetic = g_value_get_boolean (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -123,11 +145,28 @@ gimp_iscissors_options_gui (GimpToolOptions *tool_options)
GObject *config = G_OBJECT (tool_options);
GtkWidget *vbox = gimp_selection_options_gui (tool_options);
GtkWidget *button;
GtkWidget *frame;
button = gimp_prop_check_button_new (config, "interactive",
GType tool_type;
tool_type = tool_options->tool_info->tool_type;
/*if (g_type_is_a (tool_type, GIMP_TYPE_SELECT_BY_CONTENT_TOOL))
{
button = gimp_prop_check_button_new (config, "interactive",
_("Interactive boundary"));
frame = gimp_prop_expanding_frame_new (config, "magnetic",
_("Magnetic Path"),
button, NULL);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
}*/
button = gimp_prop_check_button_new (config, "interactive",
_("Interactive boundary"));
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
return vbox;
}

View File

@@ -38,6 +38,7 @@ struct _GimpIscissorsOptions
GimpSelectionOptions parent_instance;
gboolean interactive;
gboolean magnetic;
};

View File

@@ -25,14 +25,18 @@
#include "tools-types.h"
#include "core/gimp.h"
#include "core/gimptoolinfo.h"
#include "config/gimpcoreconfig.h"
#include "widgets/gimppropwidgets.h"
#include "widgets/gimpwidgets-utils.h"
#include "gimprectangleoptions.h"
#include "gimprectangleselectoptions.h"
#include "gimprectangleselecttool.h"
#include "gimptooloptions-gui.h"
#include "gimpselectbyshapetool.h"
#include "gimp-intl.h"
@@ -40,7 +44,10 @@
enum
{
PROP_ROUND_CORNERS = GIMP_RECTANGLE_OPTIONS_PROP_LAST + 1,
PROP_CORNER_RADIUS
PROP_CORNER_RADIUS,
PROP_SHAPE_TYPE,
PROP_LINE_ORIENTATION,
PROP_N_SIDES
};
@@ -91,6 +98,26 @@ gimp_rectangle_select_options_class_init (GimpRectangleSelectOptionsClass *klass
0.0, 100.0, 5.0,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_SHAPE_TYPE,
"shape-type",
N_("Select shape of the selection"),
GIMP_TYPE_SHAPE_TYPE,
GIMP_SHAPE_RECTANGLE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_LINE_ORIENTATION,
"line-orientation",
N_("Choice between horizontal and vertical"),
GIMP_TYPE_ORIENTATION_TYPE,
GIMP_ORIENTATION_HORIZONTAL,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_INT (object_class, PROP_N_SIDES,
"n-sides",
N_("Number of sides, in the polygon"),
0, 8, 1,
GIMP_PARAM_STATIC_STRINGS);
gimp_rectangle_options_install_properties (object_class);
}
@@ -117,6 +144,18 @@ gimp_rectangle_select_options_set_property (GObject *object,
options->corner_radius = g_value_get_double (value);
break;
case PROP_SHAPE_TYPE:
options->shape_type = g_value_get_enum (value);
break;
case PROP_LINE_ORIENTATION:
options->line_orientation = g_value_get_enum (value);
break;
case PROP_N_SIDES:
options->n_sides = g_value_get_int (value);
break;
default:
gimp_rectangle_options_set_property (object, property_id, value, pspec);
break;
@@ -141,24 +180,53 @@ gimp_rectangle_select_options_get_property (GObject *object,
g_value_set_double (value, options->corner_radius);
break;
case PROP_SHAPE_TYPE:
g_value_set_enum (value, options->shape_type);
break;
case PROP_LINE_ORIENTATION:
g_value_set_enum (value, options->line_orientation);
break;
case PROP_N_SIDES:
g_value_set_int (value, options->n_sides);
break;
default:
gimp_rectangle_options_get_property (object, property_id, value, pspec);
break;
}
}
static gboolean
gimp_select_by_shape_options_shape_type(GBinding *binding,
const GValue *source_value,
GValue *target_value,
gpointer user_data)
{
gint type = g_value_get_enum (source_value);
g_value_set_boolean (target_value,
type == GPOINTER_TO_INT (user_data));
return TRUE;
}
GtkWidget *
gimp_rectangle_select_options_gui (GimpToolOptions *tool_options)
{
GObject *config = G_OBJECT (tool_options);
GtkWidget *vbox = gimp_selection_options_gui (tool_options);
GtkWidget *combo;
GtkWidget *frame;
GtkWidget *scale;
GtkWidget *inner_vbox;
/* the round corners frame */
if (tool_options->tool_info->tool_type == GIMP_TYPE_RECTANGLE_SELECT_TOOL)
{
GtkWidget *frame;
GtkWidget *scale;
GtkWidget *toggle;
scale = gimp_prop_spin_scale_new (config, "corner-radius",
_("Radius"),
@@ -177,14 +245,72 @@ gimp_rectangle_select_options_gui (GimpToolOptions *tool_options)
G_BINDING_SYNC_CREATE);
}
/* the rectangle options */
{
GtkWidget *vbox_rectangle;
/* for select by shape tool */
if (tool_options->tool_info->tool_type == GIMP_TYPE_SELECT_BY_SHAPE_TOOL)
{
combo = gimp_prop_enum_combo_box_new (config, "shape-type", 0, 0);
gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Shape"));
g_object_set (combo, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
gtk_box_pack_start (GTK_BOX (vbox), combo, TRUE, TRUE, 0);
gtk_widget_show (combo);
vbox_rectangle = gimp_rectangle_options_gui (tool_options);
gtk_box_pack_start (GTK_BOX (vbox), vbox_rectangle, FALSE, FALSE, 0);
gtk_widget_show (vbox_rectangle);
}
frame = gimp_frame_new (NULL);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
return vbox;
inner_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
gtk_container_add (GTK_CONTAINER (frame), inner_vbox);
gtk_widget_show (inner_vbox);
scale = gimp_prop_spin_scale_new (config, "corner-radius",
_("Radius"),
1.0, 10.0, 1);
gtk_box_pack_start (GTK_BOX (inner_vbox), scale, FALSE, FALSE, 0);
g_object_bind_property_full (config, "shape-type",
scale, "visible",
G_BINDING_SYNC_CREATE,
gimp_select_by_shape_options_shape_type,
NULL,
GINT_TO_POINTER (GIMP_SHAPE_ROUNDED_RECT),
NULL);
scale = gimp_prop_spin_scale_new (config, "n-sides",
_("Number of Sides in Polygon ?"),
1.0, 10.0, 1);
gtk_box_pack_start (GTK_BOX (inner_vbox), scale, TRUE, TRUE, 0);
g_object_bind_property_full (config, "shape-type",
scale, "visible",
G_BINDING_SYNC_CREATE,
gimp_select_by_shape_options_shape_type,
NULL,
GINT_TO_POINTER (GIMP_SHAPE_N_POLYGON),
NULL);
combo = gimp_prop_enum_combo_box_new (config, "line_orientation", 0, 0);
gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Line Orientation"));
g_object_set (combo, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
gtk_box_pack_start (GTK_BOX (vbox), combo, TRUE, TRUE, 0);
gtk_widget_show (combo);
g_object_bind_property_full (config, "shape-type",
combo, "visible",
G_BINDING_SYNC_CREATE,
gimp_select_by_shape_options_shape_type,
NULL,
GINT_TO_POINTER (GIMP_SHAPE_SINGLE_ROW),
NULL);
}
/* the rectangle options */
{
GtkWidget *vbox_rectangle;
vbox_rectangle = gimp_rectangle_options_gui (tool_options);
gtk_box_pack_start (GTK_BOX (vbox), vbox_rectangle, FALSE, FALSE, 0);
gtk_widget_show (vbox_rectangle);
}
return vbox;
}

View File

@@ -39,6 +39,9 @@ struct _GimpRectangleSelectOptions
gboolean round_corners;
gdouble corner_radius;
gint n_sides;
GimpShapeType shape_type;
GimpOrientationType line_orientation;
};

View File

@@ -1,227 +1,304 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995-1999 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 <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpconfig/gimpconfig.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "tools-types.h"
#include "config/gimpcoreconfig.h"
#include "core/gimp.h"
#include "core/gimptoolinfo.h"
#include "widgets/gimppropwidgets.h"
#include "widgets/gimpwidgets-utils.h"
#include "gimpregionselectoptions.h"
#include "gimpregionselecttool.h"
#include "gimp-intl.h"
enum
{
PROP_0,
PROP_SELECT_TRANSPARENT,
PROP_SAMPLE_MERGED,
PROP_THRESHOLD,
PROP_SELECT_CRITERION
};
static void gimp_region_select_options_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_region_select_options_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_region_select_options_reset (GimpToolOptions *tool_options);
G_DEFINE_TYPE (GimpRegionSelectOptions, gimp_region_select_options,
GIMP_TYPE_SELECTION_OPTIONS)
#define parent_class gimp_region_select_options_parent_class
static void
gimp_region_select_options_class_init (GimpRegionSelectOptionsClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpToolOptionsClass *options_class = GIMP_TOOL_OPTIONS_CLASS (klass);
object_class->set_property = gimp_region_select_options_set_property;
object_class->get_property = gimp_region_select_options_get_property;
options_class->reset = gimp_region_select_options_reset;
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SELECT_TRANSPARENT,
"select-transparent",
N_("Allow completely transparent regions "
"to be selected"),
TRUE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SAMPLE_MERGED,
"sample-merged",
N_("Base selection on all visible layers"),
FALSE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_THRESHOLD,
"threshold",
N_("Maximum color difference"),
0.0, 255.0, 15.0,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_SELECT_CRITERION,
"select-criterion",
N_("Selection criterion"),
GIMP_TYPE_SELECT_CRITERION,
GIMP_SELECT_CRITERION_COMPOSITE,
GIMP_PARAM_STATIC_STRINGS);
}
static void
gimp_region_select_options_init (GimpRegionSelectOptions *options)
{
}
static void
gimp_region_select_options_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
GimpRegionSelectOptions *options = GIMP_REGION_SELECT_OPTIONS (object);
switch (property_id)
{
case PROP_SELECT_TRANSPARENT:
options->select_transparent = g_value_get_boolean (value);
break;
case PROP_SAMPLE_MERGED:
options->sample_merged = g_value_get_boolean (value);
break;
case PROP_THRESHOLD:
options->threshold = g_value_get_double (value);
break;
case PROP_SELECT_CRITERION:
options->select_criterion = g_value_get_enum (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static void
gimp_region_select_options_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
GimpRegionSelectOptions *options = GIMP_REGION_SELECT_OPTIONS (object);
switch (property_id)
{
case PROP_SELECT_TRANSPARENT:
g_value_set_boolean (value, options->select_transparent);
break;
case PROP_SAMPLE_MERGED:
g_value_set_boolean (value, options->sample_merged);
break;
case PROP_THRESHOLD:
g_value_set_double (value, options->threshold);
break;
case PROP_SELECT_CRITERION:
g_value_set_enum (value, options->select_criterion);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static void
gimp_region_select_options_reset (GimpToolOptions *tool_options)
{
GParamSpec *pspec;
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (tool_options),
"threshold");
if (pspec)
G_PARAM_SPEC_DOUBLE (pspec)->default_value =
tool_options->tool_info->gimp->config->default_threshold;
GIMP_TOOL_OPTIONS_CLASS (parent_class)->reset (tool_options);
}
GtkWidget *
gimp_region_select_options_gui (GimpToolOptions *tool_options)
{
GObject *config = G_OBJECT (tool_options);
GtkWidget *vbox = gimp_selection_options_gui (tool_options);
GtkWidget *button;
GtkWidget *scale;
GtkWidget *combo;
/* the select transparent areas toggle */
button = gimp_prop_check_button_new (config, "select-transparent",
_("Select transparent areas"));
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
/* the sample merged toggle */
button = gimp_prop_check_button_new (config, "sample-merged",
_("Sample merged"));
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
/* the threshold scale */
scale = gimp_prop_spin_scale_new (config, "threshold",
_("Threshold"),
1.0, 16.0, 1);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
/* the select criterion combo */
combo = gimp_prop_enum_combo_box_new (config, "select-criterion", 0, 0);
gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Select by"));
gtk_box_pack_start (GTK_BOX (vbox), combo, TRUE, TRUE, 0);
gtk_widget_show (combo);
return vbox;
}
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995-1999 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 <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpconfig/gimpconfig.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "tools-types.h"
#include "config/gimpcoreconfig.h"
#include "core/gimp.h"
#include "core/gimptoolinfo.h"
#include "widgets/gimppropwidgets.h"
#include "widgets/gimpwidgets-utils.h"
#include "gimpregionselectoptions.h"
#include "gimpregionselecttool.h"
#include "gimpselectbycolortool.h"
#include "gimp-intl.h"
enum
{
PROP_0,
PROP_SELECT_TRANSPARENT,
PROP_SAMPLE_MERGED,
PROP_THRESHOLD,
PROP_CONTINUOUS, //continuous
PROP_SELECT_CRITERION,
PROP_MULTIPLE_COLOR,
PROP_BRUSH_SIZE
};
static void gimp_region_select_options_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_region_select_options_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_region_select_options_reset (GimpToolOptions *tool_options);
G_DEFINE_TYPE (GimpRegionSelectOptions, gimp_region_select_options,
GIMP_TYPE_SELECTION_OPTIONS)
#define parent_class gimp_region_select_options_parent_class
static void
gimp_region_select_options_class_init (GimpRegionSelectOptionsClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpToolOptionsClass *options_class = GIMP_TOOL_OPTIONS_CLASS (klass);
object_class->set_property = gimp_region_select_options_set_property;
object_class->get_property = gimp_region_select_options_get_property;
options_class->reset = gimp_region_select_options_reset;
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SELECT_TRANSPARENT,
"select-transparent",
N_("Allow completely transparent regions "
"to be selected"),
TRUE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SAMPLE_MERGED,
"sample-merged",
N_("Base selection on all visible layers"),
FALSE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_THRESHOLD,
"threshold",
N_("Maximum color difference"),
0.0, 255.0, 15.0,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_CONTINUOUS,
"continuous",
N_("Select only continuous region"),
FALSE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_SELECT_CRITERION,
"select-criterion",
N_("Selection criterion"),
GIMP_TYPE_SELECT_CRITERION,
GIMP_SELECT_CRITERION_COMPOSITE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_MULTIPLE_COLOR,
"multiple-color",
N_("Allows multiple color"),
FALSE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_BRUSH_SIZE,
"brush-size",
N_("Radius of Brush"),
0.0, 6000.0, 10.0,
GIMP_PARAM_STATIC_STRINGS);
}
static void
gimp_region_select_options_init (GimpRegionSelectOptions *options)
{
}
static void
gimp_region_select_options_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
GimpRegionSelectOptions *options = GIMP_REGION_SELECT_OPTIONS (object);
switch (property_id)
{
case PROP_SELECT_TRANSPARENT:
options->select_transparent = g_value_get_boolean (value);
break;
case PROP_SAMPLE_MERGED:
options->sample_merged = g_value_get_boolean (value);
break;
case PROP_THRESHOLD:
options->threshold = g_value_get_double (value);
break;
case PROP_CONTINUOUS:
options->continuous = g_value_get_boolean (value);
break;
case PROP_SELECT_CRITERION:
options->select_criterion = g_value_get_enum (value);
break;
case PROP_MULTIPLE_COLOR:
options->multiple_color = g_value_get_boolean (value);
break;
case PROP_BRUSH_SIZE:
options->brush_size = g_value_get_double (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static void
gimp_region_select_options_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
GimpRegionSelectOptions *options = GIMP_REGION_SELECT_OPTIONS (object);
switch (property_id)
{
case PROP_SELECT_TRANSPARENT:
g_value_set_boolean (value, options->select_transparent);
break;
case PROP_SAMPLE_MERGED:
g_value_set_boolean (value, options->sample_merged);
break;
case PROP_THRESHOLD:
g_value_set_double (value, options->threshold);
break;
case PROP_CONTINUOUS:
g_value_set_boolean (value, options->continuous);
break;
case PROP_SELECT_CRITERION:
g_value_set_enum (value, options->select_criterion);
break;
case PROP_MULTIPLE_COLOR:
g_value_set_boolean (value, options->multiple_color);
break;
case PROP_BRUSH_SIZE:
g_value_set_double (value, options->brush_size);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static void
gimp_region_select_options_reset (GimpToolOptions *tool_options)
{
GParamSpec *pspec;
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (tool_options),
"threshold");
if (pspec)
G_PARAM_SPEC_DOUBLE (pspec)->default_value =
tool_options->tool_info->gimp->config->default_threshold;
GIMP_TOOL_OPTIONS_CLASS (parent_class)->reset (tool_options);
}
GtkWidget *
gimp_region_select_options_gui (GimpToolOptions *tool_options)
{
GObject *config = G_OBJECT (tool_options);
GtkWidget *vbox = gimp_selection_options_gui (tool_options);
GtkWidget *button;
GtkWidget *scale;
GtkWidget *combo;
GType tool_type;
tool_type = tool_options->tool_info->tool_type;
/* the select transparent areas toggle */
button = gimp_prop_check_button_new (config, "select-transparent",
_("Select transparent areas"));
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
/* the sample merged toggle */
button = gimp_prop_check_button_new (config, "sample-merged",
_("Sample merged"));
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
/* the threshold scale */
scale = gimp_prop_spin_scale_new (config, "threshold",
_("Threshold"),
1.0, 16.0, 1);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
if (g_type_is_a (tool_type, GIMP_TYPE_SELECT_BY_COLOR_TOOL))
{
GtkWidget *frame;
/* the continuous toggle */
button = gimp_prop_check_button_new (config, "continuous",
_("Continuous"));
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
/*multiple color*/
scale = gimp_prop_spin_scale_new (config, "brush-size",
_("Brush Size"),
1.0, 10.0, 1);
frame = gimp_prop_expanding_frame_new (config, "multiple-color",
_("Multiple Color"),
scale, NULL);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);;
}
/* the select criterion combo */
combo = gimp_prop_enum_combo_box_new (config, "select-criterion", 0, 0);
gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Select by"));
gtk_box_pack_start (GTK_BOX (vbox), combo, TRUE, TRUE, 0);
gtk_widget_show (combo);
return vbox;
}

View File

@@ -1,52 +1,55 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995-1999 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 <http://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_REGION_SELECT_OPTIONS_H__
#define __GIMP_REGION_SELECT_OPTIONS_H__
#include "gimpselectionoptions.h"
#define GIMP_TYPE_REGION_SELECT_OPTIONS (gimp_region_select_options_get_type ())
#define GIMP_REGION_SELECT_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_REGION_SELECT_OPTIONS, GimpRegionSelectOptions))
#define GIMP_REGION_SELECT_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_REGION_SELECT_OPTIONS, GimpRegionSelectOptionsClass))
#define GIMP_IS_REGION_SELECT_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_REGION_SELECT_OPTIONS))
#define GIMP_IS_REGION_SELECT_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_REGION_SELECT_OPTIONS))
#define GIMP_REGION_SELECT_OPTIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_REGION_SELECT_OPTIONS, GimpRegionSelectOptionsClass))
typedef struct _GimpRegionSelectOptions GimpRegionSelectOptions;
typedef struct _GimpToolOptionsClass GimpRegionSelectOptionsClass;
struct _GimpRegionSelectOptions
{
GimpSelectionOptions parent_instance;
gboolean select_transparent;
gboolean sample_merged;
gdouble threshold;
GimpSelectCriterion select_criterion;
};
GType gimp_region_select_options_get_type (void) G_GNUC_CONST;
GtkWidget * gimp_region_select_options_gui (GimpToolOptions *tool_options);
#endif /* __GIMP_REGION_SELECT_OPTIONS_H__ */
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995-1999 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 <http://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_REGION_SELECT_OPTIONS_H__
#define __GIMP_REGION_SELECT_OPTIONS_H__
#include "gimpselectionoptions.h"
#define GIMP_TYPE_REGION_SELECT_OPTIONS (gimp_region_select_options_get_type ())
#define GIMP_REGION_SELECT_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_REGION_SELECT_OPTIONS, GimpRegionSelectOptions))
#define GIMP_REGION_SELECT_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_REGION_SELECT_OPTIONS, GimpRegionSelectOptionsClass))
#define GIMP_IS_REGION_SELECT_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_REGION_SELECT_OPTIONS))
#define GIMP_IS_REGION_SELECT_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_REGION_SELECT_OPTIONS))
#define GIMP_REGION_SELECT_OPTIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_REGION_SELECT_OPTIONS, GimpRegionSelectOptionsClass))
typedef struct _GimpRegionSelectOptions GimpRegionSelectOptions;
typedef struct _GimpToolOptionsClass GimpRegionSelectOptionsClass;
struct _GimpRegionSelectOptions
{
GimpSelectionOptions parent_instance;
gboolean select_transparent;
gboolean sample_merged;
gdouble threshold;
gboolean continuous;
GimpSelectCriterion select_criterion;
gboolean multiple_color;
gdouble brush_size;
};
GType gimp_region_select_options_get_type (void) G_GNUC_CONST;
GtkWidget * gimp_region_select_options_gui (GimpToolOptions *tool_options);
#endif /* __GIMP_REGION_SELECT_OPTIONS_H__ */

View File

@@ -0,0 +1,151 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpselectbycolortool.c
*
* 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 <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <string.h>
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpcolor/gimpcolor.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "tools-types.h"
#include "core/gimpimage.h"
#include "core/gimpimage-contiguous-region.h"
#include "core/gimpitem.h"
#include "core/gimppickable.h"
#include "widgets/gimphelp-ids.h"
#include "display/gimpdisplay.h"
#include "gimpselectbycolortool.h"
#include "gimpregionselectoptions.h"
#include "gimptoolcontrol.h"
#include "gimp-intl.h"
static GeglBuffer * gimp_select_by_color_tool_get_mask (GimpRegionSelectTool *region_select,
GimpDisplay *display);
G_DEFINE_TYPE (GimpSelectByColorTool, gimp_select_by_color_tool,
GIMP_TYPE_REGION_SELECT_TOOL)
#define parent_class gimp_select_by_color_tool_parent_class
void
gimp_select_by_color_tool_register (GimpToolRegisterCallback callback,
gpointer data)
{
(* callback) (GIMP_TYPE_SELECT_BY_COLOR_TOOL,
GIMP_TYPE_REGION_SELECT_OPTIONS,
gimp_region_select_options_gui,
0,
"gimp-select_by_color-tool",
_("Select by Color"),
_("Select by Color Tool: Select regions with similar colors; Both Over Continous and Closed Place"),
N_("_Select By Color"), "<shift>X",
NULL, GIMP_HELP_TOOL_SELECT_BY_COLOR,
GIMP_STOCK_TOOL_SELECT_BY_COLOR,
data);
}
static void
gimp_select_by_color_tool_class_init (GimpSelectByColorToolClass *klass)
{
GimpRegionSelectToolClass *region_class;
region_class = GIMP_REGION_SELECT_TOOL_CLASS (klass);
region_class->undo_desc = C_("command", "Select by Color");
region_class->get_mask = gimp_select_by_color_tool_get_mask;
}
static void
gimp_select_by_color_tool_init (GimpSelectByColorTool *select_by_color)
{
GimpTool *tool = GIMP_TOOL (select_by_color);
gimp_tool_control_set_tool_cursor (tool->control, GIMP_TOOL_CURSOR_HAND);
}
static GeglBuffer *
gimp_select_by_color_tool_get_mask (GimpRegionSelectTool *region_select,
GimpDisplay *display)
{
GimpTool *tool = GIMP_TOOL (region_select);
GimpSelectionOptions *sel_options = GIMP_SELECTION_TOOL_GET_OPTIONS (tool);
GimpRegionSelectOptions *options = GIMP_REGION_SELECT_TOOL_GET_OPTIONS (tool);
GimpImage *image = gimp_display_get_image (display);
GimpDrawable *drawable = gimp_image_get_active_drawable (image);
GimpPickable *pickable;
GimpRGB color;
gint x, y;
x = region_select->x;
y = region_select->y;
if (! options->sample_merged)
{
gint off_x, off_y;
gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y);
x -= off_x;
y -= off_y;
pickable = GIMP_PICKABLE (drawable);
}
else
{
pickable = GIMP_PICKABLE (gimp_image_get_projection (image));
}
gimp_pickable_flush (pickable);
if(! options->continuous)
{
return gimp_image_contiguous_region_by_seed (image, drawable,
options->sample_merged,
sel_options->antialias,
options->threshold / 255.0,
options->select_transparent,
options->select_criterion,
x, y);
}
else
{
if (gimp_pickable_get_color_at (pickable, x, y, &color))
return gimp_image_contiguous_region_by_color (image, drawable,
options->sample_merged,
sel_options->antialias,
options->threshold / 255.0,
options->select_transparent,
options->select_criterion,
&color);
return NULL;
}
}

View File

@@ -0,0 +1,55 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpselectbycolortool.h
*
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_SELECT_BY_COLOR_TOOL_H__
#define __GIMP_SELECT_BY_COLOR_TOOL_H__
#include "gimpregionselecttool.h"
#define GIMP_TYPE_SELECT_BY_COLOR_TOOL (gimp_select_by_color_tool_get_type ())
#define GIMP_SELECT_BY_COLOR_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_SELECT_BY_COLOR_TOOL, GimpSelectByColorTool))
#define GIMP_SELECT_BY_COLOR_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_SELECT_BY_COLOR_TOOL, GimpSelectByColorToolClass))
#define GIMP_IS_SELECT_BY_COLOR_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_SELECT_BY_COLOR_TOOL))
#define GIMP_IS_SELECT_BY_COLOR_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_SELECT_BY_COLOR_TOOL))
#define GIMP_SELECT_BY_COLOR_TOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_SELECT_BY_COLOR_TOOL, GimpSelectByColorToolClass))
typedef struct _GimpSelectByColorTool GimpSelectByColorTool;
typedef struct _GimpSelectByColorToolClass GimpSelectByColorToolClass;
struct _GimpSelectByColorTool
{
GimpRegionSelectTool parent_instance;
};
struct _GimpSelectByColorToolClass
{
GimpRegionSelectToolClass parent_class;
};
void gimp_select_by_color_tool_register (GimpToolRegisterCallback callback,
gpointer data);
GType gimp_select_by_color_tool_get_type (void) G_GNUC_CONST;
#endif /* __GIMP_SELECT_BY_COLOR_TOOL_H__ */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,114 @@
/* GIMP - The GNU Image Manipulation Program
* 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 <http://www.gnu.org/licenses/>.
*/
#if 0
#ifndef __GIMP_SELECT_BY_CONTENT_TOOL_H__
#define __GIMP_SELECT_BY_CONTENT_TOOL_H__
#include "gimpselectiontool.h"
/* The possible states... */
typedef enum
{
NO_ACTION,
SEED_PLACEMENT,
SEED_ADJUSTMENT,
WAITING
} SelectByContentState;
/* For oper_update & cursor_update */
typedef enum
{
ISCISSORS_OP_NONE,
ISCISSORS_OP_SELECT,
ISCISSORS_OP_MOVE_POINT,
ISCISSORS_OP_ADD_POINT,
ISCISSORS_OP_CONNECT,
ISCISSORS_OP_IMPOSSIBLE
} SelectByContentOps;
typedef struct _ICurve ICurve;
#define GIMP_TYPE_SELECT_BY_CONTENT_TOOL (gimp_select_by_content_tool_get_type ())
#define GIMP_SELECT_BY_CONTENT_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_SELECT_BY_CONTENT_TOOL, GimpSelectByContentTool))
#define GIMP_SELECT_BY_CONTENT_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_SELECT_BY_CONTENT_TOOL, GimpSelectByContentToolClass))
#define GIMP_IS_SELECT_BY_CONTENT_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_SELECT_BY_CONTENT_TOOL))
#define GIMP_IS_SELECT_BY_CONTENT_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_SELECT_BY_CONTENT_TOOL))
#define GIMP_SELECT_BY_CONTENT_TOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_SELECT_BY_CONTENT_TOOL, GimpSelectByContentToolClass))
#define GIMP_SELECT_BY_CONTENT_TOOL_GET_OPTIONS(t) (GIMP_SELECT_BY_CONTENT_OPTIONS (gimp_tool_get_options (GIMP_TOOL (t))))
typedef struct _GimpSelectByContentTool GimpSelectByContentTool;
typedef struct _GimpSelectByContentToolClass GimpSelectByContentToolClass;
struct _GimpSelectByContentTool
{
GimpSelectionTool parent_instance;
SelectByContentOps op;
gint x, y; /* upper left hand coordinate */
gint ix, iy; /* initial coordinates */
gint nx, ny; /* new coordinates */
TempBuf *dp_buf; /* dynamic programming buffer */
ICurve *livewire; /* livewire boundary curve */
ICurve *curve1; /* 1st curve connected to current point */
ICurve *curve2; /* 2nd curve connected to current point */
GQueue *curves; /* the list of curves */
gboolean first_point; /* is this the first point? */
gboolean connected; /* is the region closed? */
SelectByContentState state; /* state of iscissors */
/* XXX might be useful */
GimpChannel *mask; /* selection mask */
TileManager *gradient_map; /* lazily filled gradient map */
};
struct _GimpSelectByContentToolClass
{
GimpSelectionToolClass parent_class;
void (* select) (GimpSelectByContentTool *select_by_content_tool,
GimpDisplay *display);
};
void gimp_select_by_content_tool_register (GimpToolRegisterCallback callback,
gpointer data);
GType gimp_select_by_content_tool_get_type (void) G_GNUC_CONST;
void gimp_select_by_content_tool_select (GimpSelectByContentTool *free_sel,
GimpDisplay *display);
void gimp_select_by_content_tool_get_points (GimpSelectByContentTool *free_sel,
const GimpVector2 **points,
gint *n_points);
#endif /* __GIMP_SELECT_BY_CONTENT_TOOL_H__ */
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,64 @@
/* GIMP - The GNU Image Manipulation Program
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_SELECT_BY_SHAPE_TOOL_H__
#define __GIMP_SELECT_BY_SHAPE_TOOL_H__
#include "gimpselectiontool.h"
#define GIMP_TYPE_SELECT_BY_SHAPE_TOOL (gimp_select_by_shape_tool_get_type ())
#define GIMP_SELECT_BY_SHAPE_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_SELECT_BY_SHAPE_TOOL, GimpSelectByShapeTool))
#define GIMP_SELECT_BY_SHAPE_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_SELECT_BY_SHAPE_TOOL, GimpSelectByShapeToolClass))
#define GIMP_IS_SELECT_BY_SHAPE_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_SELECT_BY_SHAPE_TOOL))
#define GIMP_IS_SELECT_BY_SHAPE_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_SELECT_BY_SHAPE_TOOL))
#define GIMP_SELECT_BY_SHAPE_TOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_SELECT_BY_SHAPE_TOOL, GimpSelectByShapeToolClass))
#define GIMP_SELECT_BY_SHAPE_TOOL_GET_OPTIONS(t) (GIMP_RECTANGLE_SELECT_OPTIONS (gimp_tool_get_options (GIMP_TOOL (t))))
typedef struct _GimpSelectByShapeTool GimpSelectByShapeTool;
typedef struct _GimpSelectByShapeToolClass GimpSelectByShapeToolClass;
struct _GimpSelectByShapeTool
{
GimpSelectionTool parent_instance;
gpointer priv;
};
struct _GimpSelectByShapeToolClass
{
GimpSelectionToolClass parent_class;
void (* select) (GimpSelectByShapeTool *rect_select,
GimpChannelOps operation,
gint x,
gint y,
gint w,
gint h);
};
void gimp_select_by_shape_tool_register (GimpToolRegisterCallback callback,
gpointer data);
GType gimp_select_by_shape_tool_get_type (void) G_GNUC_CONST;
#endif /* __GIMP_SELECT_BY_SHAPE_TOOL_H__ */

View File

@@ -293,6 +293,9 @@
#define GIMP_HELP_TOOL_ROTATE "gimp-tool-rotate"
#define GIMP_HELP_TOOL_SCALE "gimp-tool-scale"
#define GIMP_HELP_TOOL_SEAMLESS_CLONE "gimp-tool-seamless-clone"
#define GIMP_HELP_TOOL_SELECT_BY_COLOR "gimp-tool-select-by-color"
#define GIMP_HELP_TOOL_SELECT_BY_CONTENT "gimp-tool-select-by-content"
#define GIMP_HELP_TOOL_SELECT_BY_SHAPE "gimp-tool-select-by-shape"
#define GIMP_HELP_TOOL_SHEAR "gimp-tool-shear"
#define GIMP_HELP_TOOL_SMUDGE "gimp-tool-smudge"
#define GIMP_HELP_TOOL_TEXT "gimp-tool-text"

View File

@@ -10865,6 +10865,7 @@ GimpOffsetType
GimpOrientationType
GimpRotationType
GimpSelectCriterion
GimpShapeType
GimpStrokeMethod
GimpThumbnailSize
GimpUndoEvent
@@ -10899,6 +10900,7 @@ GIMP_TYPE_OFFSET_TYPE
GIMP_TYPE_ORIENTATION_TYPE
GIMP_TYPE_ROTATION_TYPE
GIMP_TYPE_SELECT_CRITERION
GIMP_TYPE_SHAPE_TYPE
GIMP_TYPE_STROKE_METHOD
GIMP_TYPE_THUMBNAIL_SIZE
GIMP_TYPE_UNDO_EVENT
@@ -10932,6 +10934,7 @@ gimp_offset_type_get_type
gimp_orientation_type_get_type
gimp_rotation_type_get_type
gimp_select_criterion_get_type
gimp_shape_type_get_type
gimp_stroke_method_get_type
gimp_thumbnail_size_get_type
gimp_undo_event_get_type

View File

@@ -78,6 +78,7 @@ GimpOffsetType
GimpOrientationType
GimpRotationType
GimpSelectCriterion
GimpShapeType
gimp_enums_get_type_names
<SUBSECTION Standard>
GIMP_TYPE_BRUSH_APPLICATION_MODE
@@ -99,6 +100,7 @@ GIMP_TYPE_OFFSET_TYPE
GIMP_TYPE_ORIENTATION_TYPE
GIMP_TYPE_ROTATION_TYPE
GIMP_TYPE_SELECT_CRITERION
GIMP_TYPE_SHAPE_TYPE
gimp_brush_application_mode_get_type
gimp_brush_generated_shape_get_type
gimp_convert_dither_type_get_type
@@ -118,6 +120,7 @@ gimp_offset_type_get_type
gimp_orientation_type_get_type
gimp_rotation_type_get_type
gimp_select_criterion_get_type
gimp_shape_type_get_type
</SECTION>
<SECTION>

View File

@@ -746,6 +746,7 @@ EXPORTS
gimp_selection_shrink
gimp_selection_translate
gimp_selection_value
gimp_shape_type_get_type
gimp_shear
gimp_shm_ID
gimp_shm_addr

View File

@@ -48,6 +48,7 @@ static const GimpGetTypeFunc get_type_funcs[] =
gimp_rotation_type_get_type,
gimp_run_mode_get_type,
gimp_select_criterion_get_type,
gimp_shape_type_get_type,
gimp_size_type_get_type,
gimp_stack_trace_mode_get_type,
gimp_text_direction_get_type,
@@ -107,6 +108,7 @@ static const gchar * const type_names[] =
"GimpRotationType",
"GimpRunMode",
"GimpSelectCriterion",
"GimpShapeType",
"GimpSizeType",
"GimpStackTraceMode",
"GimpTextDirection",

View File

@@ -319,6 +319,20 @@ typedef enum
} GimpSelectCriterion;
#define GIMP_TYPE_SHAPE_TYPE (gimp_shape_type_get_type ())
GType gimp_shape_type_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_SHAPE_RECTANGLE,
GIMP_SHAPE_ELLIPSE,
GIMP_SHAPE_ROUNDED_RECT,
GIMP_SHAPE_N_POLYGON,
GIMP_SHAPE_SINGLE_ROW
} GimpShapeType;
void gimp_enums_init (void);
const gchar ** gimp_enums_get_type_names (gint *n_type_names);

View File

@@ -339,6 +339,9 @@ static const GtkStockItem gimp_stock_items[] =
{ GIMP_STOCK_TOOL_ROTATE, N_("_Rotate"), 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_SCALE, N_("_Scale"), 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_SEAMLESS_CLONE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_SELECT_BY_COLOR, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_SELECT_BY_SHAPE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_SELECT_BY_CONTENT, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_SHEAR, N_("_Shear"), 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_SMUDGE, NULL, 0, 0, LIBGIMP_DOMAIN },
{ GIMP_STOCK_TOOL_TEXT, NULL, 0, 0, LIBGIMP_DOMAIN },
@@ -497,6 +500,9 @@ gimp_stock_button_pixbufs[] =
{ GIMP_STOCK_TOOL_ROTATE, stock_tool_rotate_22 },
{ GIMP_STOCK_TOOL_SCALE, stock_tool_scale_22 },
{ GIMP_STOCK_TOOL_SEAMLESS_CLONE, stock_tool_clone_22 },
{ GIMP_STOCK_TOOL_SELECT_BY_COLOR, stock_tool_select_by_color_22 },
{ GIMP_STOCK_TOOL_SELECT_BY_CONTENT, stock_tool_select_by_content_22 },
{ GIMP_STOCK_TOOL_SELECT_BY_SHAPE, stock_tool_select_by_shape_22 },
{ GIMP_STOCK_TOOL_SHEAR, stock_tool_shear_22 },
{ GIMP_STOCK_TOOL_SMUDGE, stock_tool_smudge_22 },
{ GIMP_STOCK_TOOL_TEXT, stock_tool_text_22 },
@@ -667,6 +673,9 @@ gimp_stock_menu_pixbufs[] =
{ GIMP_STOCK_TOOL_ROTATE, stock_tool_rotate_16 },
{ GIMP_STOCK_TOOL_SCALE, stock_tool_scale_16 },
{ GIMP_STOCK_TOOL_SEAMLESS_CLONE, stock_tool_clone_16 },
{ GIMP_STOCK_TOOL_SELECT_BY_COLOR, stock_tool_select_by_color_16 },
{ GIMP_STOCK_TOOL_SELECT_BY_CONTENT, stock_tool_select_by_content_16 },
{ GIMP_STOCK_TOOL_SELECT_BY_SHAPE, stock_tool_select_by_shape_16 },
{ GIMP_STOCK_TOOL_SHEAR, stock_tool_shear_16 },
{ GIMP_STOCK_TOOL_SMUDGE, stock_tool_smudge_16 },
{ GIMP_STOCK_TOOL_TEXT, stock_tool_text_16 },

View File

@@ -139,6 +139,9 @@ G_BEGIN_DECLS
#define GIMP_STOCK_TOOL_ROTATE "gimp-tool-rotate"
#define GIMP_STOCK_TOOL_SCALE "gimp-tool-scale"
#define GIMP_STOCK_TOOL_SEAMLESS_CLONE "gimp-tool-seamless-clone"
#define GIMP_STOCK_TOOL_SELECT_BY_COLOR "gimp-tool-select-by-color"
#define GIMP_STOCK_TOOL_SELECT_BY_CONTENT "gimp-tool-select-by-content"
#define GIMP_STOCK_TOOL_SELECT_BY_SHAPE "gimp-tool-select-by-shape"
#define GIMP_STOCK_TOOL_SHEAR "gimp-tool-shear"
#define GIMP_STOCK_TOOL_SMUDGE "gimp-tool-smudge"
#define GIMP_STOCK_TOOL_TEXT "gimp-tool-text"

View File

@@ -386,6 +386,9 @@ app/tools/gimpseamlesscloneoptions.c
app/tools/gimpseamlessclonetool.c
app/tools/gimpselectionoptions.c
app/tools/gimpselectiontool.c
app/tools/gimpselectbycontenttool.c
app/tools/gimpselectbyshapetool.c
app/tools/gimpselectbycolortool.c
app/tools/gimpsheartool.c
app/tools/gimpsmudgetool.c
app/tools/gimptextoptions.c

View File

@@ -339,6 +339,12 @@ STOCK_TOOL_IMAGES = \
tools/stock-tool-rotate-22.png \
tools/stock-tool-scale-16.png \
tools/stock-tool-scale-22.png \
tools/stock-tool-select-by-color-16.png \
tools/stock-tool-select-by-color-22.png \
tools/stock-tool-select-by-content-16.png \
tools/stock-tool-select-by-content-22.png \
tools/stock-tool-select-by-shape-16.png \
tools/stock-tool-select-by-shape-22.png \
tools/stock-tool-shear-16.png \
tools/stock-tool-shear-22.png \
tools/stock-tool-smudge-16.png \

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 689 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 686 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 959 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 877 B

View File

@@ -415,6 +415,18 @@ package Gimp::CodeGen::enums;
symbols => [ qw(GIMP_VECTORS_STROKE_TYPE_BEZIER) ],
mapping => { GIMP_VECTORS_STROKE_TYPE_BEZIER => '0' }
},
GimpShapeType =>
{ contig => 1,
header => 'core/core-enums.h',
symbols => [ qw(GIMP_SHAPE_RECTANGLE GIMP_SHAPE_ELLIPSE
GIMP_SHAPE_ROUNDED_RECT GIMP_SHAPE_N_POLYGON
GIMP_SHAPE_SINGLE_ROW) ],
mapping => { GIMP_SHAPE_RECTANGLE => '0',
GIMP_SHAPE_ELLIPSE => '1',
GIMP_SHAPE_ROUNDED_RECT => '2',
GIMP_SHAPE_N_POLYGON => '3',
GIMP_SHAPE_SINGLE_ROW => '4' }
},
GimpComponentType =>
{ contig => 0,
header => 'core/core-enums.h',