Eeschema: fix worksheet and background color for printing
Fixes: lp:1820611
* https://bugs.launchpad.net/kicad/+bug/1820611
(cherry picked from commit 720b26d11e
)
This commit is contained in:
parent
b40289c1bd
commit
d2a2dea9c4
|
@ -1223,7 +1223,7 @@ void DrawPageLayout( wxDC* aDC,
|
|||
|
||||
void EDA_DRAW_FRAME::DrawWorkSheet( wxDC* aDC, BASE_SCREEN* aScreen, int aLineWidth,
|
||||
double aScalar, const wxString &aFilename,
|
||||
const wxString &aSheetLayer )
|
||||
const wxString &aSheetLayer, COLOR4D aColor )
|
||||
{
|
||||
if( !m_showBorderAndTitleBlock )
|
||||
return;
|
||||
|
@ -1240,7 +1240,7 @@ void EDA_DRAW_FRAME::DrawWorkSheet( wxDC* aDC, BASE_SCREEN* aScreen, int aLineWi
|
|||
}
|
||||
|
||||
TITLE_BLOCK t_block = GetTitleBlock();
|
||||
COLOR4D color = COLOR4D( RED );
|
||||
COLOR4D color = ( aColor != COLOR4D::UNSPECIFIED ) ? aColor : COLOR4D( RED );
|
||||
|
||||
wxPoint origin = aDC->GetDeviceOrigin();
|
||||
|
||||
|
|
|
@ -2055,7 +2055,7 @@ void DrawPageLayout( wxDC* aDC,
|
|||
|
||||
void EDA_DRAW_FRAME::DrawWorkSheet( wxDC* aDC, BASE_SCREEN* aScreen, int aLineWidth,
|
||||
double aScalar, const wxString &aFilename,
|
||||
const wxString &aSheetLayer )
|
||||
const wxString &aSheetLayer, COLOR4D aColor )
|
||||
{
|
||||
if( !m_showBorderAndTitleBlock )
|
||||
return;
|
||||
|
@ -2073,7 +2073,7 @@ void EDA_DRAW_FRAME::DrawWorkSheet( wxDC* aDC, BASE_SCREEN* aScreen, int aLineWi
|
|||
}
|
||||
|
||||
TITLE_BLOCK t_block = GetTitleBlock();
|
||||
COLOR4D color = COLOR4D( RED );
|
||||
COLOR4D color = ( aColor != COLOR4D::UNSPECIFIED ) ? aColor : COLOR4D( RED );
|
||||
|
||||
wxPoint origin = aDC->GetDeviceOrigin();
|
||||
|
||||
|
|
|
@ -431,18 +431,25 @@ void SCH_PRINTOUT::DrawPage( SCH_SCREEN* aScreen )
|
|||
GRSetDrawMode( dc, GR_DEFAULT_DRAWMODE );
|
||||
GRResetPenAndBrush( dc );
|
||||
|
||||
if( m_parent->GetPrintMonochrome() )
|
||||
GRForceBlackPen( true );
|
||||
|
||||
aScreen->m_IsPrinting = true;
|
||||
|
||||
COLOR4D bgColor = m_parent->GetDrawBgColor();
|
||||
m_parent->SetDrawBgColor( COLOR4D::WHITE );
|
||||
|
||||
GRSetDrawMode( dc, GR_COPY );
|
||||
GRSFilledRect( nullptr, dc, fitRect.GetX(), fitRect.GetY(),
|
||||
fitRect.GetRight(), fitRect.GetBottom(),
|
||||
0, COLOR4D::WHITE, COLOR4D::WHITE );
|
||||
|
||||
if( m_parent->GetPrintMonochrome() )
|
||||
GRForceBlackPen( true );
|
||||
|
||||
aScreen->Draw( panel, dc );
|
||||
|
||||
if( printReference )
|
||||
m_parent->DrawWorkSheet( dc, aScreen, GetDefaultLineThickness(),
|
||||
IU_PER_MILS, aScreen->GetFileName() );
|
||||
IU_PER_MILS, aScreen->GetFileName(), wxEmptyString,
|
||||
GetLayerColor( ( SCH_LAYER_ID )LAYER_WORKSHEET ) );
|
||||
|
||||
m_parent->SetDrawBgColor( bgColor );
|
||||
aScreen->m_IsPrinting = false;
|
||||
|
|
|
@ -745,7 +745,8 @@ public:
|
|||
*/
|
||||
void DrawWorkSheet( wxDC* aDC, BASE_SCREEN* aScreen, int aLineWidth,
|
||||
double aScale, const wxString &aFilename,
|
||||
const wxString &aSheetLayer = wxEmptyString );
|
||||
const wxString &aSheetLayer = wxEmptyString,
|
||||
COLOR4D aColor = COLOR4D::UNSPECIFIED );
|
||||
|
||||
void DisplayToolMsg( const wxString& msg );
|
||||
wxString GetToolMsg() { return m_toolMsg; }
|
||||
|
|
Loading…
Reference in New Issue