[gimp] app: add gimp_draw_tool_remove_item()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: add gimp_draw_tool_remove_item()
- Date: Sun, 26 Sep 2010 12:16:14 +0000 (UTC)
commit b173707c846fe64fade70ce5ed3bde4fcbcc050e
Author: Michael Natterer <mitch gimp org>
Date: Sun Sep 26 14:15:47 2010 +0200
app: add gimp_draw_tool_remove_item()
app/tools/gimpdrawtool.c | 11 +++++++++++
app/tools/gimpdrawtool.h | 3 +++
2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/app/tools/gimpdrawtool.c b/app/tools/gimpdrawtool.c
index b20a53d..dbb249c 100644
--- a/app/tools/gimpdrawtool.c
+++ b/app/tools/gimpdrawtool.c
@@ -374,6 +374,17 @@ gimp_draw_tool_add_item (GimpDrawTool *draw_tool,
gimp_canvas_group_add_item (GIMP_CANVAS_GROUP (draw_tool->item), item);
}
+void
+gimp_draw_tool_remove_item (GimpDrawTool *draw_tool,
+ GimpCanvasItem *item)
+{
+ g_return_if_fail (GIMP_IS_DRAW_TOOL (draw_tool));
+ g_return_if_fail (GIMP_IS_CANVAS_ITEM (item));
+ g_return_if_fail (draw_tool->item != NULL);
+
+ gimp_canvas_group_remove_item (GIMP_CANVAS_GROUP (draw_tool->item), item);
+}
+
/**
* gimp_draw_tool_add_line:
* @draw_tool: the #GimpDrawTool
diff --git a/app/tools/gimpdrawtool.h b/app/tools/gimpdrawtool.h
index 489e5e7..4b43489 100644
--- a/app/tools/gimpdrawtool.h
+++ b/app/tools/gimpdrawtool.h
@@ -84,6 +84,9 @@ gdouble gimp_draw_tool_calc_distance_square (GimpDrawTool *draw_too
void gimp_draw_tool_add_item (GimpDrawTool *draw_tool,
GimpCanvasItem *item);
+void gimp_draw_tool_remove_item (GimpDrawTool *draw_tool,
+ GimpCanvasItem *item);
+
GimpCanvasItem * gimp_draw_tool_add_line (GimpDrawTool *draw_tool,
gdouble x1,
gdouble y1,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]