Set PPI properly in schematic bitmaps, too
This commit is contained in:
parent
5ccf205788
commit
e8a88411ea
|
@ -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
|
EDA_ITEM* SCH_BITMAP::Clone() const
|
||||||
{
|
{
|
||||||
return new SCH_BITMAP( *this );
|
return new SCH_BITMAP( *this );
|
||||||
|
|
|
@ -57,6 +57,8 @@ public:
|
||||||
return m_image;
|
return m_image;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetImage( wxImage* aImage );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the image "zoom" value.
|
* @return the image "zoom" value.
|
||||||
* scale = 1.0 = original size of bitmap.
|
* scale = 1.0 = original size of bitmap.
|
||||||
|
|
|
@ -2967,7 +2967,7 @@ SCH_BITMAP* SCH_SEXPR_PARSER::parseImage()
|
||||||
wxImage* image = new wxImage();
|
wxImage* image = new wxImage();
|
||||||
wxMemoryInputStream istream( stream );
|
wxMemoryInputStream istream( stream );
|
||||||
image->LoadFile( istream, wxBITMAP_TYPE_PNG );
|
image->LoadFile( istream, wxBITMAP_TYPE_PNG );
|
||||||
bitmap->GetImage()->SetImage( image );
|
bitmap->SetImage( image );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue