Commit 1b5edd6d authored by Dick Hollenbeck's avatar Dick Hollenbeck
Browse files

KICAD_PLUG work

parent 6c2fcf7e
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -737,7 +737,7 @@ public:
    wxString m_Text;                    /* text! */
    wxPoint  m_Pos;                     /* XY position of anchor text. */
    wxSize   m_Size;                    /* XY size of text */
    bool     m_Mirror;                  /* Display Normal / mirror */
    bool     m_Mirror;                  ///< true iff mirrored
    int      m_Attributs;               /* flags (visible...) */
    bool     m_Italic;                  /* true to simulate (or use if exists)
                                         * an italic font... */
@@ -774,6 +774,9 @@ public:
    void SetItalic( bool isItalic ) { m_Italic = isItalic; }
    bool IsItalic() const { return m_Italic; }

    void SetMirrored( bool doMirror ) { m_Mirror = doMirror; }
    bool IsMirrored() const { return m_Mirror; }

    /**
     * Function SetSize
     * sets text size.
+16 −11
Original line number Diff line number Diff line
@@ -16,15 +16,20 @@ class BOARD;
class EDA_DRAW_PANEL;


/* Shapes for segments (graphic segments and tracks) ( .m_Shape member ) */
enum Track_Shapes {
    S_SEGMENT = 0,  /* usual segment : line with rounded ends */
    S_RECT,         /* segment with non rounded ends */
    S_ARC,          /* Arcs (with rounded ends) */
    S_CIRCLE,       /* ring */
    S_POLYGON,      /* polygon (not yet used for tracks, but could be in microwave apps) */
    S_CURVE,        /* Bezier Curve */
    S_LAST          /* last value for this list */
/**
 * Enum STROKE_T
 * is the set of shapes for segments (graphic segments and tracks) which are often
 * in the .m_Shape member
 */
enum STROKE_T
{
    S_SEGMENT = 0,  ///< usual segment : line with rounded ends
    S_RECT,         ///< segment with non rounded ends
    S_ARC,          ///< Arcs (with rounded ends)
    S_CIRCLE,       ///< ring
    S_POLYGON,      ///< polygon (not yet used for tracks, but could be in microwave apps)
    S_CURVE,        ///< Bezier Curve
    S_LAST          ///< last value for this list
};


@@ -165,9 +170,9 @@ public:

    /**
     * Function ShowShape
     * converts the enum Track_Shapes integer value to a wxString.
     * converts the enum STROKE_T integer value to a wxString.
     */
    static wxString ShowShape( Track_Shapes aShape );
    static wxString ShowShape( STROKE_T aShape );

    /**
     * Function Save
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@
#include "class_board.h"


wxString BOARD_ITEM::ShowShape( Track_Shapes aShape )
wxString BOARD_ITEM::ShowShape( STROKE_T aShape )
{
    switch( aShape )
    {
+1 −1
Original line number Diff line number Diff line
@@ -566,7 +566,7 @@ wxString DRAWSEGMENT::GetSelectMenuText() const
    wxString temp;

    text.Printf( _( "Pcb Graphic: %s length: %s on %s" ),
                 GetChars( ShowShape( (Track_Shapes)m_Shape ) ),
                 GetChars( ShowShape( (STROKE_T) m_Shape ) ),
                 GetChars( valeur_param( GetLength(), temp ) ),
                 GetChars( GetLayerName() ) );

+4 −4
Original line number Diff line number Diff line
@@ -30,10 +30,10 @@
/* class EDGE_MODULE */
/*********************/

EDGE_MODULE::EDGE_MODULE( MODULE* parent ) :
EDGE_MODULE::EDGE_MODULE( MODULE* parent, STROKE_T aShape ) :
    DRAWSEGMENT( parent, PCB_MODULE_EDGE_T )
{
    m_Shape = S_SEGMENT;
    m_Shape = aShape;
    m_Angle = 0;
    m_Width = 120;
}
@@ -422,7 +422,7 @@ wxString EDGE_MODULE::GetSelectMenuText() const
{
    wxString text;

    text << _( "Graphic" ) << wxT( " " ) << ShowShape( (Track_Shapes) m_Shape );
    text << _( "Graphic" ) << wxT( " " ) << ShowShape( (STROKE_T) m_Shape );
    text << wxT( " (" ) << GetLayerName() << wxT( ")" );
    text << _( " of " ) << ( (MODULE*) GetParent() )->GetReference();

@@ -441,7 +441,7 @@ wxString EDGE_MODULE::GetSelectMenuText() const
 */
void EDGE_MODULE::Show( int nestLevel, std::ostream& os )
{
    wxString shape = ShowShape( (Track_Shapes) m_Shape );
    wxString shape = ShowShape( (STROKE_T) m_Shape );

    // for now, make it look like XML:
    NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() <<
Loading