Commit 99408024 authored by charras's avatar charras
Browse files

Code cleaning. Some bugs fixed. Added contributors to list in About Kicad.

parent 5813a12e
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -9,7 +9,10 @@ email address.
================================================================================
================================================================================
++All:
++All:
    Print functions and display zoom level modified to use the new zoom implementation
    Print functions and display zoom level modified to use the new zoom implementation
    Comments adde in some functions.
    Comments added in some functions.
    Code cleaning
    some bugs fixed.
    Added contributors to list in about Kicad.


2009-Jan-29 UPDATE Wayne Stambaugh <stambaughw@verizon.net>
2009-Jan-29 UPDATE Wayne Stambaugh <stambaughw@verizon.net>
================================================================================
================================================================================
+3 −1
Original line number Original line Diff line number Diff line
@@ -110,9 +110,11 @@ InitKiCadAbout( wxAboutDialogInfo& info )


	/* Add developers */
	/* Add developers */
	info.AddDeveloper( wxT( "Jean-Pierre Charras <jean-pierre.charras@inpg.fr>" ) );
	info.AddDeveloper( wxT( "Jean-Pierre Charras <jean-pierre.charras@inpg.fr>" ) );
	info.AddDeveloper( SetMsg( wxT( "Jerry Jacobs <jerkejacobs@gmail.com>" ) ) );
	info.AddDeveloper( SetMsg( wxT( "Dick Hollenbeck <dick@softplc.com>" ) ) );
	info.AddDeveloper( SetMsg( wxT( "Dick Hollenbeck <dick@softplc.com>" ) ) );
	info.AddDeveloper( SetMsg( wxT( "Jerry Jacobs <jerkejacobs@gmail.com>" ) ) );
	info.AddDeveloper( SetMsg( wxT( "Jonas Diemer <diemer@gmx.de>" ) ) );
	info.AddDeveloper( SetMsg( wxT( "KBool Library <http://boolean.klaasholwerda.nl/bool.html>" ) ) );
	info.AddDeveloper( SetMsg( wxT( "KBool Library <http://boolean.klaasholwerda.nl/bool.html>" ) ) );
	info.AddDeveloper( SetMsg( wxT( "Rok Markovic <rok@kanardia.eu>" ) ) );
	info.AddDeveloper( SetMsg( wxT( "Vesa Solonen <vesa.solonen@hut.fi>" ) ) );
	info.AddDeveloper( SetMsg( wxT( "Vesa Solonen <vesa.solonen@hut.fi>" ) ) );
	info.AddDeveloper( SetMsg( wxT( "Wayne Stambaugh <stambaughw@verizon.net>" ) ) );
	info.AddDeveloper( SetMsg( wxT( "Wayne Stambaugh <stambaughw@verizon.net>" ) ) );


+4 −5
Original line number Original line Diff line number Diff line
@@ -209,18 +209,17 @@ bool EDA_TextStruct::HitTest( const wxPoint& posref )
 */
 */
{
{
    int dx, dy;
    int dx, dy;
    int spot_cX, spot_cY;
    wxPoint location;


    dx = (int) (( Pitch() * GetLength() ) / 2);
    dx = (int) (( Pitch() * GetLength() ) / 2);
    dy = m_Size.y / 2;
    dy = m_Size.y / 2;


    /* Is the ref point inside the text area ?  */
    /* Is the ref point inside the text area ?  */
    spot_cX = posref.x - m_Pos.x;
    location = posref - m_Pos;
    spot_cY = posref.y - m_Pos.y;


    RotatePoint( &spot_cX, &spot_cY, -m_Orient );
    RotatePoint( &location, -m_Orient );


    if( ( abs( spot_cX ) <= abs( dx ) ) && ( abs( spot_cY ) <= abs( dy ) ) )
    if( ( abs( location.x ) <= abs( dx ) ) && ( abs( location.y ) <= abs( dy ) ) )
        return true;
        return true;


    return false;
    return false;
+12 −0
Original line number Original line Diff line number Diff line
@@ -374,6 +374,18 @@ EDA_Rect DrawSheetStruct::GetBoundingBox()
    return box;
    return box;
}
}


/************************************************/
bool DrawSheetStruct::HitTest( const wxPoint& aPosRef )
/************************************************/
/** Function HitTest
 * @return true if the point aPosRef is within item area
 * @param aPosRef = a wxPoint to test
 */
{
    EDA_Rect rect = GetBoundingBox();
    return rect.Inside( aPosRef );
}



/************************************/
/************************************/
int DrawSheetStruct::ComponentCount()
int DrawSheetStruct::ComponentCount()
+7 −0
Original line number Original line Diff line number Diff line
@@ -129,10 +129,17 @@ public:
    void             Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset,
    void             Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset,
                           int aDrawMode, int aColor = -1 );
                           int aDrawMode, int aColor = -1 );


    /** Function HitTest
     * @return true if the point aPosRef is within item area
     * @param aPosRef = a wxPoint to test
     */
    bool HitTest( const wxPoint& aPosRef );

    /** Function GetBoundingBox
    /** Function GetBoundingBox
     *  @return an EDA_Rect giving the bouding box of the sheet
     *  @return an EDA_Rect giving the bouding box of the sheet
     */
     */
    EDA_Rect         GetBoundingBox();
    EDA_Rect         GetBoundingBox();

    void             SwapData( DrawSheetStruct* copyitem );
    void             SwapData( DrawSheetStruct* copyitem );


    /** Function ComponentCount
    /** Function ComponentCount
Loading