Dim DNP textbox borders.
Fixes https://gitlab.com/kicad/code/kicad/issues/12709
This commit is contained in:
parent
bad410948d
commit
c9ce8da10a
|
@ -726,8 +726,8 @@ void LIB_SYMBOL::Plot( PLOTTER *aPlotter, int aUnit, int aConvert, bool aBackgro
|
|||
if( item.IsPrivate() )
|
||||
continue;
|
||||
|
||||
// Lib Fields are not plotted here, because this plot function
|
||||
// is used to plot schematic items, which have they own fields
|
||||
// LIB_FIELDs are not plotted here, because this plot function is used to plot schematic
|
||||
// items which have their own SCH_FIELDs
|
||||
if( item.Type() == LIB_FIELD_T )
|
||||
continue;
|
||||
|
||||
|
|
|
@ -384,6 +384,11 @@ void LIB_TEXTBOX::Plot( PLOTTER* aPlotter, bool aBackground, const VECTOR2I& aOf
|
|||
|
||||
VECTOR2I start = aTransform.TransformCoordinate( m_start ) + aOffset;
|
||||
VECTOR2I end = aTransform.TransformCoordinate( m_end ) + aOffset;
|
||||
COLOR4D bg = aPlotter->RenderSettings()->GetBackgroundColor();
|
||||
|
||||
if( bg == COLOR4D::UNSPECIFIED || !aPlotter->GetColorMode() )
|
||||
bg = COLOR4D::WHITE;
|
||||
|
||||
int penWidth = GetEffectivePenWidth( aPlotter->RenderSettings() );
|
||||
COLOR4D color = GetStroke().GetColor();
|
||||
PLOT_DASH_TYPE lineStyle = GetStroke().GetPlotStyle();
|
||||
|
@ -396,6 +401,9 @@ void LIB_TEXTBOX::Plot( PLOTTER* aPlotter, bool aBackground, const VECTOR2I& aOf
|
|||
if( lineStyle == PLOT_DASH_TYPE::DEFAULT )
|
||||
lineStyle = PLOT_DASH_TYPE::DASH;
|
||||
|
||||
if( aDimmed )
|
||||
color = color.Mix( bg, 0.5f );
|
||||
|
||||
aPlotter->SetColor( color );
|
||||
aPlotter->SetDash( penWidth, lineStyle );
|
||||
aPlotter->Rect( start, end, FILL_T::NO_FILL, penWidth );
|
||||
|
@ -409,11 +417,6 @@ void LIB_TEXTBOX::Plot( PLOTTER* aPlotter, bool aBackground, const VECTOR2I& aOf
|
|||
if( !aPlotter->GetColorMode() || color == COLOR4D::UNSPECIFIED )
|
||||
color = aPlotter->RenderSettings()->GetLayerColor( LAYER_DEVICE );
|
||||
|
||||
COLOR4D bg = aPlotter->RenderSettings()->GetBackgroundColor();
|
||||
|
||||
if( bg == COLOR4D::UNSPECIFIED || !aPlotter->GetColorMode() )
|
||||
bg = COLOR4D::WHITE;
|
||||
|
||||
if( aDimmed )
|
||||
color = color.Mix( bg, 0.5f );
|
||||
|
||||
|
|
Loading…
Reference in New Issue