diff options
Diffstat (limited to 'Project/Line.cpp')
-rw-r--r-- | Project/Line.cpp | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/Project/Line.cpp b/Project/Line.cpp index 5879555..d0df0a2 100644 --- a/Project/Line.cpp +++ b/Project/Line.cpp @@ -2,11 +2,33 @@ Line::Line() {} Line::~Line() {} -bool Line::Contains(wxPoint2DDouble position) const {} +bool Line::Contains(wxPoint2DDouble position) const { return false; } void Line::Draw(wxPoint2DDouble translation, double scale) const {} -wxCursor Line::GetBestPickboxCursor() const {} -void Line::Insert(Element* parent, wxPoint2DDouble position) {} -bool Line::Intersects(wxRect2DDouble rect) const {} +wxCursor Line::GetBestPickboxCursor() const { return wxCURSOR_ARROW; } +bool Line::AddParent(Element* parent, wxPoint2DDouble position) +{ + if(parent) { + if(m_parentList.size() == 0) { + m_parentList.push_back(parent); + m_pointList.push_back(position); // First point + return false; + } + else if(parent != m_parentList[0]) + { + m_parentList.push_back(parent); + m_pointList.push_back(position); // Last point + return true; + } + } + return false; +} +bool Line::Intersects(wxRect2DDouble rect) const { return false; } void Line::MovePickbox(wxPoint2DDouble position) {} -bool Line::PickboxContains(wxPoint2DDouble position) {} +bool Line::PickboxContains(wxPoint2DDouble position) { return false; } void Line::Rotate() {} +void Line::AddPoint(wxPoint2DDouble point) +{ + if(m_parentList.size() != 0) { + m_pointList.push_back(point); + } +} |