blob: bf171a91a1d885c7ac5d4554d9f3836bfd5eaaa3 [file]
#include "shapes/cubic_mirrored_vertex.hpp"
#include "math/vec2d.hpp"
#include <cmath>
using namespace rive;
void CubicMirroredVertex::computeIn()
{
Vec2D::add(
m_InPoint,
Vec2D(x(), y()),
Vec2D(cos(rotation()) * -distance(), sin(rotation()) * -distance()));
}
void CubicMirroredVertex::computeOut()
{
Vec2D::add(
m_OutPoint,
Vec2D(x(), y()),
Vec2D(cos(rotation()) * distance(), sin(rotation()) * distance()));
}
void CubicMirroredVertex::rotationChanged()
{
m_InValid = m_OutValid = false;
markPathDirty();
}
void CubicMirroredVertex::distanceChanged()
{
m_InValid = m_OutValid = false;
markPathDirty();
}