86 fn.AppendDir( wxS(
"issue16538" ) );
87 fn.SetName( wxS(
"issue16538" ) );
92 SCH_SYMBOL* symbol = GetSymbolByRef( wxS(
"C1" ) );
97 BOOST_CHECK( transform.
y1 != 0 );
113 wxString::Format(
"Expected vertical bounding box (height > width) "
114 "for rotated symbol. Got width=%lld, height=%lld",
115 static_cast<long long>( bbox.
GetWidth() ),
116 static_cast<long long>( bbox.
GetHeight() ) ) );
127 fn.AppendDir( wxS(
"issue16538" ) );
128 fn.SetName( wxS(
"issue16538" ) );
133 SCH_SYMBOL* symbol = GetSymbolByRef( wxS(
"C1" ) );
145 BOOST_CHECK_MESSAGE( drawRotation.
IsVertical(),
146 wxString::Format(
"Expected vertical draw rotation for 90-degree "
147 "rotated symbol with horizontal field angle. "
148 "Got %f degrees", drawRotation.
AsDegrees() ) );
constexpr size_type GetWidth() const
constexpr size_type GetHeight() const
virtual void SetTextAngle(const EDA_ANGLE &aAngle)
EE_TYPE OfType(KICAD_T aType) const
A generic fixture for loading schematics and associated settings for qa tests.
std::unique_ptr< SCHEMATIC > m_schematic
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
EDA_ANGLE GetDrawRotation() const override
Adjusters to allow EDA_TEXT to draw/print/etc.
Base class for any item which can be embedded within the SCHEMATIC container class,...
EE_RTREE & Items()
Get the full RTree, usually for iterating.
const wxString GetRef(const SCH_SHEET_PATH *aSheet, bool aIncludeUnit=false) const override
SCH_FIELD * GetField(FIELD_T aFieldType)
Return a mandatory field in this symbol.
const TRANSFORM & GetTransform() const
SCH_SYMBOL * GetSymbolByRef(const wxString &aRef)
static constexpr EDA_ANGLE ANGLE_HORIZONTAL
static const std::string KiCadSchematicFileExtension
std::string GetEeschemaTestDataDir()
Get the configured location of Eeschema test data.
static void LoadSchematic(SCHEMATIC *aSchematic, SCH_SHEET *aRootSheet, const wxString &aFileName)
@ REFERENCE
Field Reference of part, i.e. "IC21".
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_CASE(RotatedSymbolFieldBoundingBox)
Test that field bounding boxes for rotated symbols have correct dimensions.
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()