KiCad PCB EDA Suite
move_or_drag_track.cpp File Reference

Track editing routines to move and drag track segments or node. More...

#include <fctsys.h>
#include <class_drawpanel.h>
#include <confirm.h>
#include <wxPcbStruct.h>
#include <trigo.h>
#include <macros.h>
#include <gr_basic.h>
#include <class_board.h>
#include <pcbnew.h>
#include <drc_stuff.h>
#include <drag.h>
#include <pcbnew_id.h>

Go to the source code of this file.

Functions

static void Show_MoveNode (EDA_DRAW_PANEL *aPanel, wxDC *aDC, const wxPoint &aPosition, bool aErase)
 
static void Show_Drag_Track_Segment_With_Cte_Slope (EDA_DRAW_PANEL *aPanel, wxDC *aDC, const wxPoint &aPosition, bool aErase)
 
static void Abort_MoveTrack (EDA_DRAW_PANEL *aPanel, wxDC *aDC)
 Abort function for drag or move track. More...
 
static bool InitialiseDragParameters ()
 

Variables

static wxPoint PosInit
 
static wxPoint s_LastPos
 
static double s_StartSegmentSlope
 
static double s_EndSegmentSlope
 
static double s_MovingSegmentSlope
 
static double s_StartSegment_Yorg
 
static double s_EndSegment_Yorg
 
static double s_MovingSegment_Yorg
 
bool s_StartPointVertical
 
bool s_EndPointVertical
 
bool s_MovingSegmentVertical
 
bool s_MovingSegmentHorizontal
 
bool s_StartPointHorizontal
 
bool s_EndPointHorizontal
 
bool s_StartSegmentPresent
 
bool s_EndSegmentPresent
 
static PICKED_ITEMS_LIST s_ItemsListPicker
 

Detailed Description

Track editing routines to move and drag track segments or node.

Definition in file move_or_drag_track.cpp.

Function Documentation

static void Abort_MoveTrack ( EDA_DRAW_PANEL Panel,
wxDC *  DC 
)
static

Abort function for drag or move track.

Definition at line 75 of file move_or_drag_track.cpp.

References EDA_ITEM::ClearFlags(), PICKED_ITEMS_LIST::ClearListAndDeleteItems(), EraseDragList(), g_DragSegmentList, PCB_BASE_FRAME::GetBoard(), EDA_DRAW_PANEL::GetParent(), BOARD::HighLightOFF(), IN_EDIT, BOARD::PopHighLight(), EDA_DRAW_PANEL::Refresh(), PCB_BASE_FRAME::SetCurItem(), EDA_DRAW_PANEL::SetMouseCapture(), and EDA_ITEM::SetState().

Referenced by PCB_EDIT_FRAME::Start_DragTrackSegmentAndKeepSlope(), and PCB_EDIT_FRAME::StartMoveOneNodeOrSegment().

