mirror of https://github.com/GNOME/gimp.git
app: reorder code in draw() so handles are on top of lines
This commit is contained in:
parent
39a4dfb923
commit
2c0520281d
|
@ -1417,6 +1417,23 @@ gimp_vector_tool_draw (GimpDrawTool *draw_tool)
|
|||
|
||||
while ((cur_stroke = gimp_vectors_stroke_get_next (vectors, cur_stroke)))
|
||||
{
|
||||
/* the stroke itself */
|
||||
if (! gimp_item_get_visible (GIMP_ITEM (vectors)))
|
||||
{
|
||||
coords = gimp_stroke_interpolate (cur_stroke, 1.0, &closed);
|
||||
|
||||
if (coords)
|
||||
{
|
||||
if (coords->len)
|
||||
gimp_draw_tool_draw_strokes (draw_tool,
|
||||
&g_array_index (coords,
|
||||
GimpCoords, 0),
|
||||
coords->len, FALSE);
|
||||
|
||||
g_array_free (coords, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
/* anchor handles */
|
||||
draw_anchors = gimp_stroke_get_draw_anchors (cur_stroke);
|
||||
|
||||
|
@ -1442,24 +1459,6 @@ gimp_vector_tool_draw (GimpDrawTool *draw_tool)
|
|||
|
||||
if (vector_tool->sel_count <= 2)
|
||||
{
|
||||
/* control handles */
|
||||
draw_anchors = gimp_stroke_get_draw_controls (cur_stroke);
|
||||
|
||||
for (list = draw_anchors; list; list = g_list_next (list))
|
||||
{
|
||||
cur_anchor = GIMP_ANCHOR (list->data);
|
||||
|
||||
gimp_draw_tool_draw_handle (draw_tool,
|
||||
GIMP_HANDLE_SQUARE,
|
||||
cur_anchor->position.x,
|
||||
cur_anchor->position.y,
|
||||
TARGET - 3,
|
||||
TARGET - 3,
|
||||
GTK_ANCHOR_CENTER);
|
||||
}
|
||||
|
||||
g_list_free (draw_anchors);
|
||||
|
||||
/* the lines to the control handles */
|
||||
coords = gimp_stroke_get_draw_lines (cur_stroke);
|
||||
|
||||
|
@ -1482,23 +1481,24 @@ gimp_vector_tool_draw (GimpDrawTool *draw_tool)
|
|||
|
||||
g_array_free (coords, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
/* the stroke itself */
|
||||
if (! gimp_item_get_visible (GIMP_ITEM (vectors)))
|
||||
{
|
||||
coords = gimp_stroke_interpolate (cur_stroke, 1.0, &closed);
|
||||
/* control handles */
|
||||
draw_anchors = gimp_stroke_get_draw_controls (cur_stroke);
|
||||
|
||||
if (coords)
|
||||
for (list = draw_anchors; list; list = g_list_next (list))
|
||||
{
|
||||
if (coords->len)
|
||||
gimp_draw_tool_draw_strokes (draw_tool,
|
||||
&g_array_index (coords,
|
||||
GimpCoords, 0),
|
||||
coords->len, FALSE);
|
||||
cur_anchor = GIMP_ANCHOR (list->data);
|
||||
|
||||
g_array_free (coords, TRUE);
|
||||
gimp_draw_tool_draw_handle (draw_tool,
|
||||
GIMP_HANDLE_SQUARE,
|
||||
cur_anchor->position.x,
|
||||
cur_anchor->position.y,
|
||||
TARGET - 3,
|
||||
TARGET - 3,
|
||||
GTK_ANCHOR_CENTER);
|
||||
}
|
||||
|
||||
g_list_free (draw_anchors);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue