[gimp/soc-2011-warp: 20/72] gimpwarptool: draw the effect size with taking care of zoom level
- From: Michael Murà <mmure src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/soc-2011-warp: 20/72] gimpwarptool: draw the effect size with taking care of zoom level
- Date: Wed, 14 Mar 2012 12:19:02 +0000 (UTC)
commit 8205be41fe78ce68b90376676f918bc152a5ea51
Author: Michael Murà <batolettre gmail com>
Date: Mon Jun 6 20:07:50 2011 +0200
gimpwarptool: draw the effect size with taking care of zoom level
app/tools/gimpwarptool.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/app/tools/gimpwarptool.c b/app/tools/gimpwarptool.c
index 5092c50..d089b19 100644
--- a/app/tools/gimpwarptool.c
+++ b/app/tools/gimpwarptool.c
@@ -427,17 +427,24 @@ gimp_warp_tool_cursor_update (GimpTool *tool,
static void
gimp_warp_tool_draw (GimpDrawTool *draw_tool)
{
- GimpWarpTool *wt = GIMP_WARP_TOOL (draw_tool);
- GimpWarpOptions *options = GIMP_WARP_TOOL_GET_OPTIONS (wt);
+ GimpWarpTool *wt = GIMP_WARP_TOOL (draw_tool);
+ GimpTool *tool = GIMP_TOOL (wt);
+ GimpDisplayShell *shell = gimp_display_get_shell (tool->display);
+ GimpWarpOptions *options = GIMP_WARP_TOOL_GET_OPTIONS (wt);
+ gdouble sizex;
+ gdouble sizey;
- if (options->effect_size >= 3.0)
+ sizex = SCALEX (shell, options->effect_size);
+ sizey = SCALEY (shell, options->effect_size);
+
+ if (sizex >= 3.0 && sizey >= 3.0)
{
gimp_draw_tool_add_handle (draw_tool,
GIMP_HANDLE_CIRCLE,
wt->cursor_x,
wt->cursor_y,
- options->effect_size,
- options->effect_size,
+ sizex,
+ sizey,
GIMP_HANDLE_ANCHOR_CENTER);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]