[gimp] warp-tool: temporary fix to update the preview with imagemap apply_region, not totally working
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] warp-tool: temporary fix to update the preview with imagemap apply_region, not totally working
- Date: Tue, 21 May 2013 21:47:29 +0000 (UTC)
commit afa98e6ece1d09b3d7d7bfc65a2a030c57dcde6e
Author: Michael Muré <batolettre gmail com>
Date: Tue Jul 26 16:59:57 2011 +0200
warp-tool: temporary fix to update the preview with imagemap apply_region, not totally working
app/tools/gimpwarptool.c | 17 ++++++-----------
1 files changed, 6 insertions(+), 11 deletions(-)
---
diff --git a/app/tools/gimpwarptool.c b/app/tools/gimpwarptool.c
index e72b2c9..fefa9c9 100644
--- a/app/tools/gimpwarptool.c
+++ b/app/tools/gimpwarptool.c
@@ -510,22 +510,16 @@ gimp_warp_tool_create_image_map (GimpWarpTool *wt,
static void
gimp_warp_tool_image_map_update (GimpWarpTool *wt)
{
- GimpTool *tool = GIMP_TOOL (wt);
GimpWarpOptions *options = GIMP_WARP_TOOL_GET_OPTIONS (wt);
- GimpDisplayShell *shell = gimp_display_get_shell (tool->display);
- GimpCoords coords, result;
GeglRectangle region;
- coords.x = wt->cursor_x;
- coords.y = wt->cursor_y;
-
- gimp_display_shell_untransform_coords (shell, &coords, &result);
-
- region.x = result.x - options->effect_size / 2.0;
- region.y = result.y - options->effect_size / 2.0;
+ region.x = wt->cursor_x - options->effect_size / 2.0;
+ region.y = wt->cursor_y - options->effect_size / 2.0;
region.width = options->effect_size;
region.height = options->effect_size;
+ printf("rect: (%d,%d), %dx%d\n", region.x, region.y, region.width, region.height);
+
gimp_image_map_apply_region (wt->image_map, ®ion);
}
@@ -563,6 +557,7 @@ gimp_warp_tool_add_op (GimpWarpTool *wt)
gegl_node_connect_to (last_op, "output", new_op, "input");
gegl_node_connect_to (new_op, "output", wt->render_node, "aux");
}
+
static void
gimp_warp_tool_undo (GimpWarpTool *wt)
{
@@ -573,7 +568,7 @@ gimp_warp_tool_undo (GimpWarpTool *wt)
to_delete = gegl_node_get_producer (wt->render_node, "aux", NULL);
type = gegl_node_get_operation(to_delete);
- if (strcmp (type, "gimp:warp"))
+ if (strcmp (type, "gegl:warp"))
return;
previous = gegl_node_get_producer (to_delete, "input", NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]