{
return origin_duck?origin_duck->get_sub_trans_point():origin;
}
+
+#ifdef _DEBUG
+synfig::String
+Duck::type_name(Type id)
+{
+ String ret;
+
+ if (id & TYPE_POSITION) { if (!ret.empty()) ret += ", "; ret += "position"; }
+ if (id & TYPE_TANGENT ) { if (!ret.empty()) ret += ", "; ret += "tangent" ; }
+ if (id & TYPE_RADIUS ) { if (!ret.empty()) ret += ", "; ret += "radius" ; }
+ if (id & TYPE_WIDTH ) { if (!ret.empty()) ret += ", "; ret += "width" ; }
+ if (id & TYPE_ANGLE ) { if (!ret.empty()) ret += ", "; ret += "angle" ; }
+ if (id & TYPE_VERTEX ) { if (!ret.empty()) ret += ", "; ret += "vertex" ; }
+
+ if (ret.empty())
+ ret = "none";
+
+ return ret;
+}
+#endif // _DEBUG
synfig::String get_name()const { return name; }
bool operator==(const Duck &rhs)const;
+
+#ifdef _DEBUG
+ //! Returns a string containing the name of the given Type
+ static synfig::String type_name(Type id);
+
+ //! Returns a string containing the name of the type
+ synfig::String type_name()const { return type_name(get_type()); }
+#endif // _DEBUG
+
}; // END of class Duck
//! Combine Flags