2003-06-04 23:48:17 +08:00
|
|
|
/* The GIMP -- an image manipulation program
|
|
|
|
* Copyright (C) 1995-2001 Spencer Kimball, Peter Mattis, and others
|
|
|
|
*
|
|
|
|
* 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 2 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, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
2004-07-27 03:56:47 +08:00
|
|
|
#include "libgimpcolor/gimpcolor.h"
|
2003-06-04 23:48:17 +08:00
|
|
|
#include "libgimpwidgets/gimpwidgets.h"
|
|
|
|
|
|
|
|
#include "tools-types.h"
|
|
|
|
|
|
|
|
#include "core/gimpimage.h"
|
2003-06-05 04:23:36 +08:00
|
|
|
#include "core/gimpimage-pick-color.h"
|
2003-06-04 23:48:17 +08:00
|
|
|
#include "core/gimpitem.h"
|
2003-06-05 04:23:36 +08:00
|
|
|
#include "core/gimpmarshal.h"
|
2003-06-04 23:48:17 +08:00
|
|
|
|
|
|
|
#include "display/gimpdisplay.h"
|
|
|
|
|
|
|
|
#include "gimpcoloroptions.h"
|
|
|
|
#include "gimpcolortool.h"
|
|
|
|
#include "gimptoolcontrol.h"
|
|
|
|
|
|
|
|
|
2003-06-05 04:23:36 +08:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
PICKED,
|
|
|
|
LAST_SIGNAL
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2003-06-04 23:48:17 +08:00
|
|
|
/* local function prototypes */
|
|
|
|
|
|
|
|
static void gimp_color_tool_class_init (GimpColorToolClass *klass);
|
|
|
|
static void gimp_color_tool_init (GimpColorTool *color_tool);
|
2003-06-05 23:43:49 +08:00
|
|
|
static void gimp_color_tool_finalize (GObject *object);
|
2003-06-04 23:48:17 +08:00
|
|
|
|
|
|
|
static void gimp_color_tool_button_press (GimpTool *tool,
|
|
|
|
GimpCoords *coords,
|
|
|
|
guint32 time,
|
|
|
|
GdkModifierType state,
|
|
|
|
GimpDisplay *gdisp);
|
|
|
|
static void gimp_color_tool_button_release (GimpTool *tool,
|
|
|
|
GimpCoords *coords,
|
|
|
|
guint32 time,
|
|
|
|
GdkModifierType state,
|
|
|
|
GimpDisplay *gdisp);
|
|
|
|
static void gimp_color_tool_motion (GimpTool *tool,
|
|
|
|
GimpCoords *coords,
|
|
|
|
guint32 time,
|
|
|
|
GdkModifierType state,
|
|
|
|
GimpDisplay *gdisp);
|
|
|
|
static void gimp_color_tool_cursor_update (GimpTool *tool,
|
|
|
|
GimpCoords *coords,
|
|
|
|
GdkModifierType state,
|
|
|
|
GimpDisplay *gdisp);
|
|
|
|
|
|
|
|
static void gimp_color_tool_draw (GimpDrawTool *draw_tool);
|
|
|
|
|
2003-06-05 04:23:36 +08:00
|
|
|
static gboolean gimp_color_tool_real_pick (GimpColorTool *color_tool,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
GimpImageType *sample_type,
|
|
|
|
GimpRGB *color,
|
|
|
|
gint *color_index);
|
|
|
|
static void gimp_color_tool_pick (GimpColorTool *tool,
|
2004-06-30 20:10:08 +08:00
|
|
|
GimpColorPickState pick_state,
|
2003-06-05 04:23:36 +08:00
|
|
|
gint x,
|
|
|
|
gint y);
|
|
|
|
|
2003-06-04 23:48:17 +08:00
|
|
|
|
2003-06-05 04:23:36 +08:00
|
|
|
static guint gimp_color_tool_signals[LAST_SIGNAL] = { 0 };
|
2003-06-04 23:48:17 +08:00
|
|
|
|
|
|
|
static GimpDrawToolClass *parent_class = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
GtkType
|
|
|
|
gimp_color_tool_get_type (void)
|
|
|
|
{
|
|
|
|
static GtkType tool_type = 0;
|
|
|
|
|
|
|
|
if (! tool_type)
|
|
|
|
{
|
|
|
|
static const GTypeInfo tool_info =
|
|
|
|
{
|
|
|
|
sizeof (GimpColorToolClass),
|
|
|
|
(GBaseInitFunc) NULL,
|
|
|
|
(GBaseFinalizeFunc) NULL,
|
|
|
|
(GClassInitFunc) gimp_color_tool_class_init,
|
|
|
|
NULL, /* class_finalize */
|
|
|
|
NULL, /* class_data */
|
|
|
|
sizeof (GimpColorTool),
|
|
|
|
0, /* n_preallocs */
|
|
|
|
(GInstanceInitFunc) gimp_color_tool_init,
|
|
|
|
};
|
|
|
|
|
|
|
|
tool_type = g_type_register_static (GIMP_TYPE_DRAW_TOOL,
|
2003-10-26 03:00:49 +08:00
|
|
|
"GimpColorTool",
|
2003-06-04 23:48:17 +08:00
|
|
|
&tool_info, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
return tool_type;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gimp_color_tool_class_init (GimpColorToolClass *klass)
|
|
|
|
{
|
2004-06-30 20:10:08 +08:00
|
|
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
|
|
|
GimpToolClass *tool_class = GIMP_TOOL_CLASS (klass);
|
|
|
|
GimpDrawToolClass *draw_class = GIMP_DRAW_TOOL_CLASS (klass);
|
2003-06-04 23:48:17 +08:00
|
|
|
|
|
|
|
parent_class = g_type_class_peek_parent (klass);
|
|
|
|
|
2003-06-05 04:23:36 +08:00
|
|
|
gimp_color_tool_signals[PICKED] =
|
|
|
|
g_signal_new ("picked",
|
|
|
|
G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_FIRST,
|
|
|
|
G_STRUCT_OFFSET (GimpColorToolClass, picked),
|
|
|
|
NULL, NULL,
|
2004-06-30 20:10:08 +08:00
|
|
|
gimp_marshal_VOID__ENUM_ENUM_BOXED_INT,
|
|
|
|
G_TYPE_NONE, 4,
|
|
|
|
GIMP_TYPE_COLOR_PICK_STATE,
|
2003-06-05 04:23:36 +08:00
|
|
|
GIMP_TYPE_IMAGE_TYPE,
|
2004-07-27 03:56:47 +08:00
|
|
|
GIMP_TYPE_RGB | G_SIGNAL_TYPE_STATIC_SCOPE,
|
2003-06-05 04:23:36 +08:00
|
|
|
G_TYPE_INT);
|
|
|
|
|
2003-06-05 23:43:49 +08:00
|
|
|
object_class->finalize = gimp_color_tool_finalize;
|
|
|
|
|
2003-06-04 23:48:17 +08:00
|
|
|
tool_class->button_press = gimp_color_tool_button_press;
|
|
|
|
tool_class->button_release = gimp_color_tool_button_release;
|
|
|
|
tool_class->motion = gimp_color_tool_motion;
|
|
|
|
tool_class->cursor_update = gimp_color_tool_cursor_update;
|
|
|
|
|
|
|
|
draw_class->draw = gimp_color_tool_draw;
|
|
|
|
|
2003-06-05 04:23:36 +08:00
|
|
|
klass->pick = gimp_color_tool_real_pick;
|
|
|
|
klass->picked = NULL;
|
2003-06-04 23:48:17 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2003-06-05 23:43:49 +08:00
|
|
|
gimp_color_tool_finalize (GObject *object)
|
2003-06-04 23:48:17 +08:00
|
|
|
{
|
2003-06-05 23:43:49 +08:00
|
|
|
GimpColorTool *color_tool = GIMP_COLOR_TOOL (object);
|
|
|
|
|
|
|
|
if (color_tool->options)
|
|
|
|
{
|
|
|
|
g_object_unref (color_tool->options);
|
|
|
|
color_tool->options = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
|
|
|
}
|
2003-06-04 23:48:17 +08:00
|
|
|
|
2003-06-05 23:43:49 +08:00
|
|
|
static void
|
|
|
|
gimp_color_tool_init (GimpColorTool *color_tool)
|
|
|
|
{
|
2005-03-04 19:42:46 +08:00
|
|
|
GimpTool *tool = GIMP_TOOL (color_tool);
|
|
|
|
|
|
|
|
gimp_tool_control_set_action_value_1 (tool->control,
|
|
|
|
"tools/tools-color-average-radius-set");
|
|
|
|
|
2003-09-26 21:33:54 +08:00
|
|
|
color_tool->enabled = FALSE;
|
|
|
|
color_tool->center_x = 0;
|
|
|
|
color_tool->center_y = 0;
|
2003-10-26 03:00:49 +08:00
|
|
|
color_tool->pick_mode = GIMP_COLOR_PICK_MODE_NONE;
|
2003-09-26 21:33:54 +08:00
|
|
|
color_tool->options = NULL;
|
2003-06-04 23:48:17 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gimp_color_tool_button_press (GimpTool *tool,
|
|
|
|
GimpCoords *coords,
|
|
|
|
guint32 time,
|
|
|
|
GdkModifierType state,
|
|
|
|
GimpDisplay *gdisp)
|
|
|
|
{
|
2003-06-05 04:23:36 +08:00
|
|
|
GimpColorTool *color_tool;
|
2003-06-04 23:48:17 +08:00
|
|
|
|
|
|
|
/* Make the tool active and set it's gdisplay & drawable */
|
|
|
|
tool->gdisp = gdisp;
|
|
|
|
tool->drawable = gimp_image_active_drawable (gdisp->gimage);
|
|
|
|
gimp_tool_control_activate (tool->control);
|
|
|
|
|
2003-06-05 04:23:36 +08:00
|
|
|
color_tool = GIMP_COLOR_TOOL (tool);
|
|
|
|
|
|
|
|
if (color_tool->enabled)
|
2003-06-04 23:48:17 +08:00
|
|
|
{
|
2003-06-05 04:23:36 +08:00
|
|
|
gint off_x, off_y;
|
|
|
|
|
2003-06-04 23:48:17 +08:00
|
|
|
/* Keep the coordinates of the target */
|
|
|
|
gimp_item_offsets (GIMP_ITEM (tool->drawable), &off_x, &off_y);
|
|
|
|
|
2003-06-05 04:23:36 +08:00
|
|
|
color_tool->center_x = coords->x - off_x;
|
|
|
|
color_tool->center_y = coords->y - off_y;
|
2003-06-04 23:48:17 +08:00
|
|
|
|
|
|
|
gimp_draw_tool_start (GIMP_DRAW_TOOL (tool), gdisp);
|
2003-06-05 04:23:36 +08:00
|
|
|
|
2004-06-30 20:10:08 +08:00
|
|
|
gimp_color_tool_pick (color_tool, GIMP_COLOR_PICK_STATE_NEW,
|
|
|
|
coords->x, coords->y);
|
2003-06-04 23:48:17 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gimp_color_tool_button_release (GimpTool *tool,
|
|
|
|
GimpCoords *coords,
|
|
|
|
guint32 time,
|
|
|
|
GdkModifierType state,
|
|
|
|
GimpDisplay *gdisp)
|
|
|
|
{
|
2003-06-05 04:23:36 +08:00
|
|
|
if (GIMP_COLOR_TOOL (tool)->enabled)
|
2003-06-04 23:48:17 +08:00
|
|
|
gimp_draw_tool_stop (GIMP_DRAW_TOOL (tool));
|
|
|
|
|
|
|
|
gimp_tool_control_halt (tool->control);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gimp_color_tool_motion (GimpTool *tool,
|
2003-06-05 04:23:36 +08:00
|
|
|
GimpCoords *coords,
|
|
|
|
guint32 time,
|
|
|
|
GdkModifierType state,
|
|
|
|
GimpDisplay *gdisp)
|
2003-06-04 23:48:17 +08:00
|
|
|
{
|
2003-06-05 04:23:36 +08:00
|
|
|
GimpColorTool *color_tool;
|
|
|
|
gint off_x, off_y;
|
2003-06-04 23:48:17 +08:00
|
|
|
|
2003-06-05 04:23:36 +08:00
|
|
|
color_tool = GIMP_COLOR_TOOL (tool);
|
2003-06-04 23:48:17 +08:00
|
|
|
|
2003-06-05 04:23:36 +08:00
|
|
|
if (! color_tool->enabled)
|
|
|
|
return;
|
2003-06-04 23:48:17 +08:00
|
|
|
|
|
|
|
gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool));
|
|
|
|
|
|
|
|
gimp_item_offsets (GIMP_ITEM (tool->drawable), &off_x, &off_y);
|
|
|
|
|
2003-06-05 04:23:36 +08:00
|
|
|
color_tool->center_x = coords->x - off_x;
|
|
|
|
color_tool->center_y = coords->y - off_y;
|
2003-06-04 23:48:17 +08:00
|
|
|
|
|
|
|
gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));
|
2003-06-05 04:23:36 +08:00
|
|
|
|
2004-06-30 20:10:08 +08:00
|
|
|
gimp_color_tool_pick (color_tool, GIMP_COLOR_PICK_STATE_UPDATE,
|
|
|
|
coords->x, coords->y);
|
2003-06-04 23:48:17 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gimp_color_tool_cursor_update (GimpTool *tool,
|
|
|
|
GimpCoords *coords,
|
|
|
|
GdkModifierType state,
|
|
|
|
GimpDisplay *gdisp)
|
|
|
|
{
|
2003-06-06 02:47:23 +08:00
|
|
|
GimpColorTool *color_tool = GIMP_COLOR_TOOL (tool);
|
|
|
|
|
|
|
|
if (color_tool->enabled)
|
2003-06-04 23:48:17 +08:00
|
|
|
{
|
2004-06-14 18:19:39 +08:00
|
|
|
GimpCursorType cursor = GIMP_CURSOR_BAD;
|
2003-10-26 03:00:49 +08:00
|
|
|
GimpCursorModifier modifier = GIMP_CURSOR_MODIFIER_NONE;
|
2003-06-06 02:47:23 +08:00
|
|
|
|
2003-09-26 21:33:54 +08:00
|
|
|
if (coords->x > 0 && coords->x < gdisp->gimage->width &&
|
|
|
|
coords->y > 0 && coords->y < gdisp->gimage->height &&
|
2003-06-06 02:47:23 +08:00
|
|
|
|
|
|
|
(color_tool->options->sample_merged ||
|
2004-07-14 00:36:29 +08:00
|
|
|
gimp_image_coords_in_active_drawable (gdisp->gimage, coords)))
|
2003-06-05 04:23:36 +08:00
|
|
|
{
|
2004-06-05 07:08:29 +08:00
|
|
|
cursor = GIMP_CURSOR_COLOR_PICKER;
|
2003-06-05 04:23:36 +08:00
|
|
|
}
|
2003-06-05 23:43:49 +08:00
|
|
|
|
2003-10-26 03:00:49 +08:00
|
|
|
switch (color_tool->pick_mode)
|
|
|
|
{
|
|
|
|
case GIMP_COLOR_PICK_MODE_NONE:
|
|
|
|
modifier = GIMP_CURSOR_MODIFIER_NONE;
|
|
|
|
break;
|
|
|
|
case GIMP_COLOR_PICK_MODE_FOREGROUND:
|
|
|
|
modifier = GIMP_CURSOR_MODIFIER_FOREGROUND;
|
|
|
|
break;
|
|
|
|
case GIMP_COLOR_PICK_MODE_BACKGROUND:
|
|
|
|
modifier = GIMP_CURSOR_MODIFIER_BACKGROUND;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2003-06-06 02:47:23 +08:00
|
|
|
gimp_tool_set_cursor (tool, gdisp,
|
2004-06-05 07:08:29 +08:00
|
|
|
cursor, GIMP_TOOL_CURSOR_COLOR_PICKER, modifier);
|
2003-06-06 02:47:23 +08:00
|
|
|
|
2003-06-05 23:43:49 +08:00
|
|
|
return; /* don't chain up */
|
2003-06-04 23:48:17 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, gdisp);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gimp_color_tool_draw (GimpDrawTool *draw_tool)
|
|
|
|
{
|
2003-07-11 00:01:45 +08:00
|
|
|
GimpColorTool *color_tool = GIMP_COLOR_TOOL (draw_tool);
|
2003-06-04 23:48:17 +08:00
|
|
|
|
2003-07-11 00:01:45 +08:00
|
|
|
if (! color_tool->enabled)
|
2003-06-04 23:48:17 +08:00
|
|
|
return;
|
|
|
|
|
2003-06-05 23:43:49 +08:00
|
|
|
if (color_tool->options->sample_average)
|
2003-06-05 04:23:36 +08:00
|
|
|
{
|
2003-06-05 23:43:49 +08:00
|
|
|
gdouble radius = color_tool->options->average_radius;
|
2003-06-05 04:23:36 +08:00
|
|
|
|
|
|
|
gimp_draw_tool_draw_rectangle (draw_tool,
|
|
|
|
FALSE,
|
2003-06-05 23:43:49 +08:00
|
|
|
color_tool->center_x - radius,
|
|
|
|
color_tool->center_y - radius,
|
|
|
|
2 * radius + 1,
|
|
|
|
2 * radius + 1,
|
2003-06-05 04:23:36 +08:00
|
|
|
TRUE);
|
|
|
|
}
|
2003-06-04 23:48:17 +08:00
|
|
|
}
|
|
|
|
|
2003-06-05 04:23:36 +08:00
|
|
|
static gboolean
|
|
|
|
gimp_color_tool_real_pick (GimpColorTool *color_tool,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
GimpImageType *sample_type,
|
|
|
|
GimpRGB *color,
|
|
|
|
gint *color_index)
|
2003-06-04 23:48:17 +08:00
|
|
|
{
|
2003-06-05 23:43:49 +08:00
|
|
|
GimpTool *tool = GIMP_TOOL (color_tool);
|
2003-06-05 04:23:36 +08:00
|
|
|
|
|
|
|
g_return_val_if_fail (tool->gdisp != NULL, FALSE);
|
|
|
|
g_return_val_if_fail (tool->drawable != NULL, FALSE);
|
|
|
|
|
2003-06-06 02:47:23 +08:00
|
|
|
return gimp_image_pick_color (tool->gdisp->gimage, tool->drawable, x, y,
|
2003-06-05 23:43:49 +08:00
|
|
|
color_tool->options->sample_merged,
|
|
|
|
color_tool->options->sample_average,
|
|
|
|
color_tool->options->average_radius,
|
2003-06-05 04:23:36 +08:00
|
|
|
sample_type,
|
|
|
|
color,
|
|
|
|
color_index);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2004-06-30 20:10:08 +08:00
|
|
|
gimp_color_tool_pick (GimpColorTool *tool,
|
|
|
|
GimpColorPickState pick_state,
|
|
|
|
gint x,
|
|
|
|
gint y)
|
2003-06-05 04:23:36 +08:00
|
|
|
{
|
|
|
|
GimpColorToolClass *klass;
|
|
|
|
GimpImageType sample_type;
|
|
|
|
GimpRGB color;
|
|
|
|
gint color_index;
|
2003-06-04 23:48:17 +08:00
|
|
|
|
|
|
|
klass = GIMP_COLOR_TOOL_GET_CLASS (tool);
|
|
|
|
|
2003-06-05 04:23:36 +08:00
|
|
|
if (klass->pick &&
|
|
|
|
klass->pick (tool, x, y, &sample_type, &color, &color_index))
|
|
|
|
{
|
2004-06-30 20:10:08 +08:00
|
|
|
g_signal_emit (tool, gimp_color_tool_signals[PICKED], 0,
|
|
|
|
pick_state, sample_type, &color, color_index);
|
2003-06-05 04:23:36 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2003-06-05 23:43:49 +08:00
|
|
|
gimp_color_tool_enable (GimpColorTool *color_tool,
|
|
|
|
GimpColorOptions *options)
|
2003-06-05 04:23:36 +08:00
|
|
|
{
|
|
|
|
GimpTool *tool;
|
|
|
|
|
|
|
|
g_return_if_fail (GIMP_IS_COLOR_TOOL (color_tool));
|
2003-06-05 23:43:49 +08:00
|
|
|
g_return_if_fail (GIMP_IS_COLOR_OPTIONS (options));
|
2003-06-05 04:23:36 +08:00
|
|
|
|
|
|
|
tool = GIMP_TOOL (color_tool);
|
|
|
|
if (gimp_tool_control_is_active (tool->control))
|
|
|
|
{
|
2003-06-05 23:43:49 +08:00
|
|
|
g_warning ("Trying to enable GimpColorTool while it is active.");
|
2003-06-05 04:23:36 +08:00
|
|
|
return;
|
|
|
|
}
|
2003-06-04 23:48:17 +08:00
|
|
|
|
2003-06-05 23:43:49 +08:00
|
|
|
if (color_tool->options)
|
|
|
|
{
|
|
|
|
g_object_unref (color_tool->options);
|
|
|
|
color_tool->options = NULL;
|
|
|
|
}
|
|
|
|
color_tool->options = g_object_ref (options);
|
|
|
|
|
|
|
|
color_tool->enabled = TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gimp_color_tool_disable (GimpColorTool *color_tool)
|
|
|
|
{
|
|
|
|
GimpTool *tool;
|
|
|
|
|
|
|
|
g_return_if_fail (GIMP_IS_COLOR_TOOL (color_tool));
|
|
|
|
|
|
|
|
tool = GIMP_TOOL (color_tool);
|
|
|
|
if (gimp_tool_control_is_active (tool->control))
|
|
|
|
{
|
|
|
|
g_warning ("Trying to disable GimpColorTool while it is active.");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (color_tool->options)
|
|
|
|
{
|
|
|
|
g_object_unref (color_tool->options);
|
|
|
|
color_tool->options = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
color_tool->enabled = FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
gboolean
|
|
|
|
gimp_color_tool_is_enabled (GimpColorTool *color_tool)
|
|
|
|
{
|
|
|
|
return color_tool->enabled;
|
2003-06-04 23:48:17 +08:00
|
|
|
}
|