diff --git a/app/tools/gimpdrawtool.c b/app/tools/gimpdrawtool.c index e67a5394fc..c4ab08afda 100644 --- a/app/tools/gimpdrawtool.c +++ b/app/tools/gimpdrawtool.c @@ -430,38 +430,6 @@ gimp_draw_tool_draw_line (GimpDrawTool *draw_tool, return item; } -/** - * gimp_draw_tool_draw_dashed_line: - * @draw_tool: the #GimpDrawTool - * @x1: start point X in image coordinates - * @y1: start point Y in image coordinates - * @x2: end point X in image coordinates - * @y2: end point Y in image coordinates - * - * This function takes image space coordinates and transforms them to - * screen window coordinates, then draws a dashed line between the - * resulting coordindates. - **/ -GimpCanvasItem * -gimp_draw_tool_draw_dashed_line (GimpDrawTool *draw_tool, - gdouble x1, - gdouble y1, - gdouble x2, - gdouble y2) -{ - GimpCanvasItem *item; - - g_return_val_if_fail (GIMP_IS_DRAW_TOOL (draw_tool), NULL); - - item = gimp_canvas_line_new (x1, y1, x2, y2); - gimp_canvas_item_set_highlight (item, TRUE); - - gimp_draw_tool_add_item (draw_tool, item); - g_object_unref (item); - - return item; -} - /** * gimp_draw_tool_draw_guide: * @draw_tool: the #GimpDrawTool diff --git a/app/tools/gimpdrawtool.h b/app/tools/gimpdrawtool.h index d6a36dc409..4a473c4b1a 100644 --- a/app/tools/gimpdrawtool.h +++ b/app/tools/gimpdrawtool.h @@ -94,11 +94,6 @@ GimpCanvasItem * gimp_draw_tool_draw_line (GimpDrawTool *draw_too gdouble y1, gdouble x2, gdouble y2); -GimpCanvasItem * gimp_draw_tool_draw_dashed_line (GimpDrawTool *draw_tool, - gdouble x1, - gdouble y1, - gdouble x2, - gdouble y2); GimpCanvasItem * gimp_draw_tool_draw_guide_line (GimpDrawTool *draw_tool, GimpOrientationType orientation, gint position); diff --git a/app/tools/gimpvectortool.c b/app/tools/gimpvectortool.c index b88bc2a51d..7f9c5d5528 100644 --- a/app/tools/gimpvectortool.c +++ b/app/tools/gimpvectortool.c @@ -48,6 +48,7 @@ #include "widgets/gimphelp-ids.h" #include "widgets/gimpwidgets-utils.h" +#include "display/gimpcanvasitem.h" #include "display/gimpdisplay.h" #include "display/gimpdisplayshell.h" #include "display/gimpdisplayshell-scale.h" @@ -1468,12 +1469,16 @@ gimp_vector_tool_draw (GimpDrawTool *draw_tool) for (i = 0; i < coords->len; i += 2) { - gimp_draw_tool_draw_dashed_line + GimpCanvasItem *item; + + item = gimp_draw_tool_draw_line (draw_tool, g_array_index (coords, GimpCoords, i).x, g_array_index (coords, GimpCoords, i).y, g_array_index (coords, GimpCoords, i + 1).x, g_array_index (coords, GimpCoords, i + 1).y); + + gimp_canvas_item_set_highlight (item, TRUE); } }