[gimp/warp-wip-rebased: 56/56] foo
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/warp-wip-rebased: 56/56] foo
- Date: Sat, 18 May 2013 13:58:39 +0000 (UTC)
commit 836520c161cbf9f92635711872b5f43096ca9ac2
Author: Michael Natterer <mitch gimp org>
Date: Sat May 18 14:45:35 2013 +0200
foo
app/tools/gimpwarpoptions.c | 4 ++--
app/tools/gimpwarpoptions.h | 4 ++--
app/tools/gimpwarptool.c | 22 ++++++++++------------
3 files changed, 14 insertions(+), 16 deletions(-)
---
diff --git a/app/tools/gimpwarpoptions.c b/app/tools/gimpwarpoptions.c
index 4ecf9e1..91a1bfe 100644
--- a/app/tools/gimpwarpoptions.c
+++ b/app/tools/gimpwarpoptions.c
@@ -88,8 +88,8 @@ gimp_warp_options_class_init (GimpWarpOptionsClass *klass)
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_BEHAVIOR,
"behavior",
N_("Behavior"),
- GEGL_TYPE_WARP_BEHAVIOR,
- GEGL_WARP_BEHAVIOR_MOVE,
+ GIMP_TYPE_WARP_BEHAVIOR,
+ GIMP_WARP_BEHAVIOR_MOVE,
GIMP_PARAM_STATIC_STRINGS);
}
diff --git a/app/tools/gimpwarpoptions.h b/app/tools/gimpwarpoptions.h
index bbf4809..926197f 100644
--- a/app/tools/gimpwarpoptions.h
+++ b/app/tools/gimpwarpoptions.h
@@ -22,7 +22,7 @@
#include "core/gimptooloptions.h"
-#include <gegl.h>
+
#define GIMP_TYPE_WARP_OPTIONS (gimp_warp_options_get_type ())
#define GIMP_WARP_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_WARP_OPTIONS,
GimpWarpOptions))
@@ -42,7 +42,7 @@ struct _GimpWarpOptions
gdouble effect_strength;
gdouble effect_size;
gdouble effect_hardness;
- GeglWarpBehavior behavior;
+ GimpWarpBehavior behavior;
};
struct _GimpWarpOptionsClass
diff --git a/app/tools/gimpwarptool.c b/app/tools/gimpwarptool.c
index 11377b5..554c046 100644
--- a/app/tools/gimpwarptool.c
+++ b/app/tools/gimpwarptool.c
@@ -33,8 +33,6 @@
#include "tools-types.h"
-#include "base/tile-manager.h"
-
#include "core/gimp.h"
#include "core/gimpchannel.h"
#include "core/gimpdrawable-shadow.h"
@@ -181,7 +179,7 @@ gimp_warp_tool_control (GimpTool *tool,
case GIMP_TOOL_ACTION_HALT:
if (wt->coords_buffer)
{
- gegl_buffer_destroy (wt->coords_buffer);
+ g_object_unref (wt->coords_buffer);
wt->coords_buffer = NULL;
}
@@ -218,7 +216,7 @@ gimp_warp_tool_start (GimpWarpTool *wt,
GimpTool *tool = GIMP_TOOL (wt);
GimpImage *image = gimp_display_get_image (display);
GimpDrawable *drawable = gimp_image_get_active_drawable (image);
- Babl *format;
+ const Babl *format;
gint x1, x2, y1, y2;
GeglRectangle bbox;
@@ -228,7 +226,7 @@ gimp_warp_tool_start (GimpWarpTool *wt,
if (wt->coords_buffer)
{
- gegl_buffer_destroy (wt->coords_buffer);
+ g_object_unref (wt->coords_buffer);
wt->coords_buffer = NULL;
}
@@ -255,7 +253,8 @@ gimp_warp_tool_start (GimpWarpTool *wt,
bbox.width = ABS (x1 - x2);
bbox.height = ABS (y1 - y2);
- printf ("Initialize coordinate buffer (%d,%d) at %d,%d\n", bbox.width, bbox.height, bbox.x, bbox.y);
+ printf ("Initialize coordinate buffer (%d,%d) at %d,%d\n",
+ bbox.width, bbox.height, bbox.x, bbox.y);
wt->coords_buffer = gegl_buffer_new (&bbox, format);
gegl_rectangle_set (&wt->last_region, 0, 0, 0, 0);
@@ -281,7 +280,7 @@ gimp_warp_tool_key_press (GimpTool *tool,
case GDK_KEY_ISO_Enter:
gimp_tool_control_set_preserve (tool->control, TRUE);
- gimp_image_map_commit (wt->image_map);
+ gimp_image_map_commit (wt->image_map, GIMP_PROGRESS (tool));
g_object_unref (wt->image_map);
wt->image_map = NULL;
@@ -494,14 +493,13 @@ static void
gimp_warp_tool_create_image_map (GimpWarpTool *wt,
GimpDrawable *drawable)
{
- if (!wt->graph)
+ if (! wt->graph)
gimp_warp_tool_create_graph (wt);
wt->image_map = gimp_image_map_new (drawable,
_("Warp transform"),
wt->graph,
- NULL,
- NULL);
+ GIMP_STOCK_TOOL_WARP);
g_object_set (wt->image_map, "gegl-caching", TRUE, NULL);
@@ -528,7 +526,7 @@ gimp_warp_tool_image_map_update (GimpWarpTool *wt)
printf("update rect: (%d,%d), %dx%d\n", to_update.x, to_update.y, to_update.width, to_update.height);
- gimp_image_map_apply_region (wt->image_map, &to_update);
+ gimp_image_map_apply (wt->image_map, &to_update);
}
static void
@@ -603,7 +601,7 @@ gimp_warp_tool_undo (GimpWarpTool *wt)
bbox.height = max_y - min_y + size;
gimp_image_map_abort (wt->image_map);
- gimp_image_map_apply_region (wt->image_map, &bbox);
+ gimp_image_map_apply (wt->image_map, &bbox);
}
g_object_unref (stroke);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]