app: rename enum GimpVectorExtendMode to GimpStrokeExtendMode

and give namespace to its values.
This commit is contained in:
Michael Natterer 2025-07-07 15:05:59 +02:00
parent bf405d3d93
commit d88a3b9345
6 changed files with 22 additions and 22 deletions

View file

@ -667,7 +667,7 @@ gimp_tool_path_button_press (GimpToolWidget *widget,
private->cur_anchor = gimp_bezier_stroke_extend (private->sel_stroke,
&position,
private->sel_anchor,
EXTEND_EDITABLE);
GIMP_STROKE_EXTEND_EDITABLE);
private->restriction = GIMP_ANCHOR_FEATURE_SYMMETRIC;

View file

@ -230,7 +230,7 @@ gimp_bezier_stroke_new_from_coords (const GimpCoords *coords,
last_anchor = gimp_bezier_stroke_extend (stroke,
&coords[count],
last_anchor,
EXTEND_SIMPLE);
GIMP_STROKE_EXTEND_SIMPLE);
if (closed)
gimp_stroke_close (stroke);
@ -1120,7 +1120,7 @@ GimpAnchor *
gimp_bezier_stroke_extend (GimpStroke *stroke,
const GimpCoords *coords,
GimpAnchor *neighbor,
GimpVectorExtendMode extend_mode)
GimpStrokeExtendMode extend_mode)
{
GimpAnchor *anchor = NULL;
GList *listneighbor;
@ -1137,18 +1137,18 @@ gimp_bezier_stroke_extend (GimpStroke *stroke,
switch (extend_mode)
{
case EXTEND_SIMPLE:
case GIMP_STROKE_EXTEND_SIMPLE:
break;
case EXTEND_EDITABLE:
case GIMP_STROKE_EXTEND_EDITABLE:
anchor = gimp_bezier_stroke_extend (stroke,
coords, anchor,
EXTEND_SIMPLE);
GIMP_STROKE_EXTEND_SIMPLE);
/* we return the GIMP_ANCHOR_ANCHOR */
gimp_bezier_stroke_extend (stroke,
coords, anchor,
EXTEND_SIMPLE);
GIMP_STROKE_EXTEND_SIMPLE);
break;
@ -1258,7 +1258,7 @@ gimp_bezier_stroke_extend (GimpStroke *stroke,
switch (extend_mode)
{
case EXTEND_SIMPLE:
case GIMP_STROKE_EXTEND_SIMPLE:
switch (control_count)
{
case 0:
@ -1288,29 +1288,29 @@ gimp_bezier_stroke_extend (GimpStroke *stroke,
g_queue_push_head (stroke->anchors, anchor);
break;
case EXTEND_EDITABLE:
case GIMP_STROKE_EXTEND_EDITABLE:
switch (control_count)
{
case 0:
neighbor = gimp_bezier_stroke_extend (stroke,
&(neighbor->position),
neighbor,
EXTEND_SIMPLE);
GIMP_STROKE_EXTEND_SIMPLE);
case 1:
neighbor = gimp_bezier_stroke_extend (stroke,
coords,
neighbor,
EXTEND_SIMPLE);
GIMP_STROKE_EXTEND_SIMPLE);
case 2:
anchor = gimp_bezier_stroke_extend (stroke,
coords,
neighbor,
EXTEND_SIMPLE);
GIMP_STROKE_EXTEND_SIMPLE);
neighbor = gimp_bezier_stroke_extend (stroke,
coords,
anchor,
EXTEND_SIMPLE);
GIMP_STROKE_EXTEND_SIMPLE);
break;
default:
g_warning ("inconsistent bezier curve: "

View file

@ -78,7 +78,7 @@ GimpStroke * gimp_bezier_stroke_new_ellipse (const GimpCoords *center,
GimpAnchor * gimp_bezier_stroke_extend (GimpStroke *stroke,
const GimpCoords *coords,
GimpAnchor *neighbor,
GimpVectorExtendMode extend_mode);
GimpStrokeExtendMode extend_mode);
#endif /* __GIMP_BEZIER_STROKE_H__ */

View file

@ -114,7 +114,7 @@ static gboolean gimp_stroke_real_is_extendable (GimpStroke *stroke,
static GimpAnchor * gimp_stroke_real_extend (GimpStroke *stroke,
const GimpCoords *coords,
GimpAnchor *neighbor,
GimpVectorExtendMode extend_mode);
GimpStrokeExtendMode extend_mode);
gboolean gimp_stroke_real_connect_stroke (GimpStroke *stroke,
GimpAnchor *anchor,
@ -839,7 +839,7 @@ GimpAnchor *
gimp_stroke_extend (GimpStroke *stroke,
const GimpCoords *coords,
GimpAnchor *neighbor,
GimpVectorExtendMode extend_mode)
GimpStrokeExtendMode extend_mode)
{
g_return_val_if_fail (GIMP_IS_STROKE (stroke), NULL);
g_return_val_if_fail (!stroke->closed, NULL);
@ -852,7 +852,7 @@ static GimpAnchor *
gimp_stroke_real_extend (GimpStroke *stroke,
const GimpCoords *coords,
GimpAnchor *neighbor,
GimpVectorExtendMode extend_mode)
GimpStrokeExtendMode extend_mode)
{
g_printerr ("gimp_stroke_extend: default implementation\n");
return NULL;

View file

@ -125,7 +125,7 @@ struct _GimpStrokeClass
GimpAnchor * (* extend) (GimpStroke *stroke,
const GimpCoords *coords,
GimpAnchor *neighbor,
GimpVectorExtendMode extend_mode);
GimpStrokeExtendMode extend_mode);
gboolean (* connect_stroke) (GimpStroke *stroke,
GimpAnchor *anchor,
GimpStroke *extension,
@ -284,7 +284,7 @@ gboolean gimp_stroke_is_extendable (GimpStroke *stroke,
GimpAnchor * gimp_stroke_extend (GimpStroke *stroke,
const GimpCoords *coords,
GimpAnchor *neighbor,
GimpVectorExtendMode extend_mode);
GimpStrokeExtendMode extend_mode);
gboolean gimp_stroke_connect_stroke (GimpStroke *stroke,
GimpAnchor *anchor,

View file

@ -38,9 +38,9 @@ typedef enum
typedef enum
{
EXTEND_SIMPLE,
EXTEND_EDITABLE
} GimpVectorExtendMode;
GIMP_STROKE_EXTEND_SIMPLE,
GIMP_STROKE_EXTEND_EDITABLE
} GimpStrokeExtendMode;
#endif /* __VECTORS_ENUMS_H__ */