KiCad PCB EDA Suite
mirror.h File Reference

Go to the source code of this file.

Functions

template<typename T >
MIRRORVAL (T aPoint, T aMirrorRef)
 Returns the mirror of aPoint relative to the aMirrorRef. More...
 
template<typename T >
void MIRROR (T &aPoint, const T &aMirrorRef)
 Updates aPoint with the mirror of aPoint relative to the aMirrorRef. More...
 

Function Documentation

◆ MIRROR()

◆ MIRRORVAL()

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

Returns the mirror of aPoint relative to the aMirrorRef.

Definition at line 31 of file mirror.h.

32 {
33  return -( aPoint - aMirrorRef ) + aMirrorRef;
34 }

Referenced by FP_TEXT::Flip(), MIRROR(), FP_TEXT::Mirror(), SCH_TEXT::MirrorHorizontally(), and SCH_TEXT::MirrorVertically().