From 8fe7ff9d578c6118d3cd2b0f2e3f201c99aabaec Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sun, 7 Jan 2007 21:51:23 +0000 Subject: Reverting revision 13615 (bzr r2150) --- src/gradient-drag.h | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'src/gradient-drag.h') diff --git a/src/gradient-drag.h b/src/gradient-drag.h index 72e9ce0dd..365da9b92 100644 --- a/src/gradient-drag.h +++ b/src/gradient-drag.h @@ -27,22 +27,21 @@ class Point; /** 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)); } }; @@ -76,15 +75,15 @@ struct GrDragger { 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); }; @@ -107,9 +106,9 @@ struct GrDrag { 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; -- cgit v1.2.3