Stroke rectangles after filling so fill doesn't cover 1/2 of stroke.
This commit is contained in:
parent
48688b5074
commit
0063f2c12d
|
@ -809,20 +809,6 @@ void OPENGL_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEn
|
||||||
VECTOR2D diagonalPointA( aEndPoint.x, aStartPoint.y );
|
VECTOR2D diagonalPointA( aEndPoint.x, aStartPoint.y );
|
||||||
VECTOR2D diagonalPointB( aStartPoint.x, aEndPoint.y );
|
VECTOR2D diagonalPointB( aStartPoint.x, aEndPoint.y );
|
||||||
|
|
||||||
// Stroke the outline
|
|
||||||
if( isStrokeEnabled )
|
|
||||||
{
|
|
||||||
currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a );
|
|
||||||
|
|
||||||
std::deque<VECTOR2D> pointList;
|
|
||||||
pointList.push_back( aStartPoint );
|
|
||||||
pointList.push_back( diagonalPointA );
|
|
||||||
pointList.push_back( aEndPoint );
|
|
||||||
pointList.push_back( diagonalPointB );
|
|
||||||
pointList.push_back( aStartPoint );
|
|
||||||
DrawPolyline( pointList );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fill the rectangle
|
// Fill the rectangle
|
||||||
if( isFillEnabled )
|
if( isFillEnabled )
|
||||||
{
|
{
|
||||||
|
@ -838,6 +824,20 @@ void OPENGL_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEn
|
||||||
currentManager->Vertex( aEndPoint.x, aEndPoint.y, layerDepth );
|
currentManager->Vertex( aEndPoint.x, aEndPoint.y, layerDepth );
|
||||||
currentManager->Vertex( diagonalPointB.x, diagonalPointB.y, layerDepth );
|
currentManager->Vertex( diagonalPointB.x, diagonalPointB.y, layerDepth );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Stroke the outline
|
||||||
|
if( isStrokeEnabled )
|
||||||
|
{
|
||||||
|
currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a );
|
||||||
|
|
||||||
|
std::deque<VECTOR2D> pointList;
|
||||||
|
pointList.push_back( aStartPoint );
|
||||||
|
pointList.push_back( diagonalPointA );
|
||||||
|
pointList.push_back( aEndPoint );
|
||||||
|
pointList.push_back( diagonalPointB );
|
||||||
|
pointList.push_back( aStartPoint );
|
||||||
|
DrawPolyline( pointList );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -308,18 +308,16 @@ void SCH_PAINTER::draw( LIB_RECTANGLE *aRect, int aLayer )
|
||||||
if( !isUnitAndConversionShown( aRect ) )
|
if( !isUnitAndConversionShown( aRect ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
defaultColors(aRect);
|
defaultColors( aRect );
|
||||||
|
|
||||||
//m_gal->SetIsStroke( true );
|
|
||||||
m_gal->SetLineWidth( aRect->GetPenSize() );
|
|
||||||
m_gal->DrawRectangle( mapCoords( aRect->GetPosition() ), mapCoords( aRect->GetEnd() ) );
|
m_gal->DrawRectangle( mapCoords( aRect->GetPosition() ), mapCoords( aRect->GetEnd() ) );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SCH_PAINTER::triLine ( const VECTOR2D &a, const VECTOR2D &b, const VECTOR2D &c )
|
void SCH_PAINTER::triLine ( const VECTOR2D &a, const VECTOR2D &b, const VECTOR2D &c )
|
||||||
{
|
{
|
||||||
m_gal->DrawLine ( a, b );
|
m_gal->DrawLine ( a, b );
|
||||||
m_gal->DrawLine ( b, c );
|
m_gal->DrawLine ( b, c );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue