Print bitmaps using BW setting
When selecting the "Print in B&W", all items on the schematic should be printed using black and white. This converts the embedded images greyscale before outputting to the printer
This commit is contained in:
parent
8de93ad8b4
commit
77f0799750
|
@ -238,10 +238,19 @@ void BITMAP_BASE::DrawBitmap( wxDC* aDC, const wxPoint& aPos )
|
|||
aDC->SetUserScale( scale * GetScalingFactor(), scale * GetScalingFactor() );
|
||||
aDC->SetLogicalOrigin( logicalOriginX / GetScalingFactor(),
|
||||
logicalOriginY / GetScalingFactor() );
|
||||
aDC->DrawBitmap( *m_bitmap,
|
||||
KiROUND( pos.x / GetScalingFactor() ),
|
||||
KiROUND( pos.y / GetScalingFactor() ),
|
||||
true );
|
||||
|
||||
if( GetGRForceBlackPenState() )
|
||||
{
|
||||
wxBitmap result( m_bitmap->ConvertToImage().ConvertToGreyscale() );
|
||||
aDC->DrawBitmap( result, KiROUND( pos.x / GetScalingFactor() ),
|
||||
KiROUND( pos.y / GetScalingFactor() ), true );
|
||||
}
|
||||
else
|
||||
{
|
||||
aDC->DrawBitmap( *m_bitmap, KiROUND( pos.x / GetScalingFactor() ),
|
||||
KiROUND( pos.y / GetScalingFactor() ), true );
|
||||
}
|
||||
|
||||
aDC->SetUserScale( scale, scale );
|
||||
aDC->SetLogicalOrigin( logicalOriginX, logicalOriginY );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue