X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Fsrc%2Fsynfig%2Fblinepoint.h;h=3a75d4b2fedad445bafad5d55f0b5d9564589f9c;hb=HEAD;hp=9a07ba860fceda73485a5f4a146d233ac14b8e9c;hpb=c8dfc1fcfebdcc765fac4de28731a783b6099c35;p=synfig.git diff --git a/synfig-core/src/synfig/blinepoint.h b/synfig-core/src/synfig/blinepoint.h index 9a07ba8..3a75d4b 100644 --- a/synfig-core/src/synfig/blinepoint.h +++ b/synfig-core/src/synfig/blinepoint.h @@ -47,8 +47,6 @@ private: float width_; float origin_; bool split_tangent_; - bool link_radius_; - bool link_theta_; public: @@ -56,9 +54,7 @@ public: vertex_(Point(0,0)), width_(0.01), origin_(0.0), - split_tangent_(false), - link_radius_(true), - link_theta_(true) + split_tangent_(false) { tangent_[0] = Point(0,0); tangent_[1] = Point(0,0); } const Point& get_vertex()const { return vertex_; } @@ -66,10 +62,10 @@ public: const Vector& get_tangent1()const { return tangent_[0]; } - const Vector& get_tangent2()const { return tangent_[1]; } + const Vector& get_tangent2()const { return split_tangent_?tangent_[1]:tangent_[0]; } void set_tangent(const Vector& x) { tangent_[0]=tangent_[1]=x; } - void set_tangent1(const Vector& x) { tangent_[0]=x; normalize(1);} - void set_tangent2(const Vector& x) { tangent_[1]=x; normalize(0);} + void set_tangent1(const Vector& x) { tangent_[0]=x; } + void set_tangent2(const Vector& x) { tangent_[1]=x; } const float& get_width()const { return width_; } @@ -83,16 +79,7 @@ public: const bool& get_split_tangent_flag()const { return split_tangent_; } - void set_split_tangent_flag(bool x=true) { link_radius_=link_theta_=!x; normalize();} - - const bool& get_link_radius_flag()const { return link_radius_; } - void set_link_radius_flag(bool x=true) { link_radius_=x; normalize();} - - const bool& get_link_theta_flag()const { return link_theta_; } - void set_link_theta_flag(bool x=true) { link_theta_=x; normalize();} - - //normalize tangents, i.e. make sure their values correspond to the linkage - void normalize(int i=0); + void set_split_tangent_flag(bool x=true) { split_tangent_=x; } void reverse();