summaryrefslogtreecommitdiffstats
path: root/Project/ConnectionLine.cpp
blob: 68d893ae9b3c554c8fb3404824340839cf487729 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "ConnectionLine.h"

ConnectionLine::ConnectionLine()
    : ControlElement()
{
}

ConnectionLine::~ConnectionLine() {}

void ConnectionLine::Draw(wxPoint2DDouble translation, double scale) const
{
    
}

bool ConnectionLine::Contains(wxPoint2DDouble position) const
{
    if(PointToLineDistance(position) < 5.0) {
        return true;
    }
    return false;
}

bool ConnectionLine::Intersects(wxRect2DDouble rect) const
{
    for(auto it = m_pointList.begin(); it != m_pointList.end(); ++it) {
        if(rect.Contains(*it)) return true;
    }
    return false;
}