[gimp] app: remove gimp_draw_tool_draw_arc_by_anchor()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: remove gimp_draw_tool_draw_arc_by_anchor()
- Date: Sat, 25 Sep 2010 16:00:45 +0000 (UTC)
commit e91dce5f9f87d805219e6d4feb6e014deb8f0763
Author: Michael Natterer <mitch gimp org>
Date: Sat Sep 25 17:59:56 2010 +0200
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 4b55d2c..e67a539 100644
--- a/app/tools/gimpdrawtool.c
+++ b/app/tools/gimpdrawtool.c
@@ -548,35 +548,6 @@ gimp_draw_tool_draw_arc (GimpDrawTool *draw_tool,
}
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,
gdouble x,
diff --git a/app/tools/gimpdrawtool.h b/app/tools/gimpdrawtool.h
index 7fc6137..d6a36dc 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 1be8526..c7141a8 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]