2006-12-09 13:33:38 -08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
1997-11-24 14:05:25 -08:00
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
|
*
|
2009-01-17 14:28:01 -08:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
1997-11-24 14:05:25 -08:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-17 14:28:01 -08:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
1997-11-24 14:05:25 -08:00
|
|
|
* (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
|
2018-07-11 14:47:19 -07:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
1997-11-24 14:05:25 -08:00
|
|
|
*/
|
2000-12-16 13:37:03 -08:00
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
2012-03-28 12:37:59 -07:00
|
|
|
#include <gegl.h>
|
2000-12-29 07:22:01 -08:00
|
|
|
#include <gtk/gtk.h>
|
2000-12-16 13:37:03 -08:00
|
|
|
|
2001-08-05 09:08:19 -07:00
|
|
|
#include "libgimpwidgets/gimpwidgets.h"
|
2001-01-23 10:49:44 -08:00
|
|
|
|
2002-05-03 05:45:22 -07:00
|
|
|
#include "tools-types.h"
|
2000-12-16 13:37:03 -08:00
|
|
|
|
2003-07-14 08:43:21 -07:00
|
|
|
#include "paint/gimppenciloptions.h"
|
2001-05-08 19:32:03 -07:00
|
|
|
|
2003-08-21 18:42:57 -07:00
|
|
|
#include "widgets/gimphelp-ids.h"
|
|
|
|
|
|
2001-03-11 15:28:16 -08:00
|
|
|
#include "gimppenciltool.h"
|
2003-06-29 13:40:45 -07:00
|
|
|
#include "gimppaintoptions-gui.h"
|
2003-04-15 09:05:52 -07:00
|
|
|
#include "gimptoolcontrol.h"
|
1997-11-24 14:05:25 -08:00
|
|
|
|
2003-03-25 08:38:19 -08:00
|
|
|
#include "gimp-intl.h"
|
2000-04-27 10:27:28 -07:00
|
|
|
|
2001-03-11 20:40:17 -08:00
|
|
|
|
2006-05-15 02:46:31 -07:00
|
|
|
G_DEFINE_TYPE (GimpPencilTool, gimp_pencil_tool, GIMP_TYPE_PAINTBRUSH_TOOL)
|
1999-08-13 13:50:30 -07:00
|
|
|
|
1999-04-08 15:25:54 -07:00
|
|
|
|
2001-03-11 15:28:16 -08:00
|
|
|
void
|
2002-03-28 19:50:29 -08:00
|
|
|
gimp_pencil_tool_register (GimpToolRegisterCallback callback,
|
2002-05-03 04:31:08 -07:00
|
|
|
gpointer data)
|
1997-11-24 14:05:25 -08:00
|
|
|
{
|
2002-03-28 19:50:29 -08:00
|
|
|
(* callback) (GIMP_TYPE_PENCIL_TOOL,
|
2003-07-14 08:43:21 -07:00
|
|
|
GIMP_TYPE_PENCIL_OPTIONS,
|
2003-02-05 06:39:40 -08:00
|
|
|
gimp_paint_options_gui,
|
2004-09-23 14:04:39 -07:00
|
|
|
GIMP_PAINT_OPTIONS_CONTEXT_MASK |
|
2015-09-08 12:18:49 -07:00
|
|
|
GIMP_CONTEXT_PROP_MASK_GRADIENT,
|
2002-03-21 04:17:17 -08:00
|
|
|
"gimp-pencil-tool",
|
2001-11-20 15:00:47 -08:00
|
|
|
_("Pencil"),
|
2006-09-18 11:00:22 -07:00
|
|
|
_("Pencil Tool: Hard edge painting using a brush"),
|
2004-04-29 06:19:28 -07:00
|
|
|
N_("Pe_ncil"), "N",
|
2003-08-21 18:42:57 -07:00
|
|
|
NULL, GIMP_HELP_TOOL_PENCIL,
|
2017-03-05 07:01:59 -08:00
|
|
|
GIMP_ICON_TOOL_PENCIL,
|
2002-05-03 04:31:08 -07:00
|
|
|
data);
|
2001-03-11 20:40:17 -08:00
|
|
|
}
|
|
|
|
|
|
2005-12-13 01:13:50 -08:00
|
|
|
static void
|
|
|
|
|
gimp_pencil_tool_class_init (GimpPencilToolClass *klass)
|
2001-03-11 20:40:17 -08:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
gimp_pencil_tool_init (GimpPencilTool *pencil)
|
|
|
|
|
{
|
2003-10-25 12:00:49 -07:00
|
|
|
GimpTool *tool = GIMP_TOOL (pencil);
|
2001-03-11 20:40:17 -08:00
|
|
|
|
2004-06-04 16:08:29 -07:00
|
|
|
gimp_tool_control_set_tool_cursor (tool->control, GIMP_TOOL_CURSOR_PENCIL);
|
1997-11-24 14:05:25 -08:00
|
|
|
}
|