mirror of https://github.com/GNOME/gimp.git
implemented gimp_stroke_close.
2003-08-02 Simon Budig <simon@gimp.org> * app/vectors/gimpstroke.[ch]: implemented gimp_stroke_close. * app/vectors/gimpbezierstroke.c: only extend a stroke if it is not closed. * app/tools/gimpvectortool.c: ALT-Click on an anchor now closes the stroke. Will evolve to the ability to connect two strokes.
This commit is contained in:
parent
9f82c98c62
commit
10cb43d2fb
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
||||||
|
2003-08-02 Simon Budig <simon@gimp.org>
|
||||||
|
|
||||||
|
* app/vectors/gimpstroke.[ch]: implemented gimp_stroke_close.
|
||||||
|
|
||||||
|
* app/vectors/gimpbezierstroke.c: only extend a stroke if
|
||||||
|
it is not closed.
|
||||||
|
|
||||||
|
* app/tools/gimpvectortool.c: ALT-Click on an anchor now
|
||||||
|
closes the stroke. Will evolve to the ability to connect
|
||||||
|
two strokes.
|
||||||
|
|
||||||
2003-08-01 Henrik Brix Andersen <brix@gimp.org>
|
2003-08-01 Henrik Brix Andersen <brix@gimp.org>
|
||||||
|
|
||||||
* plug-ins/rcm/rcm.c
|
* plug-ins/rcm/rcm.c
|
||||||
|
|
|
@ -241,6 +241,8 @@ gimp_vector_tool_button_press (GimpTool *tool,
|
||||||
* (SHFT) -> multiple selection
|
* (SHFT) -> multiple selection
|
||||||
* (CTRL) -> Drag out control point
|
* (CTRL) -> Drag out control point
|
||||||
* (CTRL+SHFT) -> Convert to corner
|
* (CTRL+SHFT) -> Convert to corner
|
||||||
|
* (ALT) -> close this stroke (really should be able to connect
|
||||||
|
* two strokes)
|
||||||
*
|
*
|
||||||
* Handle: (NONE) -> Regular Movement
|
* Handle: (NONE) -> Regular Movement
|
||||||
* (SHFT) -> (Handle) Move opposite handle symmetrically
|
* (SHFT) -> (Handle) Move opposite handle symmetrically
|
||||||
|
@ -357,6 +359,9 @@ gimp_vector_tool_button_press (GimpTool *tool,
|
||||||
if (state & GDK_CONTROL_MASK)
|
if (state & GDK_CONTROL_MASK)
|
||||||
gimp_vector_tool_on_handle (tool, coords, GIMP_ANCHOR_CONTROL,
|
gimp_vector_tool_on_handle (tool, coords, GIMP_ANCHOR_CONTROL,
|
||||||
gdisp, &anchor, &stroke);
|
gdisp, &anchor, &stroke);
|
||||||
|
|
||||||
|
if (state & GDK_MOD1_MASK)
|
||||||
|
gimp_stroke_close (stroke);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -220,6 +220,8 @@ gimp_bezier_stroke_extend (GimpBezierStroke *bezier_stroke,
|
||||||
|
|
||||||
stroke = GIMP_STROKE (bezier_stroke);
|
stroke = GIMP_STROKE (bezier_stroke);
|
||||||
|
|
||||||
|
g_return_val_if_fail (!stroke->closed, NULL);
|
||||||
|
|
||||||
if (stroke->anchors == NULL)
|
if (stroke->anchors == NULL)
|
||||||
{
|
{
|
||||||
/* assure that there is no neighbor specified */
|
/* assure that there is no neighbor specified */
|
||||||
|
|
|
@ -366,6 +366,12 @@ gimp_stroke_real_anchor_move_absolute (GimpStroke *stroke,
|
||||||
anchor->position.y = coord->y;
|
anchor->position.y = coord->y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_stroke_close (GimpStroke *stroke)
|
||||||
|
{
|
||||||
|
stroke->closed = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
gimp_stroke_anchor_convert (GimpStroke *stroke,
|
gimp_stroke_anchor_convert (GimpStroke *stroke,
|
||||||
|
|
|
@ -124,6 +124,8 @@ void gimp_stroke_anchor_move_absolute (GimpStroke *stroke,
|
||||||
const GimpCoords *coord,
|
const GimpCoords *coord,
|
||||||
GimpAnchorFeatureType feature);
|
GimpAnchorFeatureType feature);
|
||||||
|
|
||||||
|
void gimp_stroke_close (GimpStroke *stroke);
|
||||||
|
|
||||||
void gimp_stroke_anchor_convert (GimpStroke *stroke,
|
void gimp_stroke_anchor_convert (GimpStroke *stroke,
|
||||||
GimpAnchor *anchor,
|
GimpAnchor *anchor,
|
||||||
GimpAnchorFeatureType feature);
|
GimpAnchorFeatureType feature);
|
||||||
|
@ -138,7 +140,7 @@ gdouble gimp_stroke_get_length (const GimpStroke *stroke);
|
||||||
gdouble gimp_stroke_get_distance (const GimpStroke *stroke,
|
gdouble gimp_stroke_get_distance (const GimpStroke *stroke,
|
||||||
const GimpCoords *coord);
|
const GimpCoords *coord);
|
||||||
|
|
||||||
/* returns the number of valid coordinates */
|
/* returns an array of valid coordinates */
|
||||||
GArray * gimp_stroke_interpolate (const GimpStroke *stroke,
|
GArray * gimp_stroke_interpolate (const GimpStroke *stroke,
|
||||||
gdouble precision,
|
gdouble precision,
|
||||||
gboolean *closed);
|
gboolean *closed);
|
||||||
|
|
Loading…
Reference in New Issue