KiCad PCB EDA Suite
KIGFX::VIEW::extentsVisitor Struct Reference

Public Member Functions

 extentsVisitor ()
 
bool operator() (VIEW_ITEM *aItem)
 

Public Attributes

BOX2I extents
 
bool first
 

Detailed Description

Definition at line 1293 of file view.cpp.

Constructor & Destructor Documentation

KIGFX::VIEW::extentsVisitor::extentsVisitor ( )
inline

Definition at line 1298 of file view.cpp.

1299  {
1300  first = true;
1301  }

Member Function Documentation

bool KIGFX::VIEW::extentsVisitor::operator() ( VIEW_ITEM aItem)
inline

Definition at line 1303 of file view.cpp.

References BOX2< Vec >::Merge(), and KIGFX::VIEW_ITEM::ViewBBox().

1304  {
1305  if( first )
1306  extents = aItem->ViewBBox();
1307  else
1308  extents.Merge( aItem->ViewBBox() );
1309 
1310  return false;
1311  }
BOX2< Vec > & Merge(const BOX2< Vec > &aRect)
Function Merge modifies the position and size of the rectangle in order to contain aRect...
Definition: box2.h:350

Member Data Documentation

BOX2I KIGFX::VIEW::extentsVisitor::extents

Definition at line 1295 of file view.cpp.

Referenced by KIGFX::VIEW::CalculateExtents().

bool KIGFX::VIEW::extentsVisitor::first

Definition at line 1296 of file view.cpp.


The documentation for this struct was generated from the following file: