mirror of https://github.com/GNOME/gimp.git
app: remove gimp_draw_tool_draw_arc_by_anchor()
Instead, draw a circular handle and set the angles on the returned canvas item.
This commit is contained in:
parent
5cda4393d0
commit
e91dce5f9f
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue