|
KiCad PCB EDA Suite
|
#include <pcb_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 | |
| PCB_ORIGIN_TRANSFORMS (PCB_BASE_FRAME &aPcbBaseFrame) | |
| ~PCB_ORIGIN_TRANSFORMS ()=default | |
| virtual long long int | ToDisplay (long long int aValue, COORD_TYPES_T aCoordType) const override |
| virtual double | ToDisplay (double aValue, COORD_TYPES_T aCoordType) const override |
| virtual double | ToDisplay (const EDA_ANGLE &aValue, COORD_TYPES_T aCoordType) const override |
| virtual long long int | FromDisplay (long long int aValue, COORD_TYPES_T aCoordType) const override |
| virtual double | FromDisplay (double aValue, COORD_TYPES_T aCoordType) const override |
| virtual EDA_ANGLE | FromDisplay (const EDA_ANGLE &aValue, COORD_TYPES_T aCoordType) const override |
| template<typename T> | |
| T | ToDisplayRelX (T aInternalValue) const |
| Transform a 2-D coordinate point referenced to the internal origin to the equivalent point referenced to the user-selected display origin. | |
| template<typename T> | |
| T | ToDisplayRelY (T aInternalValue) const |
| template<typename T> | |
| T | FromDisplayRelX (T aDisplayValue) const |
| template<typename T> | |
| T | FromDisplayRelY (T aDisplayValue) const |
| template<typename T> | |
| T | ToDisplayAbsX (T aInternalValue) const |
| template<typename T> | |
| T | ToDisplayAbsY (T aInternalValue) const |
| template<typename T> | |
| T | FromDisplayAbsX (T aDisplayValue) const |
| template<typename T> | |
| T | FromDisplayAbsY (T aDisplayValue) const |
| template<typename T> | |
| T | ToDisplayAbs (T aInternalValue) const |
| template<typename T> | |
| T | FromDisplayAbs (T aDisplayValue) const |
| template<typename T> | |
| T | ToDisplayRel (T aInternalValue) const |
| template<typename T> | |
| T | FromDisplayRel (T aDisplayValue) const |
| virtual int | ToDisplay (int aValue, COORD_TYPES_T aCoordType) const |
| virtual int | FromDisplay (int 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 |
Protected Member Functions | |
| int | getUserXOrigin () const |
| int | getUserYOrigin () const |
| bool | invertXAxis () const |
| bool | invertYAxis () const |
Static Protected Member Functions | |
| template<class T> | |
| static T | ToDisplayAbs (T aInternalValue, int aUserOrigin, bool aInvertAxis) |
| template<class T> | |
| static T | ToDisplayRel (T aInternalValue, bool aInvertAxis) |
| template<class T> | |
| static T | FromDisplayAbs (T aDisplayValue, int aUserOrigin, bool aInvertAxis) |
| template<class T> | |
| static T | FromDisplayRel (T aDisplayValue, bool aInvertAxis) |
Protected Attributes | |
| const PCB_BASE_FRAME & | m_pcbBaseFrame |
Definition at line 31 of file pcb_origin_transforms.h.
|
inherited |
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.
| PCB_ORIGIN_TRANSFORMS::PCB_ORIGIN_TRANSFORMS | ( | PCB_BASE_FRAME & | aPcbBaseFrame | ) |
Definition at line 33 of file pcb_origin_transforms.cpp.
References m_pcbBaseFrame.
|
default |
References ORIGIN_TRANSFORMS::FromDisplay(), and ORIGIN_TRANSFORMS::ToDisplay().
|
overridevirtual |
Reimplemented from ORIGIN_TRANSFORMS.
Definition at line 119 of file pcb_origin_transforms.cpp.
References invertYAxis(), ORIGIN_TRANSFORMS::REL_X_COORD, and ORIGIN_TRANSFORMS::REL_Y_COORD.
|
overridevirtual |
Reimplemented from ORIGIN_TRANSFORMS.
Definition at line 101 of file pcb_origin_transforms.cpp.
References FromDisplayAbsX(), FromDisplayAbsY(), FromDisplayRelX(), and FromDisplayRelY().
|
virtual |
Reimplemented from ORIGIN_TRANSFORMS.
Definition at line 64 of file origin_transforms.cpp.
|
overridevirtual |
Reimplemented from ORIGIN_TRANSFORMS.
Definition at line 83 of file pcb_origin_transforms.cpp.
References FromDisplayAbsX(), FromDisplayAbsY(), FromDisplayRelX(), and FromDisplayRelY().
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().
|
inlinestaticprotectedinherited |
Definition at line 150 of file origin_transforms.h.
References T.
Definition at line 157 of file pcb_origin_transforms.h.
References FromDisplayAbsX(), FromDisplayAbsY(), and T.
Definition at line 131 of file pcb_origin_transforms.h.
References ORIGIN_TRANSFORMS::FromDisplayAbs(), getUserXOrigin(), invertXAxis(), and T.
Referenced by FromDisplay(), FromDisplay(), and FromDisplayAbs().
Definition at line 137 of file pcb_origin_transforms.h.
References ORIGIN_TRANSFORMS::FromDisplayAbs(), getUserYOrigin(), invertYAxis(), and T.
Referenced by FromDisplay(), FromDisplay(), and FromDisplayAbs().
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().
|
inlinestaticprotectedinherited |
Definition at line 123 of file origin_transforms.h.
References T.
Definition at line 179 of file pcb_origin_transforms.h.
References FromDisplayRelX(), FromDisplayRelY(), and T.
Definition at line 104 of file pcb_origin_transforms.h.
References ORIGIN_TRANSFORMS::FromDisplayRel(), invertXAxis(), and T.
Referenced by FromDisplay(), FromDisplay(), and FromDisplayRel().
Definition at line 110 of file pcb_origin_transforms.h.
References ORIGIN_TRANSFORMS::FromDisplayRel(), invertYAxis(), and T.
Referenced by FromDisplay(), FromDisplay(), and FromDisplayRel().
|
protected |
Definition at line 128 of file pcb_origin_transforms.cpp.
References m_pcbBaseFrame.
Referenced by FromDisplayAbsX(), and ToDisplayAbsX().
|
protected |
Definition at line 134 of file pcb_origin_transforms.cpp.
References m_pcbBaseFrame.
Referenced by FromDisplayAbsY(), and ToDisplayAbsY().
|
protected |
Definition at line 140 of file pcb_origin_transforms.cpp.
References FRAME_PCB_EDITOR, and m_pcbBaseFrame.
Referenced by FromDisplayAbsX(), FromDisplayRelX(), ToDisplayAbsX(), and ToDisplayRelX().
|
protected |
Definition at line 149 of file pcb_origin_transforms.cpp.
References FRAME_PCB_EDITOR, and m_pcbBaseFrame.
Referenced by FromDisplay(), FromDisplayAbsY(), FromDisplayRelY(), ToDisplay(), ToDisplayAbsY(), and ToDisplayRelY().
|
overridevirtual |
Reimplemented from ORIGIN_TRANSFORMS.
Definition at line 74 of file pcb_origin_transforms.cpp.
References EDA_ANGLE::AsDegrees(), invertYAxis(), ORIGIN_TRANSFORMS::REL_X_COORD, and ORIGIN_TRANSFORMS::REL_Y_COORD.
|
overridevirtual |
Reimplemented from ORIGIN_TRANSFORMS.
Definition at line 56 of file pcb_origin_transforms.cpp.
References ToDisplayAbsX(), ToDisplayAbsY(), ToDisplayRelX(), and ToDisplayRelY().
|
virtual |
Reimplemented from ORIGIN_TRANSFORMS.
Definition at line 59 of file origin_transforms.cpp.
|
overridevirtual |
Reimplemented from ORIGIN_TRANSFORMS.
Definition at line 38 of file pcb_origin_transforms.cpp.
References ToDisplayAbsX(), ToDisplayAbsY(), ToDisplayRelX(), and ToDisplayRelY().
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().
|
inlinestaticprotectedinherited |
Definition at line 135 of file origin_transforms.h.
References T.
Definition at line 146 of file pcb_origin_transforms.h.
References T, ToDisplayAbsX(), and ToDisplayAbsY().
Definition at line 119 of file pcb_origin_transforms.h.
References getUserXOrigin(), invertXAxis(), T, and ORIGIN_TRANSFORMS::ToDisplayAbs().
Referenced by ToDisplay(), ToDisplay(), and ToDisplayAbs().
Definition at line 125 of file pcb_origin_transforms.h.
References getUserYOrigin(), invertYAxis(), T, and ORIGIN_TRANSFORMS::ToDisplayAbs().
Referenced by ToDisplay(), ToDisplay(), and ToDisplayAbs().
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().
|
inlinestaticprotectedinherited |
Definition at line 111 of file origin_transforms.h.
References T.
Definition at line 168 of file pcb_origin_transforms.h.
References T, ToDisplayRelX(), and ToDisplayRelY().
Transform a 2-D coordinate point referenced to the internal origin to the equivalent point referenced to the user-selected display origin.
| aValue | a point referenced to the internal origin |
| aValue | a point referenced to the user-selected display origin |
This is initially intended to handle axis inversion of a delta between two display points, but could be extended to handle other transforms.
| aValue | a delta referenced to the internal origin |
This is initially intended to handle axis inversion of a delta between two display points, but could be extended to handle other transforms.
| aValue | a delta referenced to the user-selected display origin |
Definition at line 92 of file pcb_origin_transforms.h.
References invertXAxis(), T, and ORIGIN_TRANSFORMS::ToDisplayRel().
Referenced by ToDisplay(), ToDisplay(), and ToDisplayRel().
Definition at line 98 of file pcb_origin_transforms.h.
References invertYAxis(), T, and ORIGIN_TRANSFORMS::ToDisplayRel().
Referenced by ToDisplay(), ToDisplay(), and ToDisplayRel().
|
protected |
Definition at line 197 of file pcb_origin_transforms.h.
Referenced by getUserXOrigin(), getUserYOrigin(), invertXAxis(), invertYAxis(), and PCB_ORIGIN_TRANSFORMS().