~ubuntu-branches/ubuntu/wily/ginkgocadx/wily-proposed

« back to all changes in this revision

Viewing changes to src/cadxcore/widgets/wtrapezoide.cpp

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2013-10-24 21:28:17 UTC
  • mfrom: (1.2.2)
  • Revision ID: package-import@ubuntu.com-20131024212817-ej1skb9og09d3ht6
Tags: 3.5.0.1137.31+dfsg-1
New upstream release [October 2013]

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 *  $Id: wtrapezoide.cpp $
4
4
 *  Ginkgo CADx Project
5
5
 *
6
 
 *  Copyright 2008-12 MetaEmotion S.L. All rights reserved.
 
6
 *  Copyright 2008-14 MetaEmotion S.L. All rights reserved.
7
7
 *  http://ginkgo-cadx.com
8
8
 *
9
9
 *  This file is licensed under LGPL v3 license.
53
53
 
54
54
                m_Stop= evento.iP;
55
55
 
56
 
                m_Vertices[0].Asignar(m_Start.x, m_Start.y);
57
 
                m_Vertices[1].Asignar(m_Stop.x, m_Start.y);
58
 
                m_Vertices[2].Asignar(m_Stop.x, m_Stop.y);
59
 
                m_Vertices[3].Asignar(m_Start.x, m_Stop.y);
 
56
                GNC::GCS::Vector a = m_Start.ProyeccionOrtogonalSobreRecta(m_Stop,  m_Stop - evento.c->ScreenDirectionCosines[0]);              
 
57
                GNC::GCS::Vector b = m_Start.ProyeccionOrtogonalSobreRecta(m_Stop,  m_Stop - evento.c->ScreenDirectionCosines[1]);
 
58
                m_Vertices[0] = m_Start;
 
59
                m_Vertices[1] = a;
 
60
                m_Vertices[2] = m_Stop;
 
61
                m_Vertices[3] = b;
60
62
 
61
63
                m_pManager->Modificado();
62
64
                TVector diff = m_Stop - m_Start;
91
93
                m_Start= evento.iP;
92
94
                m_Stop = m_Start;
93
95
 
94
 
                m_Vertices[0].Asignar(m_Start.x, m_Start.y);
95
 
                m_Vertices[1].Asignar(m_Stop.x, m_Start.y);
96
 
                m_Vertices[2].Asignar(m_Stop.x, m_Stop.y);
97
 
                m_Vertices[3].Asignar(m_Start.x, m_Stop.y);
 
96
                GNC::GCS::Vector a = m_Start.ProyeccionOrtogonalSobreRecta(m_Stop,  m_Stop - evento.c->ScreenDirectionCosines[0]);              
 
97
                GNC::GCS::Vector b = m_Start.ProyeccionOrtogonalSobreRecta(m_Stop,  m_Stop - evento.c->ScreenDirectionCosines[1]);
 
98
                m_Vertices[0] = m_Start;
 
99
                m_Vertices[1] = a;
 
100
                m_Vertices[2] = m_Stop;
 
101
                m_Vertices[3] = b;
98
102
 
99
103
                m_pManager->Modificado();
100
104
                m_Estado = WBS_Creando;
107
111
 
108
112
                m_Stop= evento.iP;
109
113
 
110
 
                m_Vertices[0].Asignar(m_Start.x, m_Start.y);
111
 
                m_Vertices[1].Asignar(m_Stop.x, m_Start.y);
112
 
                m_Vertices[2].Asignar(m_Stop.x, m_Stop.y);
113
 
                m_Vertices[3].Asignar(m_Start.x, m_Stop.y);
 
114
                GNC::GCS::Vector a = m_Start.ProyeccionOrtogonalSobreRecta(m_Stop,  m_Stop - evento.c->ScreenDirectionCosines[0]);              
 
115
                GNC::GCS::Vector b = m_Start.ProyeccionOrtogonalSobreRecta(m_Stop,  m_Stop - evento.c->ScreenDirectionCosines[1]);
 
116
                m_Vertices[0] = m_Start;
 
117
                m_Vertices[1] = a;
 
118
                m_Vertices[2] = m_Stop;
 
119
                m_Vertices[3] = b;
114
120
 
115
121
                m_pManager->Modificado();
116
122
                ConsumirEvento();
159
165
 
160
166
//region "Constructor y destructor"
161
167
 
162
 
GNC::GCS::Widgets::WTrapezoide::WTrapezoide(IWidgetsManager* pManager, const TVector bb[4], long vid, const char* nombre, long gid) : GNC::GCS::Widgets::IWidget(pManager, vid, nombre, gid), GNC::GCS::Widgets::IWidgetSerializable()
 
168
GNC::GCS::Widgets::WTrapezoide::WTrapezoide(IWidgetsManager* pManager, const TVector bb[4], long vid, const char* nombre, long gid) : GNC::GCS::Widgets::IWidget(pManager, vid, nombre, gid,TID_USER_ANNOTATION_WIDGET), GNC::GCS::Widgets::IWidgetSerializable()
163
169
{
164
170
        m_Vertices[0] = bb[0];
165
171
        m_Vertices[1] = bb[1];