Commit cd778c12 authored by Vovanium's avatar Vovanium
Browse files

Added two pin shapes:

* reverted clock ( --<| ) as it is commonly used for inverted clock in x-USSR
* nonlogic       ( ---X ) for non-logic pins of logic ICs (commonly used for power and timing RC pins).
parent 6d5ee766
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -308,6 +308,8 @@ set(BITMAP_SRCS
    pinshape_active_low_input.xpm
    pinshape_clock_active_low.xpm
    pinshape_active_low_output.xpm
    pinshape_clock_fall.xpm
    pinshape_nonlogic.xpm
    pintype_input.xpm
    pintype_output.xpm
    pintype_bidi.xpm
+23 −0
Original line number Diff line number Diff line
/* XPM */
const char *pinshape_clock_fall_xpm[] = {
/* columns rows colors chars-per-pixel */
"15 15 2 1",
". c Black",
"  c #FFFFFF",
/* pixels */
"               ",
"               ",
"    .          ",
"    .          ",
"    .          ",
"    ..         ",
"    . .        ",
"    .  ....... ",
"    . .        ",
"    ..         ",
"    .          ",
"    .          ",
"    .          ",
"               ",
"               "
};
+23 −0
Original line number Diff line number Diff line
/* XPM */
const char *pinshape_nonlogic_xpm[] = {
/* columns rows colors chars-per-pixel */
"15 15 2 1",
". c Black",
"  c #FFFFFF",
/* pixels */
"               ",
"               ",
"    .          ",
"    .          ",
" .  .  .       ",
"  . . .        ",
"   ...         ",
"    .......... ",
"   ...         ",
"  . . .        ",
" .  .  .       ",
"    .          ",
"    .          ",
"               ",
"               "
};
+48 −2
Original line number Diff line number Diff line
@@ -63,7 +63,9 @@ static const wxString pin_style_names[] =
    _( "Inverted clock" ),
    _( "Input low" ),
    _( "Clock low" ),
    _( "Output low" )
    _( "Output low" ),
    _( "Falling edge clock" ),
    _( "NonLogic" )
};

// bitmaps to show pins shapes in dialog editor
@@ -77,6 +79,8 @@ static const char ** s_icons_Pins_Shapes[] =
    pinshape_active_low_input_xpm,
    pinshape_clock_active_low_xpm,
    pinshape_active_low_output_xpm,
    pinshape_clock_fall_xpm,
    pinshape_nonlogic_xpm
};


@@ -91,7 +95,9 @@ static const int pin_style_codes[] =
    CLOCK | INVERT,
    LOWLEVEL_IN,
    LOWLEVEL_IN | CLOCK,
    LOWLEVEL_OUT
    LOWLEVEL_OUT,
    CLOCK_FALL,
    NONLOGIC
};


@@ -885,6 +891,26 @@ void LIB_PIN::DrawPinSymbol( WinEDA_DrawPanel* aPanel,
                  MapY1 * INVERT_PIN_RADIUS * 2 + y1 );
        GRLineTo( &aPanel->m_ClipBox, aDC, posX, posY, width, color );
    }
    else if( m_PinShape & CLOCK_FALL ) /* an alternative for Inverted Clock */
    {
        GRMoveTo( x1 + MapY1 * CLOCK_PIN_DIM,
                  y1 - MapX1 * CLOCK_PIN_DIM );
        GRLineTo( &aPanel->m_ClipBox,
                  aDC,
                  x1 + MapX1 * CLOCK_PIN_DIM,
                  y1 + MapY1 * CLOCK_PIN_DIM,
                  width,
                  color );
        GRLineTo( &aPanel->m_ClipBox,
                  aDC,
                  x1 - MapY1 * CLOCK_PIN_DIM,
                  y1 + MapX1 * CLOCK_PIN_DIM,
                  width,
                  color );
        GRMoveTo( MapX1 * CLOCK_PIN_DIM + x1,
                  MapY1 * CLOCK_PIN_DIM + y1 );
        GRLineTo( &aPanel->m_ClipBox, aDC, posX, posY, width, color );
    }
    else
    {
        GRMoveTo( x1, y1 );
@@ -974,6 +1000,26 @@ void LIB_PIN::DrawPinSymbol( WinEDA_DrawPanel* aPanel,
        }
    }

    else if( m_PinShape & NONLOGIC ) /* NonLogic pin symbol */
    {
        GRMoveTo( x1 - (MapX1 + MapY1) * NONLOGIC_PIN_DIM,
                  y1 - (MapY1 - MapX1) * NONLOGIC_PIN_DIM );
        GRLineTo( &aPanel->m_ClipBox,
                  aDC,
                  x1 + (MapX1 + MapY1) * NONLOGIC_PIN_DIM,
                  y1 + (MapY1 - MapX1) * NONLOGIC_PIN_DIM,
                  width,
                  color );
        GRMoveTo( x1 - (MapX1 - MapY1) * NONLOGIC_PIN_DIM,
                  y1 - (MapY1 + MapX1) * NONLOGIC_PIN_DIM );
        GRLineTo( &aPanel->m_ClipBox,
                  aDC,
                  x1 + (MapX1 - MapY1) * NONLOGIC_PIN_DIM,
                  y1 + (MapY1 + MapX1) * NONLOGIC_PIN_DIM,
                  width,
                  color );
    }

    /* Draw the pin end target (active end of the pin)
     * Draw but do not print the pin end target 1 pixel width
     */
+4 −1
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@

#define CLOCK_PIN_DIM       40  /* Dim of clock pin symbol. */
#define IEEE_SYMBOL_PIN_DIM 40  /* Dim of special pin symbol. */
#define NONLOGIC_PIN_DIM    30  /* Dim of nonlogic pin symbol (X). */

/**
 * The component library pin object electrical types used in ERC tests.
@@ -60,7 +61,9 @@ enum DrawPinShape {
    INVERT       = 1,
    CLOCK        = 2,
    LOWLEVEL_IN  = 4,
    LOWLEVEL_OUT = 8
    LOWLEVEL_OUT = 8,
    CLOCK_FALL   = 0x10, /* this is common form for inverted clock in Eastern Block */
    NONLOGIC     = 0x20,
};


Loading