48 virtual bool Run()
override;
50 virtual const wxString
GetName()
const override {
return wxT(
"text_mirroring" ); };
59 REPORT_AUX( wxT(
"Text mirroring violations ignored. Tests not run." ) );
69 auto checkTextMirroring =
72 if(
m_drcEngine->IsErrorLimitExceeded( errorCode ) )
75 bool layerMatch = ( isMirrored && topLayers.Contains( item->
GetLayer() ) )
76 || ( !isMirrored && bottomLayers.Contains( item->
GetLayer() ) );
78 if( layerMatch &&
text->IsMirrored() == isMirrored )
81 drcItem->SetItems( item );
87 const int progressDelta = 500;
89 int progressIndex = 0;
91 static const std::vector<KICAD_T> itemTypes = {
112 if( !
text->IsVisible()
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
static std::shared_ptr< DRC_ITEM > Create(int aErrorCode)
Constructs a DRC_ITEM for the given error code.
virtual ~DRC_TEST_PROVIDER_TEXT_MIRRORING()=default
virtual const wxString GetName() const override
virtual bool Run() override
Run this provider against the given PCB with configured options (if any).
DRC_TEST_PROVIDER_TEXT_MIRRORING()
virtual bool reportPhase(const wxString &aStageName)
int forEachGeometryItem(const std::vector< KICAD_T > &aTypes, const LSET &aLayers, const std::function< bool(BOARD_ITEM *)> &aFunc)
void reportViolation(std::shared_ptr< DRC_ITEM > &item, const VECTOR2I &aMarkerPos, int aMarkerLayer, const std::function< void(PCB_MARKER *)> &aPathGenerator=[](PCB_MARKER *){})
virtual bool reportProgress(size_t aCount, size_t aSize, size_t aDelta=1)
virtual VECTOR2I GetPosition() const
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
LSET is a set of PCB_LAYER_IDs.
@ DRCE_MIRRORED_TEXT_ON_FRONT_LAYER
@ DRCE_NONMIRRORED_TEXT_ON_BACK_LAYER
This file contains miscellaneous commonly used macros and functions.
static DRC_REGISTER_TEST_PROVIDER< DRC_TEST_PROVIDER_ANNULAR_WIDTH > dummy
@ PCB_TEXTBOX_T
class PCB_TEXTBOX, wrapped text on a layer
@ PCB_TEXT_T
class PCB_TEXT, text on a layer
@ PCB_FIELD_T
class PCB_FIELD, text associated with a footprint property
@ PCB_TABLECELL_T
class PCB_TABLECELL, PCB_TEXTBOX for use in tables
@ PCB_DIMENSION_T
class PCB_DIMENSION_BASE: abstract dimension meta-type