KiCad PCB EDA Suite
Loading...
Searching...
No Matches
mirror.h File Reference

Go to the source code of this file.

Enumerations

enum class  FLIP_DIRECTION { LEFT_RIGHT , TOP_BOTTOM }
 

Functions

template<typename T>
constexpr T MIRRORVAL (T aPoint, T aMirrorRef)
 Returns the mirror of aPoint relative to the aMirrorRef.
 
template<typename T>
constexpr void MIRROR (T &aPoint, const T &aMirrorRef)
 Updates aPoint with the mirror of aPoint relative to the aMirrorRef.
 
template<typename VT>
constexpr void MIRROR (VT &aPoint, const VT &aMirrorRef, FLIP_DIRECTION aFlipDirection)
 Updates aPoint with the mirror of aPoint relative to the aMirrorRef, in the specified direction.
 
constexpr EDA_ANGLE MIRROR_AXIS (FLIP_DIRECTION aFlipDirection)
 Returns the angle of the axis of reflection for the given flip direction.
 

Enumeration Type Documentation

◆ FLIP_DIRECTION

enum class FLIP_DIRECTION
strong
Enumerator
LEFT_RIGHT 

Flip left to right (around the Y axis)

TOP_BOTTOM 

Flip top to bottom (around the X axis)

Definition at line 25 of file mirror.h.

Function Documentation

◆ MIRROR() [1/2]

◆ MIRROR() [2/2]

template<typename VT>
void MIRROR ( VT & aPoint,
const VT & aMirrorRef,
FLIP_DIRECTION aFlipDirection )
constexpr

Updates aPoint with the mirror of aPoint relative to the aMirrorRef, in the specified direction.

Definition at line 55 of file mirror.h.

References LEFT_RIGHT, and MIRROR().

◆ MIRROR_AXIS()

EDA_ANGLE MIRROR_AXIS ( FLIP_DIRECTION aFlipDirection)
constexpr

Returns the angle of the axis of reflection for the given flip direction.

Definition at line 67 of file mirror.h.

References ANGLE_0, ANGLE_90, and LEFT_RIGHT.

◆ MIRRORVAL()

template<typename T>
T MIRRORVAL ( T aPoint,
T aMirrorRef )
constexpr

Returns the mirror of aPoint relative to the aMirrorRef.

Definition at line 35 of file mirror.h.

References T.

Referenced by MIRROR(), SCH_DIRECTIVE_LABEL::MirrorHorizontally(), SCH_TEXT::MirrorHorizontally(), SCH_DIRECTIVE_LABEL::MirrorVertically(), and SCH_TEXT::MirrorVertically().