|
KiCad PCB EDA Suite
|
#include <transform_trs.h>
Public Member Functions | |
| TRANSFORM_TRS () | |
| TRANSFORM_TRS (const VECTOR2I &aTranslate, const EDA_ANGLE &aRotate, double aScaleX, double aScaleY) | |
| VECTOR2I | Apply (const VECTOR2I &aPoint) const |
| VECTOR2D | Apply (const VECTOR2D &aPoint) const |
| VECTOR2I | InverseApply (const VECTOR2I &aPoint) const |
| VECTOR2D | InverseApply (const VECTOR2D &aPoint) const |
| TRANSFORM_TRS | Invert () const |
| TRANSFORM_TRS | Compose (const TRANSFORM_TRS &aOuter) const |
| TRANSFORM_TRS | RescaleAround (const VECTOR2I &aFixedPoint, double aSx, double aSy) const |
| bool | IsIdentity () const |
| bool | IsUniformScale () const |
| double | ApplyLinearScale (double aLength) const |
| const VECTOR2I & | GetTranslate () const |
| const EDA_ANGLE & | GetRotate () const |
| double | GetScaleX () const |
| double | GetScaleY () const |
| void | SetTranslate (const VECTOR2I &aT) |
| void | SetRotate (const EDA_ANGLE &aR) |
| void | SetScale (double aSx, double aSy) |
| bool | operator== (const TRANSFORM_TRS &aOther) const |
| bool | operator!= (const TRANSFORM_TRS &aOther) const |
Private Attributes | |
| VECTOR2I | m_translate |
| EDA_ANGLE | m_rotate |
| double | m_scaleX |
| double | m_scaleY |
Definition at line 30 of file transform_trs.h.
|
inline |
Definition at line 33 of file transform_trs.h.
References ANGLE_0, m_rotate, m_scaleX, m_scaleY, and m_translate.
Referenced by Compose(), Invert(), operator!=(), operator==(), and RescaleAround().
|
inline |
Definition at line 40 of file transform_trs.h.
References m_rotate, m_scaleX, m_scaleY, and m_translate.
Definition at line 24 of file transform_trs.cpp.
References m_rotate, m_scaleX, m_scaleY, m_translate, RotatePoint(), VECTOR2< T >::x, and VECTOR2< T >::y.
Definition at line 32 of file transform_trs.cpp.
References Apply(), KiROUND(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by Apply(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), CHECK_TRANSFORM_PAD_INVARIANT(), Compose(), ZONE::GetBoardOutline(), ZONE::GetHatchLines(), PCB_TEXTBOX::OnFootprintTransformed(), and PCB_SHAPE::rebakeFromTransform().
| double TRANSFORM_TRS::ApplyLinearScale | ( | double | aLength | ) | const |
Definition at line 119 of file transform_trs.cpp.
References m_scaleX, and m_scaleY.
Referenced by BOOST_AUTO_TEST_CASE().
| TRANSFORM_TRS TRANSFORM_TRS::Compose | ( | const TRANSFORM_TRS & | aOuter | ) | const |
Definition at line 69 of file transform_trs.cpp.
References Apply(), m_rotate, m_scaleX, m_scaleY, m_translate, result, and TRANSFORM_TRS().
Referenced by BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inline |
Definition at line 66 of file transform_trs.h.
References m_rotate.
Referenced by PCB_SHAPE::rebakeFromTransform(), and PCB_SHAPE::syncLibCoords().
|
inline |
Definition at line 67 of file transform_trs.h.
References m_scaleX.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOARD::ExchangeFootprint(), PCB_IO_KICAD_SEXPR::format(), fpScaleLinear(), PAD::GetPrimitiveLibScale(), PCB_TEXT::GetTextSize(), PCB_TEXTBOX::GetTextSize(), PCB_TEXT::GetTextThickness(), PCB_TEXTBOX::GetTextThickness(), PCB_TEXTBOX::OnFootprintTransformed(), PCB_SHAPE::rebakeFromTransform(), FOOTPRINT::RescaleAroundPoint(), DRC_TEST_PROVIDER_FOOTPRINT_CHECKS::Run(), PCB_TEXT::SetTextSize(), PCB_TEXTBOX::SetTextSize(), PCB_TEXT::SetTextThickness(), PCB_TEXTBOX::SetTextThickness(), PCB_SHAPE::syncLibCoords(), PCB_TEXTBOX::syncLibCoords(), unbakeLinear(), unbakeSize(), and unbakeSizeUniform().
|
inline |
Definition at line 68 of file transform_trs.h.
References m_scaleY.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOARD::ExchangeFootprint(), PCB_IO_KICAD_SEXPR::format(), fpScaleLinear(), PAD::GetPrimitiveLibScale(), PCB_TEXT::GetTextSize(), PCB_TEXTBOX::GetTextSize(), PCB_TEXT::GetTextThickness(), PCB_TEXTBOX::GetTextThickness(), PCB_TEXTBOX::OnFootprintTransformed(), PCB_SHAPE::rebakeFromTransform(), FOOTPRINT::RescaleAroundPoint(), PCB_TEXT::SetTextSize(), PCB_TEXTBOX::SetTextSize(), PCB_TEXT::SetTextThickness(), PCB_TEXTBOX::SetTextThickness(), PCB_TEXTBOX::syncLibCoords(), unbakeLinear(), unbakeSize(), and unbakeSizeUniform().
|
inline |
Definition at line 65 of file transform_trs.h.
References m_translate.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), and FOOTPRINT::RescaleAroundPoint().
Definition at line 39 of file transform_trs.cpp.
References m_rotate, m_scaleX, m_scaleY, m_translate, RotatePoint(), VECTOR2< T >::x, and VECTOR2< T >::y.
Definition at line 47 of file transform_trs.cpp.
References InverseApply(), KiROUND(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), PCB_SHAPE::Flip(), PCB_IO_KICAD_SEXPR::format(), formatInternalUnits(), PCB_SHAPE::GetLibraryPolyShape(), InverseApply(), PCB_BARCODE::Move(), PCB_DIMENSION_BASE::Move(), ZONE::Move(), ZONE::MoveEdge(), PCB_IO_KICAD_SEXPR_PARSER::parseFOOTPRINT_unchecked(), PCB_SHAPE::syncLibCoords(), and PCB_TEXTBOX::syncLibCoords().
| TRANSFORM_TRS TRANSFORM_TRS::Invert | ( | ) | const |
Definition at line 54 of file transform_trs.cpp.
References KiROUND(), m_rotate, m_scaleX, m_scaleY, m_translate, RotatePoint(), TRANSFORM_TRS(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by BOOST_AUTO_TEST_CASE().
| bool TRANSFORM_TRS::IsIdentity | ( | ) | const |
Definition at line 104 of file transform_trs.cpp.
References m_rotate, m_scaleX, m_scaleY, and m_translate.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
| bool TRANSFORM_TRS::IsUniformScale | ( | ) | const |
Definition at line 113 of file transform_trs.cpp.
References m_scaleX, and m_scaleY.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), PCB_SHAPE::rebakeFromTransform(), DRC_TEST_PROVIDER_FOOTPRINT_CHECKS::Run(), and PCB_SHAPE::syncLibCoords().
|
inline |
Definition at line 75 of file transform_trs.h.
References TRANSFORM_TRS().
| bool TRANSFORM_TRS::operator== | ( | const TRANSFORM_TRS & | aOther | ) | const |
Definition at line 125 of file transform_trs.cpp.
References m_rotate, m_scaleX, m_scaleY, m_translate, and TRANSFORM_TRS().
| TRANSFORM_TRS TRANSFORM_TRS::RescaleAround | ( | const VECTOR2I & | aFixedPoint, |
| double | aSx, | ||
| double | aSy ) const |
Definition at line 80 of file transform_trs.cpp.
References KiROUND(), m_rotate, m_scaleX, m_scaleY, m_translate, result, RotatePoint(), TRANSFORM_TRS(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inline |
Definition at line 71 of file transform_trs.h.
References m_rotate.
|
inline |
Definition at line 72 of file transform_trs.h.
References m_scaleX, and m_scaleY.
Referenced by PCB_SHAPE::RebakeWithScale(), and PCB_SHAPE::syncLibCoords().
|
inline |
Definition at line 70 of file transform_trs.h.
References m_translate.
|
private |
Definition at line 79 of file transform_trs.h.
Referenced by Apply(), Compose(), GetRotate(), InverseApply(), Invert(), IsIdentity(), operator==(), RescaleAround(), SetRotate(), TRANSFORM_TRS(), and TRANSFORM_TRS().
|
private |
Definition at line 80 of file transform_trs.h.
Referenced by Apply(), ApplyLinearScale(), Compose(), GetScaleX(), InverseApply(), Invert(), IsIdentity(), IsUniformScale(), operator==(), RescaleAround(), SetScale(), TRANSFORM_TRS(), and TRANSFORM_TRS().
|
private |
Definition at line 81 of file transform_trs.h.
Referenced by Apply(), ApplyLinearScale(), Compose(), GetScaleY(), InverseApply(), Invert(), IsIdentity(), IsUniformScale(), operator==(), RescaleAround(), SetScale(), TRANSFORM_TRS(), and TRANSFORM_TRS().
|
private |
Definition at line 78 of file transform_trs.h.
Referenced by Apply(), Compose(), GetTranslate(), InverseApply(), Invert(), IsIdentity(), operator==(), RescaleAround(), SetTranslate(), TRANSFORM_TRS(), and TRANSFORM_TRS().