Add SCH_BITMAP::ReadImageFile( wxMemoryBuffer& ).
This commit is contained in:
parent
10c495952e
commit
69261df022
|
@ -92,6 +92,19 @@ bool SCH_BITMAP::ReadImageFile( const wxString& aFullFilename )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool SCH_BITMAP::ReadImageFile( wxMemoryBuffer& aBuffer )
|
||||||
|
{
|
||||||
|
if( m_bitmapBase->ReadImageFile( aBuffer ) )
|
||||||
|
{
|
||||||
|
m_bitmapBase->SetPixelSizeIu( (float) pcbIUScale.MilsToIU( 1000 )
|
||||||
|
/ m_bitmapBase->GetPPI() );
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
EDA_ITEM* SCH_BITMAP::Clone() const
|
EDA_ITEM* SCH_BITMAP::Clone() const
|
||||||
{
|
{
|
||||||
return new SCH_BITMAP( *this );
|
return new SCH_BITMAP( *this );
|
||||||
|
|
|
@ -108,6 +108,16 @@ public:
|
||||||
*/
|
*/
|
||||||
bool ReadImageFile( const wxString& aFullFilename );
|
bool ReadImageFile( const wxString& aFullFilename );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read and store an image file.
|
||||||
|
*
|
||||||
|
* Initialize the bitmap used to draw this item format.
|
||||||
|
*
|
||||||
|
* @param aBuf is the memory buffer containing the image file to read.
|
||||||
|
* @return true if success reading else false.
|
||||||
|
*/
|
||||||
|
bool ReadImageFile( wxMemoryBuffer& aBuf );
|
||||||
|
|
||||||
void Move( const VECTOR2I& aMoveVector ) override
|
void Move( const VECTOR2I& aMoveVector ) override
|
||||||
{
|
{
|
||||||
m_pos += aMoveVector;
|
m_pos += aMoveVector;
|
||||||
|
|
Loading…
Reference in New Issue