X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=synfig-core%2Fsrc%2Fsynfig%2Fblinepoint.cpp;h=0091e088f36fc9f2571db51cc6fed38b64f2b635;hb=de828fa746ed426bfe344b42fb3c07222b3e02be;hp=83e004d95a6257481f67f5c5705807201fd4c3b1;hpb=6d4c7c2c1e18db59f926245f5a29c68345db5879;p=synfig.git diff --git a/synfig-core/src/synfig/blinepoint.cpp b/synfig-core/src/synfig/blinepoint.cpp index 83e004d..0091e08 100644 --- a/synfig-core/src/synfig/blinepoint.cpp +++ b/synfig-core/src/synfig/blinepoint.cpp @@ -49,22 +49,16 @@ using namespace synfig; void synfig::BLinePoint::reverse() { - std::swap(tangent_[0],tangent_[1]); - tangent_[0]=-tangent_[0]; - tangent_[1]=-tangent_[1]; + if(split_tangent_) + { + std::swap(tangent_[0],tangent_[1]); + tangent_[0]=-tangent_[0]; + tangent_[1]=-tangent_[1]; + } + else + { + tangent_[0]=-tangent_[0]; + tangent_[1]=-tangent_[1]; + } } -void -synfig::BLinePoint::normalize(int i) -{ - //i is the number of the tangent to modify - //other tangent is (1-i) - split_tangent_=(!link_radius_ && !link_theta_); - if (link_radius_ && link_theta_) - tangent_[i]=tangent_[1-i]; - else if (link_radius_) - tangent_[i]=tangent_[i].norm()*tangent_[1-i].mag(); - else if (link_theta_) - tangent_[i]=tangent_[1-i].norm()*tangent_[i].mag(); - -}