[gimp] app: keep GimpColorTool->center_x and _y around in image coords
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: keep GimpColorTool->center_x and _y around in image coords
- Date: Wed, 22 Sep 2010 23:04:54 +0000 (UTC)
commit 517e77b70766fae8797e83817ba851e35ee3a524
Author: Michael Natterer <mitch gimp org>
Date: Thu Sep 23 01:04:22 2010 +0200
app: keep GimpColorTool->center_x and _y around in image coords
app/tools/gimpcolortool.c | 19 +++++--------------
1 files changed, 5 insertions(+), 14 deletions(-)
---
diff --git a/app/tools/gimpcolortool.c b/app/tools/gimpcolortool.c
index 376d2e1..f9f64fb 100644
--- a/app/tools/gimpcolortool.c
+++ b/app/tools/gimpcolortool.c
@@ -273,13 +273,8 @@ gimp_color_tool_button_press (GimpTool *tool,
}
else
{
- gint off_x, off_y;
-
- /* Keep the coordinates of the target */
- gimp_item_get_offset (GIMP_ITEM (tool->drawable), &off_x, &off_y);
-
- color_tool->center_x = coords->x - off_x;
- color_tool->center_y = coords->y - off_y;
+ color_tool->center_x = coords->x;
+ color_tool->center_y = coords->y;
gimp_draw_tool_start (GIMP_DRAW_TOOL (tool), display);
@@ -459,14 +454,10 @@ gimp_color_tool_motion (GimpTool *tool,
}
else
{
- gint off_x, off_y;
-
gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool));
- gimp_item_get_offset (GIMP_ITEM (tool->drawable), &off_x, &off_y);
-
- color_tool->center_x = coords->x - off_x;
- color_tool->center_y = coords->y - off_y;
+ color_tool->center_x = coords->x;
+ color_tool->center_y = coords->y;
gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));
@@ -609,7 +600,7 @@ gimp_color_tool_draw (GimpDrawTool *draw_tool)
color_tool->center_y - radius,
2 * radius + 1,
2 * radius + 1,
- TRUE);
+ FALSE);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]