mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-20 21:11:43 +00:00
All: GetBoundingBox returns now a const EDA_RECT.
Pcbnew: Code cleaning and bug fix in autoplace functions Dialog exchange footprints has now a separate button to update the .cmp file, only on request.
This commit is contained in:
parent
78670eebb0
commit
5f01f123de
common
eeschema
lib_arc.cpplib_arc.hlib_bezier.cpplib_bezier.hlib_circle.cpplib_circle.hlib_draw_item.hlib_field.cpplib_field.hlib_pin.cpplib_pin.hlib_polyline.cpplib_polyline.hlib_rectangle.cpplib_rectangle.hlib_text.cpplib_text.hsch_bitmap.cppsch_bitmap.hsch_bus_entry.cppsch_bus_entry.hsch_component.cppsch_component.hsch_field.cppsch_field.hsch_junction.cppsch_junction.hsch_line.cppsch_line.hsch_marker.cppsch_marker.hsch_no_connect.cppsch_no_connect.hsch_sheet.cppsch_sheet.hsch_text.cppsch_text.h
gerbview
include
pcbnew
autorouter
class_board.cppclass_board.hclass_dimension.cppclass_dimension.hclass_drawsegment.cppclass_drawsegment.hclass_mire.cppclass_mire.hclass_module.cppclass_module.hclass_pad.cppclass_pad.hclass_pcb_text.cppclass_pcb_text.hclass_text_mod.cppclass_text_mod.hclass_track.cppclass_track.hclass_zone.cppclass_zone.hdialogs
xchgmod.cpp@ -532,7 +532,7 @@ double EDA_RECT::GetArea() const
|
||||
|
||||
/* Calculate the bounding box of this, when rotated
|
||||
*/
|
||||
EDA_RECT EDA_RECT::GetBoundingBoxRotated( wxPoint aRotCenter, double aAngle )
|
||||
const EDA_RECT EDA_RECT::GetBoundingBoxRotated( wxPoint aRotCenter, double aAngle )
|
||||
{
|
||||
wxPoint corners[4];
|
||||
|
||||
|
@ -484,7 +484,7 @@ void LIB_ARC::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOf
|
||||
}
|
||||
|
||||
|
||||
EDA_RECT LIB_ARC::GetBoundingBox() const
|
||||
const EDA_RECT LIB_ARC::GetBoundingBox() const
|
||||
{
|
||||
int minX, minY, maxX, maxY, angleStart, angleEnd;
|
||||
EDA_RECT rect;
|
||||
|
@ -104,7 +104,7 @@ public:
|
||||
|
||||
bool HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform );
|
||||
|
||||
EDA_RECT GetBoundingBox() const;
|
||||
const EDA_RECT GetBoundingBox() const; // Virtual
|
||||
|
||||
void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList );
|
||||
|
||||
|
@ -378,7 +378,7 @@ bool LIB_BEZIER::HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTra
|
||||
}
|
||||
|
||||
|
||||
EDA_RECT LIB_BEZIER::GetBoundingBox() const
|
||||
const EDA_RECT LIB_BEZIER::GetBoundingBox() const
|
||||
{
|
||||
EDA_RECT rect;
|
||||
int xmin, xmax, ymin, ymax;
|
||||
|
@ -76,7 +76,7 @@ public:
|
||||
|
||||
bool HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTransform );
|
||||
|
||||
EDA_RECT GetBoundingBox() const;
|
||||
const EDA_RECT GetBoundingBox() const; // Virtual
|
||||
|
||||
bool Inside( EDA_RECT& aRect ) const;
|
||||
|
||||
|
@ -105,7 +105,7 @@ bool LIB_CIRCLE::HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTra
|
||||
if( aThreshold < 0 )
|
||||
aThreshold = GetPenSize() / 2;
|
||||
|
||||
int dist = KiROUND( GetLineLength( aPosRef, aTransform.TransformCoordinate( m_Pos ) ) );
|
||||
int dist = KiROUND( GetLineLength( aPosRef, aTransform.TransformCoordinate( m_Pos ) ) );
|
||||
|
||||
if( abs( dist - m_Radius ) <= aThreshold )
|
||||
return true;
|
||||
@ -251,7 +251,7 @@ void LIB_CIRCLE::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint&
|
||||
}
|
||||
|
||||
|
||||
EDA_RECT LIB_CIRCLE::GetBoundingBox() const
|
||||
const EDA_RECT LIB_CIRCLE::GetBoundingBox() const
|
||||
{
|
||||
EDA_RECT rect;
|
||||
|
||||
|
@ -67,7 +67,7 @@ public:
|
||||
|
||||
int GetPenSize( ) const;
|
||||
|
||||
EDA_RECT GetBoundingBox() const;
|
||||
const EDA_RECT GetBoundingBox() const; // Virtual
|
||||
|
||||
void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList );
|
||||
|
||||
|
@ -260,7 +260,7 @@ public:
|
||||
/**
|
||||
* @return the boundary box for this, in library coordinates
|
||||
*/
|
||||
virtual EDA_RECT GetBoundingBox() const { return EDA_ITEM::GetBoundingBox(); }
|
||||
virtual const EDA_RECT GetBoundingBox() const { return EDA_ITEM::GetBoundingBox(); }
|
||||
|
||||
/**
|
||||
* Function GetMsgPanelInfo
|
||||
|
@ -524,7 +524,7 @@ wxString LIB_FIELD::GetFullText( int unit )
|
||||
}
|
||||
|
||||
|
||||
EDA_RECT LIB_FIELD::GetBoundingBox() const
|
||||
const EDA_RECT LIB_FIELD::GetBoundingBox() const
|
||||
{
|
||||
/* Y coordinates for LIB_ITEMS are bottom to top, so we must invert the Y position when
|
||||
* calling GetTextBox() that works using top to bottom Y axis orientation.
|
||||
|
@ -165,7 +165,7 @@ public:
|
||||
return (m_Attributs & TEXT_NO_VISIBLE) == 0 ? true : false;
|
||||
}
|
||||
|
||||
EDA_RECT GetBoundingBox() const;
|
||||
const EDA_RECT GetBoundingBox() const; // Virtual
|
||||
|
||||
void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList );
|
||||
|
||||
|
@ -1869,7 +1869,7 @@ void LIB_PIN::GetMsgPanelInfo( MSG_PANEL_ITEMS& aList )
|
||||
}
|
||||
|
||||
|
||||
EDA_RECT LIB_PIN::GetBoundingBox() const
|
||||
const EDA_RECT LIB_PIN::GetBoundingBox() const
|
||||
{
|
||||
LIB_COMPONENT* entry = (LIB_COMPONENT*) m_Parent;
|
||||
EDA_RECT bbox;
|
||||
|
@ -139,7 +139,7 @@ public:
|
||||
|
||||
bool Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint* aFindLocation );
|
||||
|
||||
EDA_RECT GetBoundingBox() const;
|
||||
const EDA_RECT GetBoundingBox() const; // Virtual
|
||||
|
||||
/**
|
||||
* Function ReturnPinEndPoint
|
||||
|
@ -353,7 +353,7 @@ bool LIB_POLYLINE::HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM&
|
||||
}
|
||||
|
||||
|
||||
EDA_RECT LIB_POLYLINE::GetBoundingBox() const
|
||||
const EDA_RECT LIB_POLYLINE::GetBoundingBox() const
|
||||
{
|
||||
EDA_RECT rect;
|
||||
int xmin, xmax, ymin, ymax;
|
||||
|
@ -78,7 +78,7 @@ public:
|
||||
|
||||
bool HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform );
|
||||
|
||||
EDA_RECT GetBoundingBox() const;
|
||||
const EDA_RECT GetBoundingBox() const; // Virtual
|
||||
|
||||
int GetPenSize( ) const;
|
||||
|
||||
|
@ -256,7 +256,7 @@ void LIB_RECTANGLE::GetMsgPanelInfo( MSG_PANEL_ITEMS& aList )
|
||||
}
|
||||
|
||||
|
||||
EDA_RECT LIB_RECTANGLE::GetBoundingBox() const
|
||||
const EDA_RECT LIB_RECTANGLE::GetBoundingBox() const
|
||||
{
|
||||
EDA_RECT rect;
|
||||
|
||||
|
@ -71,7 +71,7 @@ public:
|
||||
|
||||
int GetPenSize( ) const;
|
||||
|
||||
EDA_RECT GetBoundingBox() const;
|
||||
const EDA_RECT GetBoundingBox() const; // Virtual
|
||||
|
||||
void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList );
|
||||
|
||||
|
@ -430,7 +430,7 @@ void LIB_TEXT::GetMsgPanelInfo( MSG_PANEL_ITEMS& aList )
|
||||
}
|
||||
|
||||
|
||||
EDA_RECT LIB_TEXT::GetBoundingBox() const
|
||||
const EDA_RECT LIB_TEXT::GetBoundingBox() const
|
||||
{
|
||||
/* Y coordinates for LIB_ITEMS are bottom to top, so we must invert the Y position when
|
||||
* calling GetTextBox() that works using top to bottom Y axis orientation.
|
||||
|
@ -96,7 +96,7 @@ public:
|
||||
|
||||
void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList );
|
||||
|
||||
EDA_RECT GetBoundingBox() const;
|
||||
const EDA_RECT GetBoundingBox() const; // virtual
|
||||
|
||||
void Rotate();
|
||||
|
||||
|
@ -176,7 +176,7 @@ bool SCH_BITMAP::Load( LINE_READER& aLine, wxString& aErrorMsg )
|
||||
}
|
||||
|
||||
|
||||
EDA_RECT SCH_BITMAP::GetBoundingBox() const
|
||||
const EDA_RECT SCH_BITMAP::GetBoundingBox() const
|
||||
{
|
||||
EDA_RECT rect = m_Image->GetBoundingBox();
|
||||
|
||||
|
@ -90,7 +90,7 @@ public:
|
||||
*/
|
||||
wxSize GetSize() const;
|
||||
|
||||
EDA_RECT GetBoundingBox() const;
|
||||
const EDA_RECT GetBoundingBox() const; // Virtual
|
||||
|
||||
void SwapData( SCH_ITEM* aItem );
|
||||
|
||||
|
@ -110,7 +110,7 @@ bool SCH_BUS_BUS_ENTRY::Save( FILE* aFile ) const
|
||||
}
|
||||
|
||||
|
||||
bool SCH_BUS_ENTRY_BASE::Load( LINE_READER& aLine, wxString& aErrorMsg,
|
||||
bool SCH_BUS_ENTRY_BASE::Load( LINE_READER& aLine, wxString& aErrorMsg,
|
||||
SCH_ITEM **out )
|
||||
{
|
||||
char Name1[256];
|
||||
@ -136,7 +136,7 @@ bool SCH_BUS_ENTRY_BASE::Load( LINE_READER& aLine, wxString& aErrorMsg,
|
||||
this_new = new SCH_BUS_WIRE_ENTRY;
|
||||
*out = this_new;
|
||||
|
||||
if( !aLine.ReadLine() || sscanf( (char*) aLine, "%d %d %d %d ",
|
||||
if( !aLine.ReadLine() || sscanf( (char*) aLine, "%d %d %d %d ",
|
||||
&this_new->m_pos.x, &this_new->m_pos.y,
|
||||
&this_new->m_size.x, &this_new->m_size.y ) != 4 )
|
||||
{
|
||||
@ -153,7 +153,7 @@ bool SCH_BUS_ENTRY_BASE::Load( LINE_READER& aLine, wxString& aErrorMsg,
|
||||
}
|
||||
|
||||
|
||||
EDA_RECT SCH_BUS_ENTRY_BASE::GetBoundingBox() const
|
||||
const EDA_RECT SCH_BUS_ENTRY_BASE::GetBoundingBox() const
|
||||
{
|
||||
EDA_RECT box;
|
||||
|
||||
|
@ -76,7 +76,7 @@ public:
|
||||
|
||||
static bool Load( LINE_READER& aLine, wxString& aErrorMsg, SCH_ITEM **out );
|
||||
|
||||
EDA_RECT GetBoundingBox() const;
|
||||
const EDA_RECT GetBoundingBox() const; // Virtual
|
||||
|
||||
void Move( const wxPoint& aMoveVector )
|
||||
{
|
||||
|
@ -1430,7 +1430,7 @@ EDA_RECT SCH_COMPONENT::GetBodyBoundingBox() const
|
||||
}
|
||||
|
||||
|
||||
EDA_RECT SCH_COMPONENT::GetBoundingBox() const
|
||||
const EDA_RECT SCH_COMPONENT::GetBoundingBox() const
|
||||
{
|
||||
EDA_RECT bbox = GetBodyBoundingBox();
|
||||
for( size_t i = 0; i < m_Fields.size(); i++ )
|
||||
|
@ -220,7 +220,7 @@ public:
|
||||
*/
|
||||
void SetTimeStamp( time_t aNewTimeStamp );
|
||||
|
||||
EDA_RECT GetBoundingBox() const;
|
||||
const EDA_RECT GetBoundingBox() const; // Virtual
|
||||
|
||||
//-----<Fields>-----------------------------------------------------------
|
||||
|
||||
|
@ -259,7 +259,7 @@ void SCH_FIELD::SwapData( SCH_ITEM* aItem )
|
||||
}
|
||||
|
||||
|
||||
EDA_RECT SCH_FIELD::GetBoundingBox() const
|
||||
const EDA_RECT SCH_FIELD::GetBoundingBox() const
|
||||
{
|
||||
SCH_COMPONENT* parentComponent = (SCH_COMPONENT*) m_Parent;
|
||||
int linewidth = ( m_Thickness == 0 ) ? GetDefaultLineThickness() : m_Thickness;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user