Commit cd778c12 authored by Vovanium's avatar Vovanium

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
......@@ -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
......
/* XPM */
const char *pinshape_clock_fall_xpm[] = {
/* columns rows colors chars-per-pixel */
"15 15 2 1",
". c Black",
" c #FFFFFF",
/* pixels */
" ",
" ",
" . ",
" . ",
" . ",
" .. ",
" . . ",
" . ....... ",
" . . ",
" .. ",
" . ",
" . ",
" . ",
" ",
" "
};
/* XPM */
const char *pinshape_nonlogic_xpm[] = {
/* columns rows colors chars-per-pixel */
"15 15 2 1",
". c Black",
" c #FFFFFF",
/* pixels */
" ",
" ",
" . ",
" . ",
" . . . ",
" . . . ",
" ... ",
" .......... ",
" ... ",
" . . . ",
" . . . ",
" . ",
" . ",
" ",
" "
};
......@@ -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
*/
......
......@@ -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,
};
......
......@@ -294,8 +294,10 @@ extern const char* pinorient_right_xpm[];
extern const char* pinorient_left_xpm[];
extern const char* pinorient_up_xpm[];
extern const char* pinorient_down_xpm[];
extern const char* pinshape_nonlogic_xpm[];
extern const char* pinshape_normal_xpm[];
extern const char* pinshape_invert_xpm[];
extern const char* pinshape_clock_fall_xpm[];
extern const char* pinshape_clock_normal_xpm[];
extern const char* pinshape_clock_invert_xpm[];
extern const char* pinshape_active_low_input_xpm[];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment