KiCad PCB EDA Suite
|
Go to the source code of this file.
Classes | |
struct | ORIENT_MIRROR |
Functions | |
void | OrientAndMirrorSymbolItems (LIB_SYMBOL *aSymbol, int aOrientation) |
Rotate and/or mirror graphic objects of LIB_SYMBOL aSymbol according to aOrientMirror. | |
void | RotateAndMirrorPin (SCH_PIN &aPin, int aOrientMirror) |
Rotate and/or mirror a SCH_PIN according to aOrientMirror. | |
SPIN_STYLE | GetPinSpinStyle (const SCH_PIN &aPin, const SCH_SYMBOL &aSymbol) |
Get the spin style for a pin's label, taking into account the pin's orientation, as well as the given symbol's orientation. | |
Variables | |
static ORIENT_MIRROR | symbols_orientations_list [] |
SPIN_STYLE GetPinSpinStyle | ( | const SCH_PIN & | aPin, |
const SCH_SYMBOL & | aSymbol | ||
) |
Get the spin style for a pin's label, taking into account the pin's orientation, as well as the given symbol's orientation.
For example, pin with PIN_RIGHT (i.e. a pin on the left side of a symbol, probably) and no symbol rotation/mirror will return SPIN_STYLE::LEFT.
Definition at line 111 of file symb_transforms_utils.cpp.
References SPIN_STYLE::BOTTOM, SCH_PIN::GetOrientation(), SCH_SYMBOL::GetOrientation(), SPIN_STYLE::LEFT, PIN_DOWN, PIN_LEFT, PIN_RIGHT, PIN_UP, SPIN_STYLE::RIGHT, SYM_MIRROR_X, SYM_MIRROR_Y, SYM_NORMAL, SYM_ORIENT_0, SYM_ORIENT_180, SYM_ORIENT_270, SYM_ORIENT_90, SYM_ROTATE_CLOCKWISE, SYM_ROTATE_COUNTERCLOCKWISE, and SPIN_STYLE::UP.
Referenced by SCH_SCREEN::GetLabelOrientationForPoint().
void OrientAndMirrorSymbolItems | ( | LIB_SYMBOL * | aLibSymbol, |
int | aOrientation | ||
) |
Rotate and/or mirror graphic objects of LIB_SYMBOL aSymbol according to aOrientMirror.
aLibSymbol | is the LIB_SYMBOL to modify |
aOrientation | is the orientation+mirror value like returned by SCH_SYMBOL::GetOrientation() |
Definition at line 56 of file symb_transforms_utils.cpp.
References LIB_SYMBOL::GetDrawItems(), ORIENT_MIRROR::mirror_x, ORIENT_MIRROR::mirror_y, ORIENT_MIRROR::n_rots, and symbols_orientations_list.
Referenced by KIGFX::SCH_PAINTER::draw().
void RotateAndMirrorPin | ( | SCH_PIN & | aPin, |
int | aOrientMirror | ||
) |
Rotate and/or mirror a SCH_PIN according to aOrientMirror.
aOrientMirror is usually the orientation/mirror of the parent symbol. The modified pin orientation is the actual pin orientation/mirror when the parent symbol is drawn.
aPin | is the SCH_PIN to modify |
aOrientation | is the orientation+mirror value like returned by SCH_SYMBOL::GetOrientation() |
Definition at line 88 of file symb_transforms_utils.cpp.
References ORIENT_MIRROR::mirror_x, ORIENT_MIRROR::mirror_y, SCH_PIN::MirrorHorizontallyPin(), SCH_PIN::MirrorVerticallyPin(), ORIENT_MIRROR::n_rots, SCH_PIN::RotatePin(), and symbols_orientations_list.
Referenced by EE_SELECTION_TOOL::Main().
|
static |
Definition at line 39 of file symb_transforms_utils.cpp.
Referenced by OrientAndMirrorSymbolItems(), and RotateAndMirrorPin().