summaryrefslogtreecommitdiffstats
path: root/Project/IndMotor.cpp
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2020-06-02 21:47:06 -0300
committerThales Lima Oliveira <thaleslima.ufu@gmail.com>2020-06-02 21:47:06 -0300
commit113a35d0fe8938973fa1c100b77f456ed250e61b (patch)
tree586d1c3113082cbb2b92cd46c3c96a25a0e75e67 /Project/IndMotor.cpp
parent6ce2bdcf85dffee6b6ef7b95b888b8b96372a3d6 (diff)
downloadPSP.git-113a35d0fe8938973fa1c100b77f456ed250e61b.tar.gz
PSP.git-113a35d0fe8938973fa1c100b77f456ed250e61b.tar.xz
PSP.git-113a35d0fe8938973fa1c100b77f456ed250e61b.zip
OpenGL bugfixes and wxGC port alternative init
OpenGL major bugfixes; Device context port alternative to OpenGL code init (WorkspaceDC). Some machines don't support OpenGL 3+; Fixed some issues with MSVC.
Diffstat (limited to 'Project/IndMotor.cpp')
-rw-r--r--Project/IndMotor.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/Project/IndMotor.cpp b/Project/IndMotor.cpp
index 4df2bb1..621eb5e 100644
--- a/Project/IndMotor.cpp
+++ b/Project/IndMotor.cpp
@@ -32,6 +32,17 @@ void IndMotor::DrawSymbol() const
DrawLine(mPts);
}
+void IndMotor::DrawDCSymbol(wxGraphicsContext* gc) const
+{
+ std::vector<wxPoint2DDouble> mPts;
+ mPts.push_back(wxPoint2DDouble(-10, 13) + m_position);
+ mPts.push_back(wxPoint2DDouble(-10, -13) + m_position);
+ mPts.push_back(wxPoint2DDouble(0, 2) + m_position);
+ mPts.push_back(wxPoint2DDouble(10, -13) + m_position);
+ mPts.push_back(wxPoint2DDouble(10, 13) + m_position);
+ gc->DrawLines(mPts.size(), &mPts[0]);
+}
+
bool IndMotor::GetContextMenu(wxMenu& menu)
{
menu.Append(ID_EDIT_ELEMENT, _("Edit induction motor"));