blob: da34b09ee08f3b516e2244f794930917daf6141b [file]
#include "shapes/cubic_asymmetric_vertex.hpp"
#include "math/vec2d.hpp"
#include <cmath>
using namespace rive;
void CubicAsymmetricVertex::computeIn()
{
Vec2D::add(m_InPoint,
Vec2D(x(), y()),
Vec2D(cos(rotation()) * -inDistance(),
sin(rotation()) * -inDistance()));
}
void CubicAsymmetricVertex::computeOut()
{
Vec2D::add(m_OutPoint,
Vec2D(x(), y()),
Vec2D(cos(rotation()) * outDistance(),
sin(rotation()) * outDistance()));
}
void CubicAsymmetricVertex::rotationChanged()
{
m_InValid = false;
m_OutValid = false;
markPathDirty();
}
void CubicAsymmetricVertex::inDistanceChanged()
{
m_InValid = false;
markPathDirty();
}
void CubicAsymmetricVertex::outDistanceChanged()
{
m_OutValid = false;
markPathDirty();
}