Commit 1b149765 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

Merged the "soc-2006-perspective-clone" branch. That branch is now

2006-09-07  Michael Natterer  <mitch@gimp.org>

	Merged the "soc-2006-perspective-clone" branch. That branch is
	now officially closed and all further fixes and changes have to
	be applied to HEAD.

	Did some minor adjustments, mostly small indentation and spacing
	fixes. Derive the tool from GimpBrushTool and renamed the enum
	added to paint-enums.h and it values, added stock icon and menu
	entry.

	Thanks a lot to Pedro Alonso Ferrer!

	* app/paint/paint-enums.[ch]: new enum GimpPerspectiveCloneMode.

	* app/paint/Makefile.am
	* app/paint/gimpperspectiveclone.[ch]
	* app/paint/gimpperspectivecloneoptions.[ch]: the perspective
	clone core and its options.

	* app/paint/gimp-paint.c: register it.

	* app/tools/Makefile.am
	* app/tools/gimpperspectiveclonetool.[ch]: the perspective clone tool.

	* app/tools/gimp-tools.c: register it.

	* app/tools/gimppaintoptions-gui.c: show the widgets that are used
	by perspective clone.

	* app/widgets/gimphelp-ids.h: the help ID.

	* themes/Default/images/Makefile.am
	* themes/Default/images/tools/stock-tool-perspective-clone-16.png
	* themes/Default/images/tools/stock-tool-perspective-clone-22.png
	* libgimpwidgets/gimpstock.[ch]: its stock ID and icons.

	* menus/image-menu.xml.in: added it to the menu.
