28 using namespace std::placeholders;
38 PCB_VIEW::PCB_VIEW(
bool aIsDynamic ) :
45 typedef std::numeric_limits<int> coord_limits;
46 double pos = coord_limits::lowest() / 2 + coord_limits::epsilon();
47 double size = coord_limits::max() - coord_limits::epsilon();
60 BOARD_ITEM* boardItem = dynamic_cast<BOARD_ITEM*>( aItem );
64 FOOTPRINT* footprint = static_cast<FOOTPRINT*>( boardItem );
77 BOARD_ITEM* boardItem = dynamic_cast<BOARD_ITEM*>( aItem );
81 FOOTPRINT* footprint = static_cast<FOOTPRINT*>( boardItem );
94 const BOARD_ITEM* boardItem = dynamic_cast<const BOARD_ITEM*>( aItem );
98 const FOOTPRINT* footprint = static_cast<const FOOTPRINT*>( boardItem );
107 const PCB_GROUP* group = static_cast<const PCB_GROUP*>( boardItem );
111 Update( child, aUpdateFlags );
127 auto painter = static_cast<KIGFX::PCB_PAINTER*>(
GetPainter() );
128 auto settings = static_cast<KIGFX::PCB_RENDER_SETTINGS*>( painter->GetSettings() );
130 settings->LoadDisplayOptions( aOptions, settings->GetShowPageLimits() );
The Cairo implementation of the graphics abstraction layer.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
class PCB_GROUP, a set of BOARD_ITEMs
A set of BOARD_ITEMs (i.e., without duplicates).
virtual void Remove(VIEW_ITEM *aItem)
Remove a VIEW_ITEM from the view.
void SetSize(const Vec &size)
An abstract base class for deriving all objects that can be added to a VIEW.
virtual void Remove(VIEW_ITEM *aItem) override
Remove a VIEW_ITEM from the view.
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
Container for display options like enable/disable some optional drawings.
virtual void Update(const VIEW_ITEM *aItem, int aUpdateFlags) const override
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
void UpdateDisplayOptions(const PCB_DISPLAY_OPTIONS &aOptions)
class FOOTPRINT, a footprint
BOX2D m_boundary
Scale lower limit.
void SetOrigin(const Vec &pos)
void RunOnChildren(const std::function< void(BOARD_ITEM *)> &aFunction) const
Invoke a function on all members of the group.
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1) override
Add a VIEW_ITEM to the view.
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1)
Add a VIEW_ITEM to the view.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
Definition of PCB_DISPLAY_OPTIONS class.
virtual void Update(const VIEW_ITEM *aItem, int aUpdateFlags) const
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
KICAD_T Type() const
Returns the type of object.