Move EDA_ITEM bounding boxes to BOX2I.

This commit is contained in:
Jeff Young
2022-08-31 10:16:55 +01:00
parent 121fad63ab
commit 2dc6300501
97 changed files with 338 additions and 397 deletions
+3 -3
View File
@@ -120,13 +120,13 @@ double PCB_BITMAP::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const
}
const EDA_RECT PCB_BITMAP::GetBoundingBox() const
const BOX2I PCB_BITMAP::GetBoundingBox() const
{
// Bitmaps are center origin, EDA_RECTs need top-left origin
// Bitmaps are center origin, BOX2Is need top-left origin
VECTOR2I size = m_image->GetSize();
VECTOR2I topLeft = { m_pos.x - size.x / 2, m_pos.y - size.y / 2 };
return EDA_RECT( topLeft, size );
return BOX2I( topLeft, size );
}