Set PPI properly in schematic bitmaps, too
(cherry picked from commit e8a88411ea
)
This commit is contained in:
parent
76ccb8c31f
commit
08c6d9ce96
|
@ -92,6 +92,13 @@ bool SCH_BITMAP::ReadImageFile( const wxString& aFullFilename )
|
|||
}
|
||||
|
||||
|
||||
void SCH_BITMAP::SetImage( wxImage* aImage )
|
||||
{
|
||||
m_image->SetImage( aImage );
|
||||
m_image->SetPixelSizeIu( 254000.0 / m_image->GetPPI() );
|
||||
}
|
||||
|
||||
|
||||
EDA_ITEM* SCH_BITMAP::Clone() const
|
||||
{
|
||||
return new SCH_BITMAP( *this );
|
||||
|
|
|
@ -57,6 +57,8 @@ public:
|
|||
return m_image;
|
||||
}
|
||||
|
||||
void SetImage( wxImage* aImage );
|
||||
|
||||
/**
|
||||
* @return the image "zoom" value.
|
||||
* scale = 1.0 = original size of bitmap.
|
||||
|
|
|
@ -2967,7 +2967,7 @@ SCH_BITMAP* SCH_SEXPR_PARSER::parseImage()
|
|||
wxImage* image = new wxImage();
|
||||
wxMemoryInputStream istream( stream );
|
||||
image->LoadFile( istream, wxBITMAP_TYPE_PNG );
|
||||
bitmap->GetImage()->SetImage( image );
|
||||
bitmap->SetImage( image );
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue