[gimp] app: fix warping an offset layer with selection
- From: Massimo Valentini <mvalentini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: fix warping an offset layer with selection
- Date: Thu, 23 May 2013 17:06:48 +0000 (UTC)
commit e378a29a9199cccbab8e09ccc55546015298a6e4
Author: Massimo Valentini <mvalentini src gnome org>
Date: Thu May 23 19:03:31 2013 +0200
app: fix warping an offset layer with selection
app/tools/gimpwarptool.c | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/app/tools/gimpwarptool.c b/app/tools/gimpwarptool.c
index e1820f7..bd91047 100644
--- a/app/tools/gimpwarptool.c
+++ b/app/tools/gimpwarptool.c
@@ -520,7 +520,6 @@ gimp_warp_tool_start (GimpWarpTool *wt,
GimpImage *image = gimp_display_get_image (display);
GimpDrawable *drawable = gimp_image_get_active_drawable (image);
const Babl *format;
- gint x1, x2, y1, y2;
GeglRectangle bbox;
tool->display = display;
@@ -529,12 +528,8 @@ gimp_warp_tool_start (GimpWarpTool *wt,
/* Create the coords buffer, with the size of the selection */
format = babl_format_n (babl_type ("float"), 2);
- gimp_channel_bounds (gimp_image_get_mask (image), &x1, &y1, &x2, &y2);
-
- bbox.x = MIN (x1, x2);
- bbox.y = MIN (y1, y2);
- bbox.width = ABS (x1 - x2);
- bbox.height = ABS (y1 - y2);
+ gimp_item_mask_intersect (GIMP_ITEM (drawable), &bbox.x, &bbox.y,
+ &bbox.width, &bbox.height);
#ifdef WARP_DEBUG
g_printerr ("Initialize coordinate buffer (%d,%d) at %d,%d\n",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]