EEschema: fix wrong pin rendering for pin style PINSHAPE_OUTPUT_LOW
Fixes: lp:1797750 https://bugs.launchpad.net/kicad/+bug/1797750
This commit is contained in:
parent
0bd0558833
commit
fff739631c
|
@ -557,12 +557,13 @@ void SCH_PAINTER::draw( LIB_PIN *aPin, int aLayer, bool isDangling, bool isMovin
|
||||||
m_gal->SetFontItalic( false );
|
m_gal->SetFontItalic( false );
|
||||||
|
|
||||||
const int radius = ExternalPinDecoSize( *aPin );
|
const int radius = ExternalPinDecoSize( *aPin );
|
||||||
|
const int diam = radius*2;
|
||||||
const int clock_size = InternalPinDecoSize( *aPin );
|
const int clock_size = InternalPinDecoSize( *aPin );
|
||||||
|
|
||||||
if( shape == PINSHAPE_INVERTED )
|
if( shape == PINSHAPE_INVERTED )
|
||||||
{
|
{
|
||||||
m_gal->DrawCircle( p0 + dir * radius, radius );
|
m_gal->DrawCircle( p0 + dir * radius, radius );
|
||||||
m_gal->DrawLine( p0 + dir * ( 2 * radius ), pos );
|
m_gal->DrawLine( p0 + dir * ( diam ), pos );
|
||||||
}
|
}
|
||||||
else if( shape == PINSHAPE_FALLING_EDGE_CLOCK )
|
else if( shape == PINSHAPE_FALLING_EDGE_CLOCK )
|
||||||
{
|
{
|
||||||
|
@ -599,24 +600,24 @@ void SCH_PAINTER::draw( LIB_PIN *aPin, int aLayer, bool isDangling, bool isMovin
|
||||||
{
|
{
|
||||||
if(!dir.y)
|
if(!dir.y)
|
||||||
{
|
{
|
||||||
triLine( p0 + VECTOR2D(dir.x, 0) * radius * 2,
|
triLine( p0 + VECTOR2D(dir.x, 0) * diam,
|
||||||
p0 + VECTOR2D(dir.x, -1) * radius * 2,
|
p0 + VECTOR2D(dir.x, -1) * diam,
|
||||||
p0 );
|
p0 );
|
||||||
}
|
}
|
||||||
else /* MapX1 = 0 */
|
else /* MapX1 = 0 */
|
||||||
{
|
{
|
||||||
triLine( p0 + VECTOR2D( 0, dir.y) * radius * 2,
|
triLine( p0 + VECTOR2D( 0, dir.y) * diam,
|
||||||
p0 + VECTOR2D(-1, dir.y) * radius * 2,
|
p0 + VECTOR2D(-1, dir.y) * diam,
|
||||||
p0 );
|
p0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( shape == PINSHAPE_OUTPUT_LOW ) /* IEEE symbol "Active Low Output" */
|
if( shape == PINSHAPE_OUTPUT_LOW ) /* IEEE symbol "Active Low Output" */
|
||||||
{
|
{
|
||||||
if( !dir.y )
|
if( !dir.y ) // Horizontal pin
|
||||||
m_gal->DrawLine( p0 - VECTOR2D( 0, radius ), p0 + VECTOR2D( dir.x, 1 ) * radius * 2 );
|
m_gal->DrawLine( p0 - VECTOR2D( 0, diam ), p0 + VECTOR2D( dir.x, 0 ) * diam );
|
||||||
else
|
else // Vertical pin
|
||||||
m_gal->DrawLine( p0 - VECTOR2D( radius, 0 ), p0 + VECTOR2D( 0, dir.y ) * radius * 2 );
|
m_gal->DrawLine( p0 - VECTOR2D( diam, 0 ), p0 + VECTOR2D( 0, dir.y ) * diam );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( shape == PINSHAPE_NONLOGIC ) /* NonLogic pin symbol */
|
if( shape == PINSHAPE_NONLOGIC ) /* NonLogic pin symbol */
|
||||||
|
|
Loading…
Reference in New Issue