const BOX2I DIMENSION::ViewBBox() const { BOX2I dimBBox = BOX2I( VECTOR2I( GetBoundingBox().GetPosition() ), VECTOR2I( GetBoundingBox().GetSize() ) ); dimBBox.Merge( m_Text.ViewBBox() ); return dimBBox; }
bool operator()( VIEW_ITEM* aItem ) { if( first ) extents = aItem->ViewBBox(); else extents.Merge ( aItem->ViewBBox() ); return false; }
static void extendBox( BOX2I& aBox, bool& aDefined, const VECTOR2I& aP ) { if( aDefined ) aBox.Merge ( aP ); else { aBox = BOX2I( aP, VECTOR2I( 0, 0 ) ); aDefined = true; } }
const BOX2I SHAPE_POLY_SET::BBox( int aClearance ) const { BOX2I bb; for( unsigned i = 0; i < m_polys.size(); i++ ) { if( i == 0 ) bb = m_polys[i][0].BBox(); else bb.Merge( m_polys[i][0].BBox() ); } bb.Inflate( aClearance ); return bb; }
const BOX2I VIEW_GROUP::ViewBBox() const { BOX2I bb; if( !m_groupItems.size() ) { bb.SetMaximum(); } else { bb = m_groupItems[0]->ViewBBox(); for( auto item : m_groupItems ) bb.Merge( item->ViewBBox() ); } return bb; }