X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5c33522fca7cddc441a316f5b9fb50d7685435ba..b895ab50e2804f1d281799254d7840d57592bdef:/src/osx/core/bitmap.cpp diff --git a/src/osx/core/bitmap.cpp b/src/osx/core/bitmap.cpp index 563eaf515a..71b8bda63a 100644 --- a/src/osx/core/bitmap.cpp +++ b/src/osx/core/bitmap.cpp @@ -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); @@ -1384,7 +1377,7 @@ int wxBitmap::GetDepth() const wxMask *wxBitmap::GetMask() const { - wxCHECK_MSG( Ok(), (wxMask *) NULL, wxT("invalid bitmap") ); + wxCHECK_MSG( Ok(), NULL, wxT("invalid bitmap") ); return M_BITMAPDATA->m_bitmapMask; }