app/vectors/gimpstroke.c Two small hacks to make the editing behave more

2003-09-03  Simon Budig  <simon@gimp.org>

	* app/vectors/gimpstroke.c
	* app/vectors/gimpbezierstroke.c: Two small hacks to make the
	editing behave more symmetric (no more a user visible difference
	between extending to the start or to the end of a stroke).

	* app/tools/gimpvectortool.c: Use dashed lines for the connection
	between the anchor and the handles. Looks great IMHO.
This commit is contained in:
Simon Budig 2003-09-03 21:35:24 +00:00 committed by Simon Budig
parent c711123bec
commit 70088acbcd
4 changed files with 37 additions and 13 deletions

View File

@ -1,3 +1,13 @@
2003-09-03 Simon Budig <simon@gimp.org>
* app/vectors/gimpstroke.c
* app/vectors/gimpbezierstroke.c: Two small hacks to make the
editing behave more symmetric (no more a user visible difference
between extending to the start or to the end of a stroke).
* app/tools/gimpvectortool.c: Use dashed lines for the connection
between the anchor and the handles. Looks great IMHO.
2003-09-03 Simon Budig <simon@gimp.org>
* app/tools/gimpvectortool.[ch]: properly keep track of the

View File

@ -1178,10 +1178,14 @@ gimp_vector_tool_draw (GimpDrawTool *draw_tool)
gint i;
for (i = 0; i < coords->len; i += 2)
gimp_draw_tool_draw_strokes (draw_tool,
&g_array_index (coords,
GimpCoords, i),
2, FALSE, FALSE);
{
gimp_draw_tool_draw_dashed_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,
FALSE);
}
}
g_array_free (coords, TRUE);

View File

@ -972,18 +972,18 @@ gimp_bezier_stroke_extend (GimpStroke *stroke,
* search for its loose end.
*/
{
if (listneighbor->prev &&
listneighbor->prev->prev == NULL)
{
loose_end = -1;
listneighbor = listneighbor->prev;
}
else if (listneighbor->next &&
if (listneighbor->next &&
listneighbor->next->next == NULL)
{
loose_end = 1;
listneighbor = listneighbor->next;
}
else if (listneighbor->prev &&
listneighbor->prev->prev == NULL)
{
loose_end = -1;
listneighbor = listneighbor->prev;
}
}
}
}

View File

@ -1133,11 +1133,21 @@ gimp_stroke_real_get_draw_controls (const GimpStroke *stroke)
if (next && next->type == GIMP_ANCHOR_ANCHOR && next->selected)
{
ret_list = g_list_prepend (ret_list, anchor);
/* Ok, this is a hack.
* The idea is to give control points at the end of a
* stroke a higher priority for the interactive tool. */
if (prev)
ret_list = g_list_prepend (ret_list, anchor);
else
ret_list = g_list_append (ret_list, anchor);
}
else if (prev && prev->type == GIMP_ANCHOR_ANCHOR && prev->selected)
{
ret_list = g_list_prepend (ret_list, anchor);
/* same here... */
if (next)
ret_list = g_list_prepend (ret_list, anchor);
else
ret_list = g_list_append (ret_list, anchor);
}
}
}