| 
    KiCad PCB EDA Suite
    
   | 
 
A class to perform either relative or absolute display origin transforms for a single axis of a point. More...
#include <origin_transforms.h>
  
Public Types | |
| enum | COORD_TYPES_T {  NOT_A_COORD , ABS_X_COORD , ABS_Y_COORD , REL_X_COORD , REL_Y_COORD }  | 
| The supported Display Origin Transform types.  More... | |
Public Member Functions | |
| ~ORIGIN_TRANSFORMS ()=default | |
| virtual int | ToDisplay (int aValue, COORD_TYPES_T aCoordType) const | 
| virtual long long int | ToDisplay (long long int aValue, COORD_TYPES_T aCoordType) const | 
| virtual double | ToDisplay (double aValue, COORD_TYPES_T aCoordType) const | 
| virtual double | ToDisplay (const EDA_ANGLE &aValue, COORD_TYPES_T aCoordType) const | 
| virtual int | FromDisplay (int aValue, COORD_TYPES_T aCoordType) const | 
| virtual long long int | FromDisplay (long long int aValue, COORD_TYPES_T aCoordType) const | 
| virtual double | FromDisplay (double aValue, COORD_TYPES_T aCoordType) const | 
| virtual EDA_ANGLE | FromDisplay (const EDA_ANGLE &aValue, COORD_TYPES_T aCoordType) const | 
| template<class T> | |
| T | ToDisplayAbs (const T &aValue) const | 
| template<class T> | |
| T | ToDisplayRel (const T &aValue) const | 
| template<class T> | |
| T | FromDisplayAbs (const T &aValue) const | 
| template<class T> | |
| T | FromDisplayRel (const T &aValue) const | 
Static Protected Member Functions | |
| template<class T> | |
| static T | ToDisplayRel (T aInternalValue, bool aInvertAxis) | 
| template<class T> | |
| static T | FromDisplayRel (T aDisplayValue, bool aInvertAxis) | 
| template<class T> | |
| static T | ToDisplayAbs (T aInternalValue, int aUserOrigin, bool aInvertAxis) | 
| template<class T> | |
| static T | FromDisplayAbs (T aDisplayValue, int aUserOrigin, bool aInvertAxis) | 
A class to perform either relative or absolute display origin transforms for a single axis of a point.
The coordinate argument is transformed between an offset from the internal origin and an offset from the user-specified origin and coordinate direction.
The functions are templated to allow use with any size scalar parameter: an int, a long long int, or a double.
Definition at line 40 of file origin_transforms.h.
The supported Display Origin Transform types.
Absolute coordinates require both translation and direction inversion. Relative coordinates require only direction inversion.
| Enumerator | |
|---|---|
| NOT_A_COORD | |
| ABS_X_COORD | |
| ABS_Y_COORD | |
| REL_X_COORD | |
| REL_Y_COORD | |
Definition at line 49 of file origin_transforms.h.
      
  | 
  default | 
      
  | 
  virtual | 
Reimplemented in PCB_ORIGIN_TRANSFORMS.
Definition at line 71 of file origin_transforms.cpp.
      
  | 
  virtual | 
Reimplemented in PCB_ORIGIN_TRANSFORMS.
Definition at line 65 of file origin_transforms.cpp.
      
  | 
  virtual | 
Reimplemented in PCB_ORIGIN_TRANSFORMS.
Definition at line 53 of file origin_transforms.cpp.
References FromDisplay().
Referenced by FromDisplay(), FromDisplayAbs(), FromDisplayRel(), and PCB_ORIGIN_TRANSFORMS::~PCB_ORIGIN_TRANSFORMS().
      
  | 
  virtual | 
Reimplemented in PCB_ORIGIN_TRANSFORMS.
Definition at line 59 of file origin_transforms.cpp.
Definition at line 90 of file origin_transforms.h.
References ABS_X_COORD, ABS_Y_COORD, FromDisplay(), and T.
Referenced by PCB_ORIGIN_TRANSFORMS::FromDisplayAbsX(), and PCB_ORIGIN_TRANSFORMS::FromDisplayAbsY().
      
  | 
  inlinestaticprotected | 
Definition at line 150 of file origin_transforms.h.
References T.
Definition at line 100 of file origin_transforms.h.
References FromDisplay(), REL_X_COORD, REL_Y_COORD, and T.
Referenced by PCB_ORIGIN_TRANSFORMS::FromDisplayRelX(), and PCB_ORIGIN_TRANSFORMS::FromDisplayRelY().
      
  | 
  inlinestaticprotected | 
Definition at line 123 of file origin_transforms.h.
References T.
      
  | 
  virtual | 
Reimplemented in PCB_ORIGIN_TRANSFORMS.
Definition at line 47 of file origin_transforms.cpp.
References EDA_ANGLE::AsDegrees().
      
  | 
  virtual | 
Reimplemented in PCB_ORIGIN_TRANSFORMS.
Definition at line 41 of file origin_transforms.cpp.
      
  | 
  virtual | 
Reimplemented in PCB_ORIGIN_TRANSFORMS.
Definition at line 29 of file origin_transforms.cpp.
References ToDisplay().
Referenced by PGPROPERTY_DISTANCE::DistanceToString(), ToDisplay(), ToDisplayAbs(), ToDisplayRel(), and PCB_ORIGIN_TRANSFORMS::~PCB_ORIGIN_TRANSFORMS().
      
  | 
  virtual | 
Reimplemented in PCB_ORIGIN_TRANSFORMS.
Definition at line 35 of file origin_transforms.cpp.
Definition at line 70 of file origin_transforms.h.
References ABS_X_COORD, ABS_Y_COORD, T, and ToDisplay().
Referenced by PCB_DIM_LEADER::GetMsgPanelInfo(), PCB_DIMENSION_BASE::GetMsgPanelInfo(), PCB_ORIGIN_TRANSFORMS::ToDisplayAbsX(), and PCB_ORIGIN_TRANSFORMS::ToDisplayAbsY().
      
  | 
  inlinestaticprotected | 
Definition at line 135 of file origin_transforms.h.
References T.
Definition at line 80 of file origin_transforms.h.
References REL_X_COORD, REL_Y_COORD, T, and ToDisplay().
Referenced by PCB_ORIGIN_TRANSFORMS::ToDisplayRelX(), and PCB_ORIGIN_TRANSFORMS::ToDisplayRelY().
      
  | 
  inlinestaticprotected | 
Definition at line 111 of file origin_transforms.h.
References T.