add wxSize overloads to wxBitmap ctors and to wxBitmap::Create

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2009-03-14 13:57:51 +00:00
parent 72a9034bd4
commit 732d8c74f8
22 changed files with 129 additions and 119 deletions

View File

@@ -608,13 +608,13 @@ PicHandle wxBitmapRefData::GetPictHandle()
err = GraphicsExportDoExport(exporter, NULL);
CGImageRelease( imageRef );
size_t handleSize = GetHandleSize( (Handle) m_pictHandle );
// the 512 bytes header is only needed for pict files, but not in memory
if ( handleSize >= 512 )
{
memmove( *m_pictHandle , (char*)(*m_pictHandle)+512, handleSize - 512 );
SetHandleSize( (Handle) m_pictHandle, handleSize - 512 );
}
size_t handleSize = GetHandleSize( (Handle) m_pictHandle );
// the 512 bytes header is only needed for pict files, but not in memory
if ( handleSize >= 512 )
{
memmove( *m_pictHandle , (char*)(*m_pictHandle)+512, handleSize - 512 );
SetHandleSize( (Handle) m_pictHandle, handleSize - 512 );
}
}
CloseComponent( exporter );
}
@@ -785,6 +785,12 @@ wxBitmapRefData::~wxBitmapRefData()
Free() ;
}
// ----------------------------------------------------------------------------
// wxBitmap
// ----------------------------------------------------------------------------
bool wxBitmap::CopyFromIcon(const wxIcon& icon)
{
bool created = false ;
@@ -890,14 +896,6 @@ bool wxBitmap::CopyFromIcon(const wxIcon& icon)
return true;
}
wxBitmap::wxBitmap()
{
}
wxBitmap::~wxBitmap()
{
}
wxBitmap::wxBitmap(const char bits[], int the_width, int the_height, int no_bits)
{
wxBitmapRefData* bitmapRefData;
@@ -952,11 +950,6 @@ wxBitmap::wxBitmap(const char bits[], int the_width, int the_height, int no_bits
} /* bitmapRefData->IsOk() */
}
wxBitmap::wxBitmap(int w, int h, int d)
{
(void)Create(w, h, d);
}
wxBitmap::wxBitmap(const void* data, wxBitmapType type, int width, int height, int depth)
{
(void) Create(data, type, width, height, depth);