app: remove gimp_draw_tool_draw_dashed_line()

Instead, draw a normal line and set the "highlight" property on the
returned canvas item.
This commit is contained in:
Michael Natterer 2010-09-25 18:04:40 +02:00
parent e91dce5f9f
commit dfd5a265eb
3 changed files with 6 additions and 38 deletions

View File

@ -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

View File

@ -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);

View File

@ -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);
}
}