const BOX2I D_PAD::ViewBBox() const { // Bounding box includes soldermask too int solderMaskMargin = GetSolderMaskMargin(); VECTOR2I solderPasteMargin = VECTOR2D( GetSolderPasteMargin() ); EDA_RECT bbox = GetBoundingBox(); // Look for the biggest possible bounding box int xMargin = std::max( solderMaskMargin, solderPasteMargin.x ); int yMargin = std::max( solderMaskMargin, solderPasteMargin.y ); return BOX2I( VECTOR2I( bbox.GetOrigin() ) - VECTOR2I( xMargin, yMargin ), VECTOR2I( bbox.GetSize() ) + VECTOR2I( 2 * xMargin, 2 * yMargin ) ); }
const BOX2I MODULE::ViewBBox() const { EDA_RECT fpRect = GetFootprintRect(); return BOX2I( VECTOR2I( fpRect.GetOrigin() ), VECTOR2I( fpRect.GetSize() ) ); }
const BOX2I GERBER_DRAW_ITEM::ViewBBox() const { EDA_RECT bbox = GetBoundingBox(); return BOX2I( VECTOR2I( bbox.GetOrigin() ), VECTOR2I( bbox.GetSize() ) ); }
const BOX2I EDA_ITEM::ViewBBox() const { // Basic fallback return BOX2I( VECTOR2I( GetBoundingBox().GetOrigin() ), VECTOR2I( GetBoundingBox().GetSize() ) ); }