77 if( parent->m_visible )
89 if( !visitor(
this ) )
95 child->IterateTree( visitor, depth + 1 );
175 int aSize,
const wxString& aName,
180 sh->
Append( aP.
x - aSize, aP.
y - aSize );
181 sh->Append( aP.
x + aSize, aP.
y + aSize );
182 sh->Append( aP.
x, aP.
y );
183 sh->Append( aP.
x - aSize, aP.
y + aSize );
184 sh->Append( aP.
x + aSize, aP.
y - aSize );
201 int aOverrideWidth,
const wxString& aName,
219 int aOverrideWidth,
const wxString& aName,
222 auto sh = aShape->
Clone();
239 ent->
m_msg = msg.c_str();
271 for(
auto sh : ent->m_shapes )
276 bb.
Merge( sh->BBox() );
BOX2< Vec > & Merge(const BOX2< Vec > &aRect)
Modify the position and size of the rectangle in order to contain aRect.
A color representation with 4 components: red, green, blue, alpha.
static const COLOR4D WHITE
void SetDebugEnabled(bool aEnabled)
Base class for PNS router board items.
virtual const SHAPE * Shape() const
Return the geometrical shape of the item.
std::vector< SHAPE * > m_shapes
PNS_DEBUG_SHAPE * NewChild()
PNS_DEBUG_SHAPE(PNS_DEBUG_SHAPE *aParent=nullptr)
void IterateTree(std::function< bool(PNS_DEBUG_SHAPE *)> visitor, int depth=0)
void AddChild(PNS_DEBUG_SHAPE *ent)
PNS_DEBUG_SHAPE * m_parent
PNS::DEBUG_DECORATOR::SRC_LOCATION_INFO m_srcLoc
std::vector< PNS_DEBUG_SHAPE * > m_children
virtual void AddPoint(const VECTOR2I &aP, const KIGFX::COLOR4D &aColor, int aSize, const wxString &aName=wxT(""), const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO()) override
void addEntry(PNS_DEBUG_SHAPE *ent)
PNS_TEST_DEBUG_DECORATOR()
PNS_DEBUG_SHAPE * m_activeEntry
virtual void AddItem(const PNS::ITEM *aItem, const KIGFX::COLOR4D &aColor, int aOverrideWidth=0, const wxString &aName=wxT(""), const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO()) override
std::vector< PNS_DEBUG_STAGE * > m_stages
BOX2I GetStageExtents(int stage) const
virtual void Message(const wxString &msg, const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO()) override
PNS_DEBUG_STAGE * currentStage()
virtual ~PNS_TEST_DEBUG_DECORATOR()
virtual void BeginGroup(const wxString &name, int aLevel=0, const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO()) override
virtual void EndGroup(const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO()) override
virtual void AddShape(const SHAPE *aShape, const KIGFX::COLOR4D &aColor, int aOverrideWidth=0, const wxString &aName=wxT(""), const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO()) override
virtual void NewStage(const wxString &name, int iter, const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO()) override
void SetCurrentStageStatus(bool stat)
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
void Append(int aX, int aY, bool aAllowDuplication=false)
Append a new point at the end of the line chain.
An abstract shape on 2D plane.
virtual SHAPE * Clone() const
Return a dynamically allocated copy of the shape.
PNS_DEBUG_SHAPE * m_entries