diff --git a/src/gradient-drag.h b/src/gradient-drag.h
index 72e9ce0dd5a31d30d6b87f4ad8becf0306edaf03..365da9b9253beb43b7a6221aa23daca0f2c94754 100644 (file)
--- a/src/gradient-drag.h
+++ b/src/gradient-drag.h
/**
This class represents a single draggable point of a gradient. It remembers the item
-which has the gradient, whether it's fill or stroke, the point type (from the
-GrPointType enum), and the point number (needed if more than 2 stops are present).
+which has the gradient, whether it's fill or stroke, and the point number (from the
+GrPoint enum).
*/
struct GrDraggable {
- GrDraggable(SPItem *item, guint point_type, guint point_i, bool fill_or_stroke);
+ GrDraggable(SPItem *item, guint point_num, bool fill_or_stroke);
~GrDraggable();
SPItem *item;
- guint point_type;
- guint point_i; // the stop number of this point ( = 0 for all types except POINT_LG_MID)
+ guint point_num;
bool fill_or_stroke;
bool mayMerge (GrDraggable *da2);
inline int equals (GrDraggable *other) {
- return ((item == other->item) && (point_type == other->point_type) && (point_i == other->point_i) && (fill_or_stroke == other->fill_or_stroke));
+ return ((item == other->item) && (point_num == other->point_num) && (fill_or_stroke == other->fill_or_stroke));
}
};
void updateKnotShape();
void updateTip();
- void moveThisToDraggable (SPItem *item, guint point_type, guint point_i, bool fill_or_stroke, bool write_repr);
- void moveOtherToDraggable (SPItem *item, guint point_type, guint point_i, bool fill_or_stroke, bool write_repr);
+ void moveThisToDraggable (SPItem *item, guint point_num, bool fill_or_stroke, bool write_repr);
+ void moveOtherToDraggable (SPItem *item, guint point_num, bool fill_or_stroke, bool write_repr);
void updateDependencies (bool write_repr);
bool mayMerge (GrDragger *other);
bool mayMerge (GrDraggable *da2);
- bool isA (guint point_type);
- bool isA (SPItem *item, guint point_type, guint point_i, bool fill_or_stroke);
+ bool isA (guint point_num);
+ bool isA (SPItem *item, guint point_num, bool fill_or_stroke);
void fireDraggables (bool write_repr, bool scale_radial = false, bool merging_focus = false);
};
GrDragger *selected;
void setSelected (GrDragger *dragger);
- GrDragger *getDraggerFor (SPItem *item, guint point_type, guint point_i, bool fill_or_stroke);
+ GrDragger *getDraggerFor (SPItem *item, guint point_num, bool fill_or_stroke);
- void grabKnot (SPItem *item, guint point_type, guint point_i, bool fill_or_stroke, gint x, gint y, guint32 etime);
+ void grabKnot (SPItem *item, guint point_num, bool fill_or_stroke, gint x, gint y, guint32 etime);
bool local_change;