Use actual custom fill color for painting

This commit is contained in:
Jonathan Haas 2021-12-15 11:17:04 +01:00 committed by Jeff Young
parent 80e7b6eb1f
commit 45d7f68f38
1 changed files with 9 additions and 3 deletions

View File

@ -525,11 +525,17 @@ bool SCH_PAINTER::setDeviceColors( const LIB_ITEM* aItem, int aLayer )
return false;
case LAYER_DEVICE_BACKGROUND:
if( shape && shape->GetFillMode() == FILL_T::FILLED_WITH_BG_BODYCOLOR )
if( shape )
{
COLOR4D fillColor = getRenderColor( aItem, LAYER_DEVICE_BACKGROUND, false );
COLOR4D fillColor;
if( shape->GetFillMode() == FILL_T::FILLED_WITH_BG_BODYCOLOR )
fillColor = getRenderColor( aItem, LAYER_DEVICE_BACKGROUND, false );
else if( shape->GetFillMode() == FILL_T::FILLED_WITH_COLOR )
fillColor = shape->GetFillColor();
else
return false;
m_gal->SetIsFill( shape->GetFillMode() == FILL_T::FILLED_WITH_BG_BODYCOLOR );
m_gal->SetIsFill( true );
m_gal->SetFillColor( fillColor );
m_gal->SetIsStroke( false );
return true;