[gimp] app: reorder code in draw() so handles are on top of lines
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: reorder code in draw() so handles are on top of lines
- Date: Thu, 23 Sep 2010 17:47:40 +0000 (UTC)
commit 2c0520281da761b7eb48b57b64e281cb37190a12
Author: Michael Natterer <mitch gimp org>
Date: Thu Sep 23 19:47:14 2010 +0200
app: reorder code in draw() so handles are on top of lines
app/tools/gimpvectortool.c | 60 ++++++++++++++++++++++----------------------
1 files changed, 30 insertions(+), 30 deletions(-)
---
diff --git a/app/tools/gimpvectortool.c b/app/tools/gimpvectortool.c
index 9799b9b..3da4142 100644
--- a/app/tools/gimpvectortool.c
+++ b/app/tools/gimpvectortool.c
@@ -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);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]