From e91dce5f9f87d805219e6d4feb6e014deb8f0763 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Sat, 25 Sep 2010 17:59:56 +0200 Subject: [PATCH] app: remove gimp_draw_tool_draw_arc_by_anchor() Instead, draw a circular handle and set the angles on the returned canvas item. --- app/tools/gimpdrawtool.c | 29 ----------------------------- app/tools/gimpdrawtool.h | 10 ---------- app/tools/gimpmeasuretool.c | 15 ++++++++++----- 3 files changed, 10 insertions(+), 44 deletions(-) diff --git a/app/tools/gimpdrawtool.c b/app/tools/gimpdrawtool.c index 4b55d2cf23..e67a5394fc 100644 --- a/app/tools/gimpdrawtool.c +++ b/app/tools/gimpdrawtool.c @@ -547,35 +547,6 @@ gimp_draw_tool_draw_arc (GimpDrawTool *draw_tool, return item; } -GimpCanvasItem * -gimp_draw_tool_draw_arc_by_anchor (GimpDrawTool *draw_tool, - gboolean filled, - gdouble x, - gdouble y, - gint width, - gint height, - gdouble start_angle, - gdouble slice_angle, - GtkAnchorType anchor) -{ - GimpCanvasItem *item; - - g_return_val_if_fail (GIMP_IS_DRAW_TOOL (draw_tool), NULL); - - item = gimp_canvas_handle_new (filled ? - GIMP_HANDLE_FILLED_CIRCLE : - GIMP_HANDLE_CIRCLE, - anchor, x, y, width, height); - - gimp_canvas_handle_set_angles (GIMP_CANVAS_HANDLE (item), - start_angle, slice_angle); - - gimp_draw_tool_add_item (draw_tool, item); - g_object_unref (item); - - return item; -} - GimpCanvasItem * gimp_draw_tool_draw_handle (GimpDrawTool *draw_tool, GimpHandleType type, diff --git a/app/tools/gimpdrawtool.h b/app/tools/gimpdrawtool.h index 7fc61378dd..d6a36dc409 100644 --- a/app/tools/gimpdrawtool.h +++ b/app/tools/gimpdrawtool.h @@ -117,16 +117,6 @@ GimpCanvasItem * gimp_draw_tool_draw_arc (GimpDrawTool *draw_too gdouble start_angle, gdouble slice_angle); -GimpCanvasItem * gimp_draw_tool_draw_arc_by_anchor (GimpDrawTool *draw_tool, - gboolean filled, - gdouble x, - gdouble y, - gint width, - gint height, - gdouble start_angle, - gdouble slice_angle, - GtkAnchorType anchor); - GimpCanvasItem * gimp_draw_tool_draw_handle (GimpDrawTool *draw_tool, GimpHandleType type, gdouble x, diff --git a/app/tools/gimpmeasuretool.c b/app/tools/gimpmeasuretool.c index 1be85260e1..c7141a8998 100644 --- a/app/tools/gimpmeasuretool.c +++ b/app/tools/gimpmeasuretool.c @@ -42,6 +42,7 @@ #include "widgets/gimptooldialog.h" #include "widgets/gimpwidgets-utils.h" +#include "display/gimpcanvashandle.h" #include "display/gimpdisplay.h" #include "display/gimpdisplayshell.h" #include "display/gimpdisplayshell-appearance.h" @@ -721,15 +722,19 @@ gimp_measure_tool_draw (GimpDrawTool *draw_tool) if (angle2 != 0.0) { - gimp_draw_tool_draw_arc_by_anchor (draw_tool, - FALSE, + GimpCanvasItem *item; + + item = gimp_draw_tool_draw_handle (draw_tool, + GIMP_HANDLE_CIRCLE, measure->x[0], measure->y[0], - ARC_RADIUS * 2, - ARC_RADIUS * 2, - angle1, angle2, + ARC_RADIUS * 2 + 1, + ARC_RADIUS * 2 + 1, GTK_ANCHOR_CENTER); + gimp_canvas_handle_set_angles (GIMP_CANVAS_HANDLE (item), + angle1, angle2); + if (measure->num_points == 2) { GimpDisplayShell *shell;