Don't render fills in black & white mode.

Fixes https://gitlab.com/kicad/code/kicad/issues/11303
This commit is contained in:
Jeff Young 2022-04-01 21:23:38 +01:00
parent 737d65fd36
commit a12f77b8f6
2 changed files with 4 additions and 2 deletions

View File

@ -194,6 +194,7 @@ void LIB_TEXTBOX::print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffs
return; return;
bool forceNoFill = static_cast<bool>( aData ); bool forceNoFill = static_cast<bool>( aData );
bool blackAndWhiteMode = GetGRForceBlackPenState();
int penWidth = GetEffectivePenWidth( aSettings ); int penWidth = GetEffectivePenWidth( aSettings );
wxDC* DC = aSettings->GetPrintDC(); wxDC* DC = aSettings->GetPrintDC();
@ -201,7 +202,7 @@ void LIB_TEXTBOX::print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffs
VECTOR2I pt2 = aTransform.TransformCoordinate( m_end ) + aOffset; VECTOR2I pt2 = aTransform.TransformCoordinate( m_end ) + aOffset;
COLOR4D color = aSettings->GetLayerColor( LAYER_DEVICE ); COLOR4D color = aSettings->GetLayerColor( LAYER_DEVICE );
if( !forceNoFill && GetFillMode() == FILL_T::FILLED_WITH_COLOR ) if( !forceNoFill && GetFillMode() == FILL_T::FILLED_WITH_COLOR && !blackAndWhiteMode )
GRFilledRect( DC, pt1, pt2, penWidth, color, GetFillColor() ); GRFilledRect( DC, pt1, pt2, penWidth, color, GetFillColor() );
if( GetStroke().GetColor() != COLOR4D::UNSPECIFIED ) if( GetStroke().GetColor() != COLOR4D::UNSPECIFIED )

View File

@ -193,11 +193,12 @@ void SCH_TEXTBOX::Print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffs
{ {
wxDC* DC = aSettings->GetPrintDC(); wxDC* DC = aSettings->GetPrintDC();
int penWidth = GetPenWidth(); int penWidth = GetPenWidth();
bool blackAndWhiteMode = GetGRForceBlackPenState();
VECTOR2I pt1 = GetStart(); VECTOR2I pt1 = GetStart();
VECTOR2I pt2 = GetEnd(); VECTOR2I pt2 = GetEnd();
COLOR4D color; COLOR4D color;
if( GetFillMode() == FILL_T::FILLED_WITH_COLOR ) if( GetFillMode() == FILL_T::FILLED_WITH_COLOR && !blackAndWhiteMode )
GRFilledRect( DC, pt1, pt2, 0, GetFillColor(), GetFillColor() ); GRFilledRect( DC, pt1, pt2, 0, GetFillColor(), GetFillColor() );
if( penWidth > 0 ) if( penWidth > 0 )