76 {
77  PCB_EDIT_FRAME* frame = (PCB_EDIT_FRAME*) aPanel->GetParent();
78  BOARD * pcb = frame->GetBoard();
79 
80  pcb->HighLightOFF();
81  pcb->PopHighLight();
82 
83  frame->SetCurItem( NULL );
84  aPanel->SetMouseCapture( NULL, NULL );
85 
86  // Undo move and redraw trace segments.
87  for( unsigned jj=0 ; jj < g_DragSegmentList.size(); jj++ )
88  {
89  TRACK* track = g_DragSegmentList[jj].m_Track;
90  g_DragSegmentList[jj].RestoreInitialValues();
91  track->SetState( IN_EDIT, false );
92  track->ClearFlags();
93  }
94 
95  // Clear the undo picker list:
97  EraseDragList();
98  aPanel->Refresh();
99 }
#define IN_EDIT
Item currently edited.
Definition: base_struct.h:111
void SetCurItem(BOARD_ITEM *aItem, bool aDisplayInfo=true)
Function SetCurItem sets the currently selected item and displays it in the MsgPanel.
void EraseDragList()
Function EraseDragList clear the .m_Flags of all track segments stored in g_DragSegmentList and clear...
Definition: dragsegm.cpp:309
void HighLightOFF()
Function HighLightOFF Disable highlight.
Definition: class_board.h:376
BOARD * GetBoard() const
std::vector< DRAG_SEGM_PICKER > g_DragSegmentList
Definition: dragsegm.cpp:48
void PopHighLight()
Function PopHighLight retrieve a previously saved high light info.
static PICKED_ITEMS_LIST s_ItemsListPicker
void SetState(int type, int state)
Definition: base_struct.h:242
Class BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:166
void ClearFlags(STATUS_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
Definition: base_struct.h:254
void ClearListAndDeleteItems()
Function ClearListAndDeleteItems deletes the list of pickers, AND the data pointed by m_PickedItem or...
bool InitialiseDragParameters ( )
static

Definition at line 402 of file move_or_drag_track.cpp.

References ENDPOINT, g_DragSegmentList, TRACK::GetEnd(), EDA_ITEM::GetFlags(), TRACK::GetStart(), RotatePoint(), s_EndPointHorizontal, s_EndPointVertical, s_EndSegment_Yorg, s_EndSegmentPresent, s_EndSegmentSlope, s_MovingSegmentHorizontal, s_MovingSegmentSlope, s_MovingSegmentVertical, s_StartPointHorizontal, s_StartPointVertical, s_StartSegment_Yorg, s_StartSegmentPresent, s_StartSegmentSlope, STARTPOINT, wxPoint::x, and wxPoint::y.

Referenced by PCB_EDIT_FRAME::Start_DragTrackSegmentAndKeepSlope().

403 {
404  double tx1, tx2, ty1, ty2; // temporary storage of points
405  TRACK* Track;
406  TRACK* tSegmentToStart = NULL, * tSegmentToEnd = NULL;
407 
408  if( g_DragSegmentList.size() == 0 )
409  return false;
410 
411  /* get the segments :
412  * from last to first in list are:
413  * the segment to move
414  * the segment connected to its end point (if exists)
415  * the segment connected to its start point (if exists)
416  */
417  int ii = g_DragSegmentList.size() - 1;
418  Track = g_DragSegmentList[ii].m_Track;
419  if( Track == NULL )
420  return false;
421 
422  ii--;
423 
424  if( ii >= 0)
425  {
426  if( s_EndSegmentPresent )
427  {
428  tSegmentToEnd = g_DragSegmentList[ii].m_Track; // Get the segment connected to
429  // the end point
430  ii--;
431  }
432 
434  {
435  if( ii >= 0 )
436  tSegmentToStart = g_DragSegmentList[ii].m_Track; // Get the segment connected to
437  // the start point
438  }
439  }
440 
441  // would be nice to eliminate collinear segments here, so we don't
442  // have to deal with that annoying "Unable to drag this segment: two
443  // collinear segments"
444 
445  s_StartPointVertical = false;
446  s_EndPointVertical = false;
447  s_MovingSegmentVertical = false;
448  s_StartPointHorizontal = false;
449  s_EndPointHorizontal = false;
451 
452  // Init parameters for the starting point of the moved segment
453  if( tSegmentToStart )
454  {
455  if( tSegmentToStart->GetFlags() & ENDPOINT )
456  {
457  tx1 = (double) tSegmentToStart->GetStart().x;
458  ty1 = (double) tSegmentToStart->GetStart().y;
459  tx2 = (double) tSegmentToStart->GetEnd().x;
460  ty2 = (double) tSegmentToStart->GetEnd().y;
461  }
462  else
463  {
464  tx1 = (double) tSegmentToStart->GetEnd().x;
465  ty1 = (double) tSegmentToStart->GetEnd().y;
466  tx2 = (double) tSegmentToStart->GetStart().x;
467  ty2 = (double) tSegmentToStart->GetStart().y;
468  }
469  }
470  else // move the start point on a line starting at Track->GetStart(), and perpendicular to Track
471  {
472  tx1 = (double) Track->GetStart().x;
473  ty1 = (double) Track->GetStart().y;
474  tx2 = (double) Track->GetEnd().x;
475  ty2 = (double) Track->GetEnd().y;
476  RotatePoint( &tx2, &ty2, tx1, ty1, 900 );
477  }
478 
479  if( tx1 != tx2 )
480  {
481  s_StartSegmentSlope = ( ty2 - ty1 ) / ( tx2 - tx1 );
482  s_StartSegment_Yorg = ty1 - ( ty2 - ty1 ) * tx1 / ( tx2 - tx1 );
483  }
484  else
485  {
486  s_StartPointVertical = true; //signal first segment vertical
487  }
488 
489  if( ty1 == ty2 )
490  {
491  s_StartPointHorizontal = true;
492  }
493 
494  // Init parameters for the ending point of the moved segment
495  if( tSegmentToEnd )
496  {
497  //check if second line is vertical
498  if( tSegmentToEnd->GetFlags() & STARTPOINT )
499  {
500  tx1 = (double) tSegmentToEnd->GetStart().x;
501  ty1 = (double) tSegmentToEnd->GetStart().y;
502  tx2 = (double) tSegmentToEnd->GetEnd().x;
503  ty2 = (double) tSegmentToEnd->GetEnd().y;
504  }
505  else
506  {
507  tx1 = (double) tSegmentToEnd->GetEnd().x;
508  ty1 = (double) tSegmentToEnd->GetEnd().y;
509  tx2 = (double) tSegmentToEnd->GetStart().x;
510  ty2 = (double) tSegmentToEnd->GetStart().y;
511  }
512  }
513  else // move the start point on a line starting at Track->GetEnd(), and perpendicular to Track
514  {
515  tx1 = (double) Track->GetEnd().x;
516  ty1 = (double) Track->GetEnd().y;
517  tx2 = (double) Track->GetStart().x;
518  ty2 = (double) Track->GetStart().y;
519  RotatePoint( &tx2, &ty2, tx1, ty1, -900 );
520  }
521 
522  if( tx2 != tx1 )
523  {
524  s_EndSegmentSlope = ( ty2 - ty1 ) / ( tx2 - tx1 );
525  s_EndSegment_Yorg = ty1 - ( ty2 - ty1 ) * tx1 / ( tx2 - tx1 );
526  }
527  else
528  {
529  s_EndPointVertical = true; //signal second segment vertical
530  }
531 
532  if( ty1 == ty2 )
533  {
534  s_EndPointHorizontal = true;
535  }
536 
537  // Init parameters for the moved segment
538  tx1 = (double) Track->GetStart().x;
539  ty1 = (double) Track->GetStart().y;
540  tx2 = (double) Track->GetEnd().x;
541  ty2 = (double) Track->GetEnd().y;
542 
543  if( tx2 != tx1 )
544  {
545  s_MovingSegmentSlope = ( ty2 - ty1 ) / ( tx2 - tx1 );
546  }
547  else
548  {
549  s_MovingSegmentVertical = true; // signal vertical line
550  }
551 
552  if( ty1 == ty2 )
553  {
555  }
556 
557  // Test if drag is possible:
559  {
561  return false;
562  }
563  else
564  {
566  return false;
567 
569  return false;
570  }
571 
572  return true;
573 }
bool s_StartPointHorizontal
STATUS_FLAGS GetFlags() const
Definition: base_struct.h:255
bool s_StartSegmentPresent
static double s_EndSegment_Yorg
void RotatePoint(int *pX, int *pY, double angle)
Definition: trigo.cpp:317
const wxPoint & GetEnd() const
Definition: class_track.h:118
static double s_EndSegmentSlope
static double s_MovingSegmentSlope
std::vector< DRAG_SEGM_PICKER > g_DragSegmentList
Definition: dragsegm.cpp:48
const wxPoint & GetStart() const
Definition: class_track.h:121
static double s_StartSegmentSlope
bool s_EndPointHorizontal
bool s_MovingSegmentHorizontal
bool s_MovingSegmentVertical
#define ENDPOINT
Definition: base_struct.h:119
bool s_EndPointVertical
bool s_EndSegmentPresent
bool s_StartPointVertical
#define STARTPOINT
Definition: base_struct.h:118
static double s_StartSegment_Yorg
static void Show_Drag_Track_Segment_With_Cte_Slope ( EDA_DRAW_PANEL aPanel,
wxDC *  aDC,
const wxPoint aPosition,
bool  aErase 
)
static

Definition at line 197 of file move_or_drag_track.cpp.

References TRACK::Draw(), g_DragSegmentList, EDA_DRAW_FRAME::GetCrossHairPosition(), TRACK::GetEnd(), EDA_ITEM::GetFlags(), EDA_DRAW_PANEL::GetParent(), TRACK::GetStart(), GR_HIGHLIGHT, GR_XOR, KiROUND(), s_EndPointHorizontal, s_EndPointVertical, s_EndSegment_Yorg, s_EndSegmentPresent, s_EndSegmentSlope, s_MovingSegment_Yorg, s_MovingSegmentSlope, s_MovingSegmentVertical, s_StartPointHorizontal, s_StartPointVertical, s_StartSegment_Yorg, s_StartSegmentPresent, s_StartSegmentSlope, TRACK::SetEnd(), EDA_DRAW_FRAME::SetMsgPanel(), TRACK::SetStart(), STARTPOINT, wxPoint::x, and wxPoint::y.

Referenced by PCB_EDIT_FRAME::Start_DragTrackSegmentAndKeepSlope().

199 {
200  double xi1 = 0, yi1 = 0, xi2 = 0, yi2 = 0; // calculated intersection points
201  double tx1, tx2, ty1, ty2; // temporary storage of points
202  int dx, dy;
203  bool update = true;
204  TRACK* Track;
205  TRACK* tSegmentToStart = NULL, * tSegmentToEnd = NULL;
206 
207  if( g_DragSegmentList.size() == 0 )
208  return;
209 
210  /* get the segments :
211  * from last to first in list are:
212  * the segment to move
213  * the segment connected to its end point (if exists)
214  * the segment connected to its start point (if exists)
215  */
216  int ii = g_DragSegmentList.size() - 1;
217  Track = g_DragSegmentList[ii].m_Track;
218 
219  if( Track == NULL )
220  return;
221 
222  ii--;
223 
224  if( ii >= 0)
225  {
226  if( s_EndSegmentPresent )
227  {
228  // Get the segment connected to the end point
229  tSegmentToEnd = g_DragSegmentList[ii].m_Track;
230  ii--;
231  }
232 
234  {
235  // Get the segment connected to the start point
236  if( ii >= 0 )
237  tSegmentToStart = g_DragSegmentList[ii].m_Track;
238  }
239  }
240 
241  GR_DRAWMODE draw_mode = GR_XOR | GR_HIGHLIGHT;
242 
243  // Undraw the current moved track segments before modification
244 
245 #ifndef USE_WX_OVERLAY
246 // if( erase )
247  {
248  Track->Draw( aPanel, aDC, draw_mode );
249 
250  if( tSegmentToStart )
251  tSegmentToStart->Draw( aPanel, aDC, draw_mode );
252 
253  if( tSegmentToEnd )
254  tSegmentToEnd->Draw( aPanel, aDC, draw_mode );
255  }
256 #endif
257 
258  // Compute the new track segment position
259  wxPoint Pos = aPanel->GetParent()->GetCrossHairPosition();
260 
261  dx = Pos.x - s_LastPos.x;
262  dy = Pos.y - s_LastPos.y;
263 
264  // move the line by dx and dy
265  tx1 = (double) ( Track->GetStart().x + dx );
266  ty1 = (double) ( Track->GetStart().y + dy );
267  tx2 = (double) ( Track->GetEnd().x + dx );
268  ty2 = (double) ( Track->GetEnd().y + dy );
269 
270  // recalculate the segments new parameters and intersection points
271  // only the intercept will change, segment slopes does not change
272  // because we are moving parallel with is initial state
274  s_MovingSegment_Yorg = ty1 - ( s_MovingSegmentSlope * tx1 );
275 
277  {
280  }
281  else
282  {
283  if( !s_EndPointVertical )
284  xi2 = tx2;
285  else
286  {
287  //P1=P2
288  if( !s_EndPointHorizontal )
289  xi2 = tx2 - dx;
290  else
291  update = false;
292  }
293  }
294 
296  yi2 = ( s_MovingSegmentSlope * xi2 ) + s_MovingSegment_Yorg;
297  else
298  {
299  if( !s_EndPointVertical )
300  yi2 = ( s_EndSegmentSlope * xi2 ) + s_EndSegment_Yorg;
301  else
302  {
303  if( !s_EndPointHorizontal )
304  update = false;
305  else
306  yi2 = ( s_MovingSegmentSlope * xi2 ) + s_MovingSegment_Yorg;
307  }
308  }
309 
311  {
314  }
315  else
316  {
317  if( !s_StartPointVertical )
318  xi1 = tx1;
319  else
320  {
321  //P1=P2
323  xi1 = tx1 - dx;
324  else
325  {
327  update = false;
328  }
329  }
330  }
331 
333  yi1 = ( s_MovingSegmentSlope * xi1 ) + s_MovingSegment_Yorg;
334  else
335  {
336  if( !s_StartPointVertical )
337  yi1 = ( s_StartSegmentSlope * xi1 ) + s_StartSegment_Yorg;
338  else
339  {
341  update = false;
342  else
343  yi2 = ( s_MovingSegmentSlope * xi1 ) + s_MovingSegment_Yorg;
344  }
345  }
346 
347  // update the segment coordinates (if possible)
348  if( tSegmentToStart == NULL )
349  {
350  xi1 = tx1;
351  yi1 = ty1;
352  }
353 
354  if( tSegmentToEnd == NULL )
355  {
356  xi2 = tx2;
357  yi2 = ty2;
358  }
359 
360  if( update )
361  {
362  s_LastPos = Pos;
363  Track->SetStart( wxPoint( KiROUND( xi1 ), KiROUND( yi1 ) ) );
364  Track->SetEnd( wxPoint( KiROUND( xi2 ), KiROUND( yi2 ) ) );
365 
366  if( tSegmentToEnd )
367  {
368  if( tSegmentToEnd->GetFlags() & STARTPOINT )
369  tSegmentToEnd->SetStart( Track->GetEnd() );
370  else
371  tSegmentToEnd->SetEnd( Track->GetEnd() );
372  }
373 
374  if( tSegmentToStart )
375  {
376  if( tSegmentToStart->GetFlags() & STARTPOINT )
377  tSegmentToStart->SetStart( Track->GetStart() );
378  else
379  tSegmentToStart->SetEnd( Track->GetStart() );
380  }
381  }
382 
383  Track->Draw( aPanel, aDC, draw_mode );
384 
385  if( tSegmentToStart )
386  tSegmentToStart->Draw( aPanel, aDC, draw_mode );
387 
388  if( tSegmentToEnd )
389  tSegmentToEnd->Draw( aPanel, aDC, draw_mode );
390 
391  // Display track length
392  PCB_BASE_FRAME* frame = (PCB_BASE_FRAME*) aPanel->GetParent();
393  frame->SetMsgPanel( Track );
394 }
bool s_StartPointHorizontal
STATUS_FLAGS GetFlags() const
Definition: base_struct.h:255
static int KiROUND(double v)
KiROUND rounds a floating point number to an int using "round halfway cases away from zero"...
Definition: common.h:107
void SetEnd(const wxPoint &aEnd)
Definition: class_track.h:117
bool s_StartSegmentPresent
static double s_EndSegment_Yorg
static double s_MovingSegment_Yorg
const wxPoint & GetEnd() const
Definition: class_track.h:118
static double s_EndSegmentSlope
static double s_MovingSegmentSlope
std::vector< DRAG_SEGM_PICKER > g_DragSegmentList
Definition: dragsegm.cpp:48
void SetMsgPanel(const std::vector< MSG_PANEL_ITEM > &aList)
Function SetMsgPanel clears the message panel and populates it with the contents of aList...
Definition: draw_frame.cpp:754
GR_DRAWMODE
Drawmode. Compositing mode plus a flag or two.
Definition: gr_basic.h:41
const wxPoint & GetStart() const
Definition: class_track.h:121
static double s_StartSegmentSlope
EDA_DRAW_FRAME * GetParent() const
Definition: draw_panel.cpp:175
bool s_EndPointHorizontal
void Draw(EDA_DRAW_PANEL *panel, wxDC *DC, GR_DRAWMODE aDrawMode, const wxPoint &aOffset=ZeroOffset) override
Function Draw BOARD_ITEMs have their own color information.
static wxPoint s_LastPos
bool s_MovingSegmentVertical
void SetStart(const wxPoint &aStart)
Definition: class_track.h:120
bool s_EndPointVertical
wxPoint GetCrossHairPosition(bool aInvertY=false) const
Function GetCrossHairPosition return the current cross hair position in logical (drawing) coordinates...
class PCB_BASE_FRAME basic PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer...
bool s_EndSegmentPresent
bool s_StartPointVertical
#define STARTPOINT
Definition: base_struct.h:118
static double s_StartSegment_Yorg
static void Show_MoveNode ( EDA_DRAW_PANEL aPanel,
wxDC *  aDC,
const wxPoint aPosition,
bool  aErase 
)
static

Definition at line 103 of file move_or_drag_track.cpp.

References TRACK::Draw(), ENDPOINT, g_DragSegmentList, EDA_DRAW_FRAME::GetCrossHairPosition(), EDA_DRAW_PANEL::GetDisplayOptions(), TRACK::GetEnd(), EDA_ITEM::GetFlags(), EDA_DRAW_PANEL::GetParent(), TRACK::GetStart(), GR_HIGHLIGHT, GR_XOR, DISPLAY_OPTIONS::m_DisplayPcbTrackFill, PCB_VIA_T, s_LastPos, TRACK::SetEnd(), EDA_DRAW_FRAME::SetMsgPanel(), TRACK::SetStart(), STARTPOINT, and EDA_ITEM::Type().

Referenced by PCB_EDIT_FRAME::StartMoveOneNodeOrSegment().

105 {
106  DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*) aPanel->GetDisplayOptions();
107  wxPoint moveVector;
108  int tmp = displ_opts->m_DisplayPcbTrackFill;
109  GR_DRAWMODE draw_mode = GR_XOR | GR_HIGHLIGHT;
110 
111  displ_opts->m_DisplayPcbTrackFill = false;
112 
113 #ifndef USE_WX_OVERLAY
114  aErase = true;
115 #else
116  aErase = false;
117 #endif
118 
119  // set the new track coordinates
120  wxPoint Pos = aPanel->GetParent()->GetCrossHairPosition();
121 
122  moveVector = Pos - s_LastPos;
123  s_LastPos = Pos;
124 
125  TRACK *track = NULL;
126 
127  for( unsigned ii = 0; ii < g_DragSegmentList.size(); ii++ )
128  {
129  track = g_DragSegmentList[ii].m_Track;
130 
131  if( aErase )
132  track->Draw( aPanel, aDC, draw_mode );
133 
134  if( track->GetFlags() & STARTPOINT )
135  track->SetStart( track->GetStart() + moveVector );
136 
137  if( track->GetFlags() & ENDPOINT )
138  track->SetEnd( track->GetEnd() + moveVector );
139 
140  if( track->Type() == PCB_VIA_T )
141  track->SetEnd( track->GetStart() );
142 
143  track->Draw( aPanel, aDC, draw_mode );
144  }
145 
146  displ_opts->m_DisplayPcbTrackFill = tmp;
147 
148  // Display track length
149  if( track )
150  {
151  PCB_BASE_FRAME* frame = (PCB_BASE_FRAME*) aPanel->GetParent();
152  frame->SetMsgPanel( track );
153  }
154 }
KICAD_T Type() const
Function Type()
Definition: base_struct.h:198
STATUS_FLAGS GetFlags() const
Definition: base_struct.h:255
void SetEnd(const wxPoint &aEnd)
Definition: class_track.h:117
const wxPoint & GetEnd() const
Definition: class_track.h:118
bool m_DisplayPcbTrackFill
Definition: pcbstruct.h:71
std::vector< DRAG_SEGM_PICKER > g_DragSegmentList
Definition: dragsegm.cpp:48
void SetMsgPanel(const std::vector< MSG_PANEL_ITEM > &aList)
Function SetMsgPanel clears the message panel and populates it with the contents of aList...
Definition: draw_frame.cpp:754
GR_DRAWMODE
Drawmode. Compositing mode plus a flag or two.
Definition: gr_basic.h:41
const wxPoint & GetStart() const
Definition: class_track.h:121
EDA_DRAW_FRAME * GetParent() const
Definition: draw_panel.cpp:175
Class DISPLAY_OPTIONS handles display options like enable/disable some optional drawings.
Definition: pcbstruct.h:62
void Draw(EDA_DRAW_PANEL *panel, wxDC *DC, GR_DRAWMODE aDrawMode, const wxPoint &aOffset=ZeroOffset) override
Function Draw BOARD_ITEMs have their own color information.
static wxPoint s_LastPos
#define ENDPOINT
Definition: base_struct.h:119
void SetStart(const wxPoint &aStart)
Definition: class_track.h:120
class VIA, a via (like a track segment on a copper layer)
Definition: typeinfo.h:108
void * GetDisplayOptions()
Function GetDisplayOptions A way to pass info to draw functions.
Definition: draw_panel.cpp:182
wxPoint GetCrossHairPosition(bool aInvertY=false) const
Function GetCrossHairPosition return the current cross hair position in logical (drawing) coordinates...
class PCB_BASE_FRAME basic PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer...
#define STARTPOINT
Definition: base_struct.h:118

Variable Documentation

wxPoint PosInit
static

Definition at line 58 of file move_or_drag_track.cpp.

Referenced by PCB_EDIT_FRAME::StartMoveOneNodeOrSegment().

bool s_EndPointHorizontal
bool s_EndPointVertical
double s_EndSegment_Yorg
static
double s_EndSegmentSlope
static
PICKED_ITEMS_LIST s_ItemsListPicker
static

Definition at line 70 of file move_or_drag_track.cpp.

wxPoint s_LastPos
static

Definition at line 58 of file move_or_drag_track.cpp.

Referenced by Show_MoveNode().

double s_MovingSegment_Yorg
static

Definition at line 59 of file move_or_drag_track.cpp.

Referenced by Show_Drag_Track_Segment_With_Cte_Slope().

bool s_MovingSegmentHorizontal

Definition at line 63 of file move_or_drag_track.cpp.

Referenced by InitialiseDragParameters().

double s_MovingSegmentSlope
static
bool s_MovingSegmentVertical
bool s_StartPointHorizontal
bool s_StartPointVertical
double s_StartSegment_Yorg
static
double s_StartSegmentSlope
static