parent 57b48583
2006-09-07 Michael Natterer <mitch@gimp.org>
Merged the "soc-2006-perspective-clone" branch. That branch is
now officially closed and all further fixes and changes have to
be applied to HEAD.
Did some minor adjustments, mostly small indentation and spacing
fixes. Derive the tool from GimpBrushTool and renamed the enum
added to paint-enums.h and it values, added stock icon and menu
entry.
Thanks a lot to Pedro Alonso Ferrer!
* app/paint/paint-enums.[ch]: new enum GimpPerspectiveCloneMode.
* app/paint/Makefile.am
* app/paint/gimpperspectiveclone.[ch]
* app/paint/gimpperspectivecloneoptions.[ch]: the perspective
clone core and its options.
* app/paint/gimp-paint.c: register it.
* app/tools/Makefile.am
* app/tools/gimpperspectiveclonetool.[ch]: the perspective clone tool.
* app/tools/gimp-tools.c: register it.
* app/tools/gimppaintoptions-gui.c: show the widgets that are used
by perspective clone.
* app/widgets/gimphelp-ids.h: the help ID.
* themes/Default/images/Makefile.am
* themes/Default/images/tools/stock-tool-perspective-clone-16.png
* themes/Default/images/tools/stock-tool-perspective-clone-22.png
* libgimpwidgets/gimpstock.[ch]: its stock ID and icons.
* menus/image-menu.xml.in: added it to the menu.
2006-09-07 Sven Neumann <sven@gimp.org>
* configure.in: bumped version to 2.3.12.
......
......@@ -15,64 +15,68 @@ INCLUDES = \
noinst_LIBRARIES = libapppaint.a
libapppaint_a_sources = \
paint-enums.h \
paint-types.h \
gimp-paint.c \
gimp-paint.h \
gimpairbrush.c \
gimpairbrush.h \
gimpairbrushoptions.c \
gimpairbrushoptions.h \
gimpbrushcore.c \
gimpbrushcore.h \
gimpbrushcore-kernels.h \
gimpclone.c \
gimpclone.h \
gimpcloneoptions.c \
gimpcloneoptions.h \
gimpconvolve.c \
gimpconvolve.h \
gimpconvolveoptions.c \
gimpconvolveoptions.h \
gimpdodgeburn.c \
gimpdodgeburn.h \
gimpdodgeburnoptions.c \
gimpdodgeburnoptions.h \
gimperaser.c \
gimperaser.h \
gimperaseroptions.c \
gimperaseroptions.h \
gimpheal.c \
gimpheal.h \
gimpink.c \
gimpink.h \
gimpink-blob.c \
gimpink-blob.h \
gimpink-undo.c \
gimpink-undo.h \
gimpinkoptions.c \
gimpinkoptions.h \
gimppaintcore.c \
gimppaintcore.h \
gimppaintcore-stroke.c \
gimppaintcore-stroke.h \
gimppaintcore-undo.c \
gimppaintcore-undo.h \
gimppaintoptions.c \
gimppaintoptions.h \
gimppencil.c \
gimppencil.h \
gimppenciloptions.c \
gimppenciloptions.h \
gimppaintbrush.c \
gimppaintbrush.h \
gimpsmudge.c \
gimpsmudge.h \
gimpsmudgeoptions.c \
gimpsmudgeoptions.h \
gimpsourcecore.c \
gimpsourcecore.h \
gimpsourceoptions.c \
paint-enums.h \
paint-types.h \
gimp-paint.c \
gimp-paint.h \
gimpairbrush.c \
gimpairbrush.h \
gimpairbrushoptions.c \
gimpairbrushoptions.h \
gimpbrushcore.c \
gimpbrushcore.h \
gimpbrushcore-kernels.h \
gimpclone.c \
gimpclone.h \
gimpcloneoptions.c \
gimpcloneoptions.h \
gimpconvolve.c \
gimpconvolve.h \
gimpconvolveoptions.c \
gimpconvolveoptions.h \
gimpdodgeburn.c \
gimpdodgeburn.h \
gimpdodgeburnoptions.c \
gimpdodgeburnoptions.h \
gimperaser.c \
gimperaser.h \
gimperaseroptions.c \
gimperaseroptions.h \
gimpheal.c \
gimpheal.h \
gimpink.c \
gimpink.h \
gimpink-blob.c \
gimpink-blob.h \
gimpink-undo.c \
gimpink-undo.h \
gimpinkoptions.c \
gimpinkoptions.h \
gimppaintcore.c \
gimppaintcore.h \
gimppaintcore-stroke.c \
gimppaintcore-stroke.h \
gimppaintcore-undo.c \
gimppaintcore-undo.h \
gimppaintoptions.c \
gimppaintoptions.h \
gimppencil.c \
gimppencil.h \
gimppenciloptions.c \
gimppenciloptions.h \
gimppaintbrush.c \
gimppaintbrush.h \
gimpperspectiveclone.c \
gimpperspectiveclone.h \
gimpperspectivecloneoptions.c \
gimpperspectivecloneoptions.h \
gimpsmudge.c \
gimpsmudge.h \
gimpsmudgeoptions.c \
gimpsmudgeoptions.h \
gimpsourcecore.c \
gimpsourcecore.h \
gimpsourceoptions.c \
gimpsourceoptions.h
libapppaint_a_built_sources = paint-enums.c
......
......@@ -37,6 +37,7 @@
#include "gimppaintoptions.h"
#include "gimppaintbrush.h"
#include "gimppencil.h"
#include "gimpperspectiveclone.h"
#include "gimpsmudge.h"
......@@ -60,8 +61,9 @@ gimp_paint_init (Gimp *gimp)
gimp_dodge_burn_register,
gimp_smudge_register,
gimp_convolve_register,
gimp_clone_register,
gimp_perspective_clone_register,
gimp_heal_register,
gimp_clone_register,
gimp_ink_register,
gimp_airbrush_register,
gimp_eraser_register,
......
This diff is collapsed.
/* The GIMP -- an 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 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.
*/
#ifndef __GIMP_PERSPECTIVE_CLONE_H__
#define __GIMP_PERSPECTIVE_CLONE_H__
#include "gimpclone.h"
#define GIMP_TYPE_PERSPECTIVE_CLONE (gimp_perspective_clone_get_type ())
#define GIMP_PERSPECTIVE_CLONE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_PERSPECTIVE_CLONE, GimpPerspectiveClone))
#define GIMP_PERSPECTIVE_CLONE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PERSPECTIVE_CLONE, GimpPerspectiveCloneClass))
#define GIMP_IS_PERSPECTIVE_CLONE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_PERSPECTIVE_CLONE))
#define GIMP_IS_PERSPECTIVE_CLONE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PERSPECTIVE_CLONE))
#define GIMP_PERSPECTIVE_CLONE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_PERSPECTIVE_CLONE, GimpPerspectiveCloneClass))
typedef struct _GimpPerspectiveClone GimpPerspectiveClone;
typedef struct _GimpPerspectiveCloneClass GimpPerspectiveCloneClass;
struct _GimpPerspectiveClone
{
GimpClone parent_instance;
gboolean set_source;
GimpDrawable *src_drawable;
gdouble src_x; /* coordinates where the cross that indicate where is copying each moment is painted */
gdouble src_y;
gdouble orig_src_x;
gdouble orig_src_y;
gdouble dest_x; /* coords where the stroke starts */
gdouble dest_y;
gdouble src_x_fv; /* source coords in front_view perspective */
gdouble src_y_fv;
gdouble dest_x_fv; /* destination coords in front_view perspective */
gdouble dest_y_fv;
gdouble offset_x;
gdouble offset_y;
gboolean first_stroke;
GimpMatrix3 transform;
GimpMatrix3 transform_inv;
};
struct _GimpPerspectiveCloneClass
{
GimpCloneClass parent_class;
};
void gimp_perspective_clone_register (Gimp *gimp,
GimpPaintRegisterCallback callback);
GType gimp_perspective_clone_get_type (void) G_GNUC_CONST;
void gimp_perspective_clone_get_source_point (GimpPerspectiveClone *clone,
gdouble x,
gdouble y,
gdouble *newx,
gdouble *newy);
#endif /* __GIMP_CLONE_VANISHIGN_H__ */
/* The GIMP -- an 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 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 <glib-object.h>
#include "libgimpconfig/gimpconfig.h"
#include "paint-types.h"
#include "gimpperspectivecloneoptions.h"
#define PERSPECTIVE_CLONE_DEFAULT_MODE GIMP_PERSPECTIVE_CLONE_MODE_ADJUST
#define PERSPECTIVE_CLONE_DEFAULT_TYPE GIMP_IMAGE_CLONE
#define PERSPECTIVE_CLONE_DEFAULT_ALIGN_MODE GIMP_SOURCE_ALIGN_NO
enum
{
PROP_0,
PROP_CLONE_MODE,
PROP_CLONE_TYPE,
PROP_ALIGN_MODE,
PROP_SAMPLE_MERGED
};
static void gimp_perspective_clone_options_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_perspective_clone_options_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
G_DEFINE_TYPE (GimpPerspectiveCloneOptions, gimp_perspective_clone_options,
GIMP_TYPE_PAINT_OPTIONS)
static void
gimp_perspective_clone_options_class_init (GimpPerspectiveCloneOptionsClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->set_property = gimp_perspective_clone_options_set_property;
object_class->get_property = gimp_perspective_clone_options_get_property;
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_CLONE_MODE,
"clone-mode", NULL,
GIMP_TYPE_PERSPECTIVE_CLONE_MODE,
PERSPECTIVE_CLONE_DEFAULT_MODE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_CLONE_TYPE,
"clone-type", NULL,
GIMP_TYPE_CLONE_TYPE,
PERSPECTIVE_CLONE_DEFAULT_TYPE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_ALIGN_MODE,
"align-mode", NULL,
GIMP_TYPE_SOURCE_ALIGN_MODE,
PERSPECTIVE_CLONE_DEFAULT_ALIGN_MODE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SAMPLE_MERGED,
"sample-merged", NULL,
FALSE,
GIMP_PARAM_STATIC_STRINGS);
}
static void
gimp_perspective_clone_options_init (GimpPerspectiveCloneOptions *options)
{
}
static void
gimp_perspective_clone_options_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
GimpPerspectiveCloneOptions *options = GIMP_PERSPECTIVE_CLONE_OPTIONS (object);
switch (property_id)
{
case PROP_CLONE_MODE:
options->clone_mode = g_value_get_enum (value);
break;
case PROP_CLONE_TYPE:
options->clone_type = g_value_get_enum (value);
break;
case PROP_ALIGN_MODE:
options->align_mode = g_value_get_enum (value);
break;
case PROP_SAMPLE_MERGED:
options->sample_merged = g_value_get_boolean (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static void
gimp_perspective_clone_options_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
GimpPerspectiveCloneOptions *options = GIMP_PERSPECTIVE_CLONE_OPTIONS (object);
switch (property_id)
{
case PROP_CLONE_MODE:
g_value_set_enum (value, options->clone_mode);
break;
case PROP_CLONE_TYPE:
g_value_set_enum (value, options->clone_type);
break;
case PROP_ALIGN_MODE:
g_value_set_enum (value, options->align_mode);
break;
case PROP_SAMPLE_MERGED:
g_value_set_boolean (value, options->sample_merged);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
/* The GIMP -- an 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 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.
*/
#ifndef __GIMP_PERSPECTIVE_CLONE_OPTIONS_H__
#define __GIMP_PERSPECTIVE_CLONE_OPTIONS_H__
#include "gimppaintoptions.h"
#define GIMP_TYPE_PERSPECTIVE_CLONE_OPTIONS (gimp_perspective_clone_options_get_type ())
#define GIMP_PERSPECTIVE_CLONE_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_PERSPECTIVE_CLONE_OPTIONS, GimpPerspectiveCloneOptions))
#define GIMP_PERSPECTIVE_CLONE_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PERSPECTIVE_CLONE_OPTIONS, GimpPerspectiveCloneOptionsClass))
#define GIMP_IS_PERSPECTIVE_CLONE_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_PERSPECTIVE_CLONE_OPTIONS))
#define GIMP_IS_PERSPECTIVE_CLONE_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PERSPECTIVE_CLONE_OPTIONS))
#define GIMP_PERSPECTIVE_CLONE_OPTIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_PERSPECTIVE_CLONE_OPTIONS, GimpPerspectiveCloneOptionsClass))
typedef struct _GimpPerspectiveCloneOptions GimpPerspectiveCloneOptions;
typedef struct _GimpPerspectiveCloneOptionsClass GimpPerspectiveCloneOptionsClass;
struct _GimpPerspectiveCloneOptions
{
GimpPaintOptions paint_instance;
GimpPerspectiveCloneMode clone_mode;
GimpCloneType clone_type;
GimpSourceAlignMode align_mode;
gboolean sample_merged;
};
struct _GimpPerspectiveCloneOptionsClass
{
GimpPaintOptionsClass parent_class;
};
GType gimp_perspective_clone_options_get_type (void) G_GNUC_CONST;
#endif /* __GIMP_PERSPECTIVE_CLONE_OPTIONS_H__ */
......@@ -36,6 +36,34 @@ gimp_brush_application_mode_get_type (void)
return type;
}
GType
gimp_perspective_clone_mode_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_PERSPECTIVE_CLONE_MODE_ADJUST, "GIMP_PERSPECTIVE_CLONE_MODE_ADJUST", "adjust" },
{ GIMP_PERSPECTIVE_CLONE_MODE_PAINT, "GIMP_PERSPECTIVE_CLONE_MODE_PAINT", "paint" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_PERSPECTIVE_CLONE_MODE_ADJUST, N_("Modify Perspective Plane"), NULL },
{ GIMP_PERSPECTIVE_CLONE_MODE_PAINT, N_("Perspective Clone"), NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (! type)
{
type = g_enum_register_static ("GimpPerspectiveCloneMode", values);
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType
gimp_source_align_mode_get_type (void)
{
......
......@@ -47,6 +47,17 @@ typedef enum
} GimpBrushApplicationMode;
#define GIMP_TYPE_PERSPECTIVE_CLONE_MODE (gimp_perspective_clone_mode_get_type ())
GType gimp_perspective_clone_mode_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_PERSPECTIVE_CLONE_MODE_ADJUST, /*< desc="Modify Perspective Plane" >*/
GIMP_PERSPECTIVE_CLONE_MODE_PAINT /*< desc="Perspective Clone" >*/
} GimpPerspectiveCloneMode;
#define GIMP_TYPE_SOURCE_ALIGN_MODE (gimp_source_align_mode_get_type ())
GType gimp_source_align_mode_get_type (void) G_GNUC_CONST;
......
......@@ -116,6 +116,8 @@ libapptools_a_sources = \
gimppainttool.h \
gimppenciltool.c \
gimppenciltool.h \
gimpperspectiveclonetool.c \
gimpperspectiveclonetool.h \
gimpperspectivetool.c \
gimpperspectivetool.h \
gimpposterizetool.c \
......
......@@ -73,6 +73,7 @@
#include "gimpmovetool.h"
#include "gimppaintbrushtool.h"
#include "gimppenciltool.h"
#include "gimpperspectiveclonetool.h"
#include "gimpperspectivetool.h"
#include "gimpposterizetool.h"
#include "gimpthresholdtool.h"
......@@ -133,6 +134,7 @@ gimp_tools_init (Gimp *gimp)
gimp_dodge_burn_tool_register,
gimp_smudge_tool_register,
gimp_convolve_tool_register,
gimp_perspective_clone_tool_register,
gimp_heal_tool_register,
gimp_clone_tool_register,
gimp_ink_tool_register,
......@@ -518,6 +520,10 @@ gimp_tools_register (GType tool_type,
{
paint_core_name = "gimp-heal";
}
else if (tool_type == GIMP_TYPE_PERSPECTIVE_CLONE_TOOL)
{
paint_core_name = "gimp-perspective-clone";
}
else if (tool_type == GIMP_TYPE_CONVOLVE_TOOL)
{
paint_core_name = "gimp-convolve";
......
......@@ -49,6 +49,7 @@
#include "gimppaintbrushtool.h"
#include "gimppaintoptions-gui.h"
#include "gimppenciltool.h"
#include "gimpperspectiveclonetool.h"
#include "gimpsmudgetool.h"
#include "gimptooloptions-gui.h"
......@@ -181,11 +182,12 @@ gimp_paint_options_gui (GimpToolOptions *tool_options)
}
/* the "hard edge" toggle */
if (tool_type == GIMP_TYPE_ERASER_TOOL ||
tool_type == GIMP_TYPE_CLONE_TOOL ||
tool_type == GIMP_TYPE_HEAL_TOOL ||
tool_type == GIMP_TYPE_CONVOLVE_TOOL ||
tool_type == GIMP_TYPE_DODGE_BURN_TOOL ||
if (tool_type == GIMP_TYPE_ERASER_TOOL ||
tool_type == GIMP_TYPE_CLONE_TOOL ||
tool_type == GIMP_TYPE_HEAL_TOOL ||
tool_type == GIMP_TYPE_PERSPECTIVE_CLONE_TOOL ||
tool_type == GIMP_TYPE_CONVOLVE_TOOL ||
tool_type == GIMP_TYPE_DODGE_BURN_TOOL ||
tool_type == GIMP_TYPE_SMUDGE_TOOL)
{
button = gimp_prop_check_button_new (config, "hard", _("Hard edge"));
......@@ -240,6 +242,7 @@ pressure_options_gui (GimpPressureOptions *pressure,
if (g_type_is_a (tool_type, GIMP_TYPE_PAINTBRUSH_TOOL) ||
tool_type == GIMP_TYPE_CLONE_TOOL ||
tool_type == GIMP_TYPE_HEAL_TOOL ||
tool_type == GIMP_TYPE_PERSPECTIVE_CLONE_TOOL ||
tool_type == GIMP_TYPE_DODGE_BURN_TOOL ||
tool_type == GIMP_TYPE_ERASER_TOOL)
{
......@@ -250,12 +253,13 @@ pressure_options_gui (GimpPressureOptions *pressure,
}
/* the pressure toggle */
if (tool_type == GIMP_TYPE_AIRBRUSH_TOOL ||
tool_type == GIMP_TYPE_CLONE_TOOL ||
tool_type == GIMP_TYPE_HEAL_TOOL ||
tool_type == GIMP_TYPE_CONVOLVE_TOOL ||
tool_type == GIMP_TYPE_DODGE_BURN_TOOL ||
tool_type == GIMP_TYPE_PAINTBRUSH_TOOL ||
if (tool_type == GIMP_TYPE_AIRBRUSH_TOOL ||
tool_type == GIMP_TYPE_CLONE_TOOL ||
tool_type == GIMP_TYPE_HEAL_TOOL ||
tool_type == GIMP_TYPE_PERSPECTIVE_CLONE_TOOL ||
tool_type == GIMP_TYPE_CONVOLVE_TOOL ||
tool_type == GIMP_TYPE_DODGE_BURN_TOOL ||
tool_type == GIMP_TYPE_PAINTBRUSH_TOOL ||
tool_type == GIMP_TYPE_SMUDGE_TOOL)
{
button = gimp_prop_check_button_new (config, "pressure-hardness",
......@@ -276,12 +280,13 @@ pressure_options_gui (GimpPressureOptions *pressure,
}
/* the size toggle */
if (tool_type == GIMP_TYPE_CLONE_TOOL ||
tool_type == GIMP_TYPE_HEAL_TOOL ||
tool_type == GIMP_TYPE_CONVOLVE_TOOL ||
tool_type == GIMP_TYPE_DODGE_BURN_TOOL ||
tool_type == GIMP_TYPE_ERASER_TOOL ||
tool_type == GIMP_TYPE_PAINTBRUSH_TOOL ||
if (tool_type == GIMP_TYPE_CLONE_TOOL ||
tool_type == GIMP_TYPE_HEAL_TOOL ||
tool_type == GIMP_TYPE_PERSPECTIVE_CLONE_TOOL ||
tool_type == GIMP_TYPE_CONVOLVE_TOOL ||
tool_type == GIMP_TYPE_DODGE_BURN_TOOL ||
tool_type == GIMP_TYPE_ERASER_TOOL ||
tool_type == GIMP_TYPE_PAINTBRUSH_TOOL ||
tool_type == GIMP_TYPE_PENCIL_TOOL)
{
button = gimp_prop_check_button_new (config, "pressure-size",
......
This diff is collapsed.
/* The GIMP -- an 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 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.
*/
#ifndef __GIMP_PERSPECTIVE_CLONE_TOOL_H__
#define __GIMP_PERSPECTIVE_CLONE_TOOL_H__
#include "gimpbrushtool.h"
#include "gimptransformtool.h" /* Quit, but define TransInfo */
/* buffer sizes for scaling information strings (for the info dialog) */
#define MAX_INFO_BUF 40
#define TRAN_INFO_SIZE 8
#define GIMP_TYPE_PERSPECTIVE_CLONE_TOOL (gimp_perspective_clone_tool_get_type ())
#define GIMP_PERSPECTIVE_CLONE_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_PERSPECTIVE_CLONE_TOOL, GimpPerspectiveCloneTool))
#define GIMP_PERSPECTIVE_CLONE_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PERSPECTIVE_CLONE_TOOL, GimpPerspectiveCloneToolClass))
#define GIMP_IS_PERSPECTIVE_CLONE_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_PERSPECTIVE_CLONE_TOOL))
#define GIMP_IS_PERSPECTIVE_CLONE_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PERSPECTIVE_CLONE_TOOL))
#define GIMP_PERSPECTIVE_CLONE_TOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_PERSPECTIVE_CLONE_TOOL, GimpPerspectiveCloneToolClass))
typedef struct _GimpPerspectiveCloneTool GimpPerspectiveCloneTool;
typedef struct _GimpPerspectiveCloneToolClass GimpPerspectiveCloneToolClass;
struct _GimpPerspectiveCloneTool
{
GimpBrushTool parent_instance;
GimpDisplay *src_display;
gint src_x;
gint src_y;
gdouble startx; /* starting x coord */
gdouble starty; /* starting y coord */
gdouble curx; /* current x coord */
gdouble cury; /* current y coord */
gdouble lastx; /* last x coord */
gdouble lasty; /* last y coord */
GdkModifierType state; /* state of buttons and keys */
GimpMatrix3 transform; /* transformation matrix */
TransInfo trans_info; /* transformation info */
TransInfo old_trans_info; /* for cancelling a drag operation */
gint x1, y1; /* upper left hand coordinate */
gint x2, y2; /* lower right hand coords */
gdouble tx1, ty1; /* transformed coords */
gdouble tx2, ty2;
gdouble tx3, ty3;
gdouble tx4, ty4;
gdouble tcx, tcy;
gboolean use_grid; /* does the tool use the grid */
gboolean use_handles; /* uses the corner handles */
TransformAction function; /* current tool activity */
/*gint ngx, ngy;*/ /* number of grid lines in original
* x and y directions
*/
/*gdouble *grid_coords;*/ /* x and y coordinates of the grid
* endpoints (a total of (ngx+ngy)*2
* coordinate pairs)
*/
/*gdouble *tgrid_coords;*/ /* transformed grid_coords */
};
struct _GimpPerspectiveCloneToolClass
{
GimpBrushToolClass parent_class;
};
void gimp_perspective_clone_tool_register (GimpToolRegisterCallback callback,
gpointer data);
GType gimp_perspective_clone_tool_get_type (void) G_GNUC_CONST;