5 #include "rive/hittest_command_path.hpp"
9 HitTestCommandPath::HitTestCommandPath(const IAABB& area) : m_Area(area) { m_Tester.reset(m_Area); }
11 bool HitTestCommandPath::wasHit() { return m_Tester.test(m_FillRule); }
13 void HitTestCommandPath::reset() { m_Tester.reset(m_Area); }
15 void HitTestCommandPath::fillRule(FillRule value) {
16 // remember this here, and pass it to test()
20 void HitTestCommandPath::addPath(CommandPath* path, const Mat2D& transform) {
25 RenderPath* HitTestCommandPath::renderPath() {
31 void HitTestCommandPath::moveTo(float x, float y) { m_Tester.move(m_Xform * Vec2D(x, y)); }
33 void HitTestCommandPath::lineTo(float x, float y) { m_Tester.line(m_Xform * Vec2D(x, y)); }
35 void HitTestCommandPath::cubicTo(float ox, float oy, float ix, float iy, float x, float y) {
36 m_Tester.cubic(m_Xform * Vec2D(ox, oy), m_Xform * Vec2D(ix, iy), m_Xform * Vec2D(x, y));
39 void HitTestCommandPath::close() { m_Tester.close(); }