[gimp/soc-2011-warp] gimpwarptool: use gimp_draw_tool_add_arc instead of gimp_draw_tool_add_handle to draw the effect siz
- From: Michael Muré <mmure src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/soc-2011-warp] gimpwarptool: use gimp_draw_tool_add_arc instead of gimp_draw_tool_add_handle to draw the effect siz
- Date: Mon, 6 Jun 2011 18:40:30 +0000 (UTC)
commit cbf3a2e01a9f2d49b6d7b8807ddd525975d7ce59
Author: Michael Muré <batolettre gmail com>
Date: Mon Jun 6 20:39:05 2011 +0200
gimpwarptool: use gimp_draw_tool_add_arc instead of gimp_draw_tool_add_handle to draw the effect size
app/tools/gimpwarptool.c | 24 +++++++-----------------
1 files changed, 7 insertions(+), 17 deletions(-)
---
diff --git a/app/tools/gimpwarptool.c b/app/tools/gimpwarptool.c
index d089b19..e257621 100644
--- a/app/tools/gimpwarptool.c
+++ b/app/tools/gimpwarptool.c
@@ -428,25 +428,15 @@ static void
gimp_warp_tool_draw (GimpDrawTool *draw_tool)
{
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;
- 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,
- sizex,
- sizey,
- GIMP_HANDLE_ANCHOR_CENTER);
- }
+ gimp_draw_tool_add_arc (draw_tool,
+ FALSE,
+ wt->cursor_x - options->effect_size / 2.0,
+ wt->cursor_y - options->effect_size / 2.0,
+ options->effect_size,
+ options->effect_size,
+ 0.0, 2.0 * G_PI);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]