27#ifndef RATSNEST_VIEW_ITEM_H
28#define RATSNEST_VIEW_ITEM_H
81 const BOX2D& aViewport,
bool aCurved );
102 void Show(
int x, std::ostream& st )
const override { }
107 return wxT(
"RATSNEST_VIEW_ITEM" );
111 std::shared_ptr<CONNECTIVITY_DATA>
m_data;
EDA_ITEM(EDA_ITEM *parent, KICAD_T idType, bool isSCH_ITEM=false, bool isBOARD_ITEM=false)
Abstract interface for drawing on a 2D-surface.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
RATSNEST_VIEW_ITEM(std::shared_ptr< CONNECTIVITY_DATA > aData, PART aPart=PART::ALL)
bool BoardInputsChanged(KIGFX::VIEW *aView)
Return true when an input to the board's lines other than connectivity has changed since the last cal...
const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
PART
The lines an item draws.
static bool LineInViewport(const VECTOR2I &aSource, const VECTOR2I &aTarget, const BOX2D &aViewport, bool aCurved)
Return true when a ratsnest line between aSource and aTarget can contribute to aViewport.
static VECTOR2D CurveControlPoint(const VECTOR2D &aSource, const VECTOR2D &aTarget)
Return the doubled Bezier control point used to bow a curved ratsnest line.
const std::shared_ptr< CONNECTIVITY_DATA > & GetConnectivity() const
std::shared_ptr< CONNECTIVITY_DATA > m_data
Object containing ratsnest data.
bool HitTest(const VECTOR2I &aPoint, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
virtual wxString GetClass() const override
Return the class name.
static constexpr int LOCAL_LAYER
The local part is drawn on a UI layer, which every canvas keeps on its overlay.
void ViewDraw(int aLayer, KIGFX::VIEW *aView) const override
Draw the parts of the object belonging to layer aLayer.
size_t m_boardInputs
see BoardInputsChanged()
std::vector< int > ViewGetLayers() const override
Return the all the layers within the VIEW the object is painted on.
VECTOR2< int32_t > VECTOR2I
VECTOR2< double > VECTOR2D