diff options
author | Thales1330 <thaleslima.ufu@gmail.com> | 2016-08-09 17:45:09 -0300 |
---|---|---|
committer | Thales1330 <thaleslima.ufu@gmail.com> | 2016-08-09 17:45:09 -0300 |
commit | 0a85e05fa7aa0e2b950c2c3bcec5d45f25b1c0e2 (patch) | |
tree | 3ff5ec1cdeafafd58916e41151d437b44f49754f /Project/Line.cpp | |
parent | b5324f48c855b0c82ccf6da7d5a008fe5cf1c17e (diff) | |
download | PSP.git-0a85e05fa7aa0e2b950c2c3bcec5d45f25b1c0e2.tar.gz PSP.git-0a85e05fa7aa0e2b950c2c3bcec5d45f25b1c0e2.tar.xz PSP.git-0a85e05fa7aa0e2b950c2c3bcec5d45f25b1c0e2.zip |
Line under implementation
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); + } +} |