Honour dimming when printing fields.

Fixes https://gitlab.com/kicad/code/kicad/issues/12708
This commit is contained in:
Jeff Young 2022-10-21 22:55:01 +01:00
parent 0de540594a
commit 34742b386d
1 changed files with 11 additions and 0 deletions

View File

@ -336,6 +336,14 @@ void SCH_FIELD::Print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffset
if( ( !IsVisible() && !IsForceVisible() ) || IsVoid() )
return;
COLOR4D bg = aSettings->GetBackgroundColor();
if( bg == COLOR4D::UNSPECIFIED || GetGRForceBlackPenState() )
bg = COLOR4D::WHITE;
if( IsForceVisible() )
bg = aSettings->GetLayerColor( LAYER_HIDDEN );
if( !blackAndWhiteMode && GetTextColor() != COLOR4D::UNSPECIFIED )
color = GetTextColor();
@ -353,6 +361,9 @@ void SCH_FIELD::Print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffset
else
orient = ANGLE_HORIZONTAL;
}
if( parentSymbol && parentSymbol->GetDNP() )
color = color.Mix( bg, 0.5f );
}
/*