|
KiCad PCB EDA Suite
|
Test fixture for label bounding box tests. More...
Public Member Functions | |
| LABEL_BBOX_FIXTURE () | |
| KIFONT::FONT * | GetFirstExistingOutlineFont () |
| void | CheckTextBoundingBoxWidth (const EDA_TEXT &aText, const wxString &aTestName, double aMaxWidthMultiplier=1.3) |
| Helper function to check that a text bounding box is reasonable. | |
| void | CheckLabelBodyBoundingBox (SCH_LABEL_BASE &aLabel, const wxString &aTestName) |
| Helper function to check label body bounding box. | |
Test fixture for label bounding box tests.
Definition at line 33 of file test_label_bounding_box.cpp.
|
inline |
Definition at line 35 of file test_label_bounding_box.cpp.
|
inline |
Helper function to check label body bounding box.
Definition at line 116 of file test_label_bounding_box.cpp.
References BOOST_TEST_MESSAGE(), SCH_LABEL_BASE::GetBodyBoundingBox(), EDA_TEXT::GetTextBox(), and BOX2< Vec >::GetWidth().
|
inline |
Helper function to check that a text bounding box is reasonable.
The bounding box should contain the text without excessive empty space. For a left-justified text, the width should be approximately equal to the text width, not double it.
Definition at line 71 of file test_label_bounding_box.cpp.
References BOOST_TEST_MESSAGE(), EDA_TEXT::GetDrawFont(), EDA_TEXT::GetEffectiveTextPenWidth(), KIFONT::FONT::GetName(), EDA_TEXT::GetShownText(), EDA_TEXT::GetTextBox(), EDA_TEXT::GetTextSize(), BOX2< Vec >::GetWidth(), EDA_TEXT::IsBold(), EDA_TEXT::IsItalic(), KIFONT::FONT::StringBoundaryLimits(), text, and VECTOR2< T >::x.
|
inline |
Definition at line 39 of file test_label_bounding_box.cpp.
References KIFONT::FONT::GetFont(), KIFONT::FONT::IsOutline(), and name.