]> git.saurik.com Git - wxWidgets.git/commitdiff
add wxSize overloads to wxBitmap ctors and to wxBitmap::Create
authorFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Sat, 14 Mar 2009 13:57:51 +0000 (13:57 +0000)
committerFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Sat, 14 Mar 2009 13:57:51 +0000 (13:57 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

22 files changed:
include/wx/bitmap.h
include/wx/cocoa/bitmap.h
include/wx/dfb/bitmap.h
include/wx/gtk/bitmap.h
include/wx/gtk1/bitmap.h
include/wx/mgl/bitmap.h
include/wx/msw/bitmap.h
include/wx/os2/bitmap.h
include/wx/osx/bitmap.h
include/wx/palmos/bitmap.h
include/wx/x11/bitmap.h
interface/wx/bitmap.h
src/cocoa/bitmap.mm
src/dfb/bitmap.cpp
src/gtk/bitmap.cpp
src/gtk1/bitmap.cpp
src/mgl/bitmap.cpp
src/msw/bitmap.cpp
src/os2/bitmap.cpp
src/osx/core/bitmap.cpp
src/palmos/bitmap.cpp
src/x11/bitmap.cpp

index 22debebe20c75b86f18621854651aaef077bf742..e6e837d94830272ff3e33fdb48ccc0b0234c3027 100644 (file)
@@ -148,6 +148,7 @@ public:
     wxBitmap(const wxBitmap& bmp);
     wxBitmap(const char bits[], int width, int height, int depth = 1);
     wxBitmap(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH);
+    wxBitmap(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH);
     wxBitmap(const char* const* bits);
     wxBitmap(const wxString &filename, wxBitmapType type = wxBITMAP_TYPE_XPM);
     wxBitmap(const wxImage& image, int depth = wxBITMAP_SCREEN_DEPTH);
@@ -156,6 +157,7 @@ public:
     */
 
     virtual bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH) = 0;
+    virtual bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH) = 0;
 
     virtual int GetHeight() const = 0;
     virtual int GetWidth() const = 0;
index e1f3e681c496517a4063ee9328849f24ea7c670d..94d7eb3140801c310f1fde5a36cc6c3313616672 100644 (file)
@@ -59,9 +59,11 @@ protected:
     WX_NSBitmapImageRep m_cocoaNSBitmapImageRep;
 };
 
+
 // ========================================================================
 // wxBitmap
 // ========================================================================
+
 class WXDLLIMPEXP_CORE wxBitmap: public wxGDIObject
 {
 // ------------------------------------------------------------------------
@@ -83,10 +85,13 @@ public:
     // Constructor for generalised creation from data
     wxBitmap(const void* data, wxBitmapType type, int width, int height, int depth = 1);
     // If depth is omitted, will create a bitmap compatible with the display
-    wxBitmap(int width, int height, int depth = -1);
+    wxBitmap(int width, int height, int depth = -1)
+        { (void)Create(width, height, depth); }
+    wxBitmap(const wxSize& sz, int depth = -1)
+        { (void)Create(sz, depth); }
     // Convert from wxImage:
     wxBitmap(const wxImage& image, int depth = -1)
-    {   CreateFromImage(image, depth); }
+        { CreateFromImage(image, depth); }
     // Convert from wxIcon
     wxBitmap(const wxIcon& icon) { CopyFromIcon(icon); }
 
@@ -100,7 +105,10 @@ public:
     // Initialize from wxImage
     bool CreateFromImage(const wxImage& image, int depth=-1);
 
-    virtual bool Create(int width, int height, int depth = -1);
+    virtual bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH);
+    virtual bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH)
+        { return Create(sz.GetWidth(), sz.GetHeight(), depth); }
+
     bool Create(NSImage* cocoaNSImage);
     bool Create(NSBitmapImageRep* cocoaNSBitmapImageRep);
     virtual bool Create(const void* data, wxBitmapType type, int width, int height, int depth = 1);
index 246582a8096ddeeae92d899fcf9116541a43f179..e7335658e5190bcf25a094d4607399681e07210b 100644 (file)
@@ -26,7 +26,8 @@ class WXDLLIMPEXP_CORE wxBitmap : public wxBitmapBase
 public:
     wxBitmap() {}
     wxBitmap(const wxIDirectFBSurfacePtr& surface) { Create(surface); }
-    wxBitmap(int width, int height, int depth = -1);
+    wxBitmap(int width, int height, int depth = -1) { Create(width, height, depth); }
+    wxBitmap(const wxSize& sz, int depth = -1) { Create(sz, depth); }
     wxBitmap(const char bits[], int width, int height, int depth = 1);
     wxBitmap(const wxString &filename, wxBitmapType type = wxBITMAP_DEFAULT_TYPE);
     wxBitmap(const char* const* bits);
@@ -35,7 +36,9 @@ public:
 #endif
 
     bool Create(const wxIDirectFBSurfacePtr& surface);
-    bool Create(int width, int height, int depth = -1);
+    bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH);
+    bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH)
+        { return Create(sz.GetWidth(), sz.GetHeight(), depth); }
 
     virtual int GetHeight() const;
     virtual int GetWidth() const;
index 8c65fa9e805801bf8994d91fb1049dc7c6fd7b60..96f3e2381471ddc04a1ad09778c821640f116e70 100644 (file)
@@ -51,13 +51,16 @@ class WXDLLIMPEXP_CORE wxBitmap: public wxBitmapBase
 {
 public:
     wxBitmap() { }
-    wxBitmap( int width, int height, int depth = wxBITMAP_SCREEN_DEPTH );
+    wxBitmap( int width, int height, int depth = wxBITMAP_SCREEN_DEPTH ) 
+        { Create(width, height, depth); }
+    wxBitmap( const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH ) 
+        { Create(sz, depth); }
     wxBitmap( const char bits[], int width, int height, int depth = 1 );
     wxBitmap( const char* const* bits );
 #ifdef wxNEEDS_CHARPP
     // needed for old GCC
     wxBitmap(char** data)
-    { *this = wxBitmap(const_cast<const char* const*>(data)); }
+        { *this = wxBitmap(const_cast<const char* const*>(data)); }
 #endif
     wxBitmap( const wxString &filename, wxBitmapType type = wxBITMAP_DEFAULT_TYPE );
 #if wxUSE_IMAGE
@@ -67,6 +70,8 @@ public:
     virtual ~wxBitmap();
 
     bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH);
+    bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH)
+        { return Create(sz.GetWidth(), sz.GetHeight(), depth); }
 
     virtual int GetHeight() const;
     virtual int GetWidth() const;
index 769083eee38d822759dcc8ac1405204d3210341f..14f94a6664c306bcec924337a2119d4df8af0fbb 100644 (file)
@@ -64,8 +64,9 @@ private:
 class WXDLLIMPEXP_CORE wxBitmap: public wxBitmapBase
 {
 public:
-    wxBitmap();
-    wxBitmap( int width, int height, int depth = -1 );
+    wxBitmap() {}
+    wxBitmap( int width, int height, int depth = -1 ) { Create( width, height, depth ); }
+    wxBitmap( const wxSize& sz, int depth = -1 ) { Create( sz, depth ); }
     wxBitmap( const char bits[], int width, int height, int depth = 1 );
     wxBitmap( const char* const* bits );
 #ifdef wxNEEDS_CHARPP
@@ -79,7 +80,9 @@ public:
     wxBitmap( const wxImage& image, int depth = -1 ) { (void)CreateFromImage(image, depth); }
     virtual ~wxBitmap();
 
-    bool Create(int width, int height, int depth = -1);
+    bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH);
+    bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH)
+        { return Create(sz.GetWidth(), sz.GetHeight(), depth); }
 
     virtual int GetHeight() const;
     virtual int GetWidth() const;
index 913c2ff75679f1d7451fa2f8840f3307dcff38ee..f6392e5f8cdbd01d4b7f944d2bcc9273cfce5a28 100644 (file)
@@ -27,14 +27,19 @@ class WXDLLIMPEXP_CORE wxBitmap: public wxBitmapBase
 {
 public:
     wxBitmap() {}
-    wxBitmap(int width, int height, int depth = -1);
+    wxBitmap(int width, int height, int depth = -1)
+        { Create(width, height, depth); }
+    wxBitmap(const wxSize& sz, int depth = -1)
+        { Create(sz, depth); }
     wxBitmap(const char bits[], int width, int height, int depth = 1);
     wxBitmap(const char* const* bits);
     wxBitmap(const wxString &filename, wxBitmapType type = wxBITMAP_DEFAULT_TYPE);
     wxBitmap(const wxImage& image, int depth = -1);
     virtual ~wxBitmap() {}
 
-    bool Create(int width, int height, int depth = -1);
+    bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH);
+    bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH)
+        { return Create(sz.GetWidth(), sz.GetHeight(), depth); }
 
     virtual int GetHeight() const;
     virtual int GetWidth() const;
index b93ee6a49846d9fe5ed22c80f694afa587597d61..515ceb966ebfc962ba6e9e53ff839a9992dc7b6f 100644 (file)
@@ -73,7 +73,8 @@ public:
     //
     // NB: this ctor will create a DIB for 24 and 32bpp bitmaps, use ctor
     //     taking a DC argument if you want to force using DDB in this case
-    wxBitmap(int width, int height, int depth = -1);
+    wxBitmap(int width, int height, int depth = -1) { (void)Create(width, height, depth); }
+    wxBitmap(const wxSize& sz, int depth = -1) { (void)Create(sz, depth); }
 
     // Create a bitmap compatible with the given DC
     wxBitmap(int width, int height, const wxDC& dc);
@@ -137,6 +138,9 @@ public:
 #endif
 
     virtual bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH);
+    virtual bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH)
+        { return Create(sz.GetWidth(), sz.GetHeight(), depth); }
+
     virtual bool Create(int width, int height, const wxDC& dc);
     virtual bool Create(const void* data, wxBitmapType type, int width, int height, int depth = 1);
     virtual bool LoadFile(const wxString& name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE);
index 0206629798817811376f0b69c8a564d8908b2683..b7d02925a0b8db849e12fafb6f0d0d9a63d50f40 100644 (file)
@@ -114,7 +114,16 @@ public:
             );
 
     // If depth is omitted, will create a bitmap compatible with the display
-    wxBitmap( int nWidth, int nHeight, int nDepth = -1 );
+    wxBitmap( int nWidth, int nHeight, int nDepth = -1 )
+    {
+        Init();
+        (void)Create(nWidth, nHeight, nDepth);
+    }
+    wxBitmap( const wxSize& sz, int nDepth = -1 )
+    {
+        Init();
+        (void)Create(sz, nDepth);
+    }
 
     wxBitmap( const wxImage& image, int depth = -1 )
                          { (void)CreateFromImage(image, depth); }
@@ -152,8 +161,11 @@ public:
 
     virtual bool Create( int nWidth
                         ,int nHeight
-                        ,int nDepth = -1
+                        ,int nDepth = wxBITMAP_SCREEN_DEPTH
                        );
+    virtual bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH)
+        { return Create(sz.GetWidth(), sz.GetHeight(), depth); }
+        
     virtual bool Create( const void* pData
                         ,wxBitmapType lType
                         ,int   nWidth
index a9d2f3fe36e5609b17762182a67605b2cb04df06..9fd20675fb05bee2cd48e42bd1515f80500299dd 100644 (file)
@@ -87,7 +87,7 @@ class WXDLLIMPEXP_CORE wxBitmap: public wxBitmapBase
     friend class WXDLLIMPEXP_FWD_CORE wxBitmapHandler;
 
 public:
-    wxBitmap(); // Platform-specific
+    wxBitmap() {} // Platform-specific
 
     // Initialize with raw data.
     wxBitmap(const char bits[], int width, int height, int depth = 1);
@@ -102,7 +102,8 @@ public:
     wxBitmap(const void* data, wxBitmapType type, int width, int height, int depth = 1);
 
     // If depth is omitted, will create a bitmap compatible with the display
-    wxBitmap(int width, int height, int depth = -1);
+    wxBitmap(int width, int height, int depth = -1) { (void)Create(width, height, depth); }
+    wxBitmap(const wxSize& sz, int depth = -1) { (void)Create(sz, depth); }
 
     // Convert from wxImage:
     wxBitmap(const wxImage& image, int depth = -1);
@@ -110,14 +111,17 @@ public:
     // Convert from wxIcon
     wxBitmap(const wxIcon& icon) { CopyFromIcon(icon); }
 
-    virtual ~wxBitmap();
+    virtual ~wxBitmap() {}
 
     wxImage ConvertToImage() const;
 
     // get the given part of bitmap
     wxBitmap GetSubBitmap( const wxRect& rect ) const;
 
-    virtual bool Create(int width, int height, int depth = -1);
+    virtual bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH);
+    virtual bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH)
+        { return Create(sz.GetWidth(), sz.GetHeight(), depth); }
+
     virtual bool Create(const void* data, wxBitmapType type, int width, int height, int depth = 1);
     // virtual bool Create( WXHICON icon) ;
     virtual bool LoadFile(const wxString& name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE);
index 04b38d7b0870c34d987dd37428d27a4df96c274f..d08b6117d90956769bca36c57f8fe5fb234206e9 100644 (file)
@@ -58,7 +58,8 @@ public:
     //
     // NB: this ctor will create a DIB for 24 and 32bpp bitmaps, use ctor
     //     taking a DC argument if you want to force using DDB in this case
-    wxBitmap(int width, int height, int depth = -1);
+    wxBitmap(int width, int height, int depth = -1) { /*TODO*/ }
+    wxBitmap(const wxSize& sz, int depth = -1) { /*TODO*/ }
 
     // Create a bitmap compatible with the given DC
     wxBitmap(int width, int height, const wxDC& dc);
@@ -91,7 +92,7 @@ public:
         return *this;
     }
 
-    virtual ~wxBitmap();
+    virtual ~wxBitmap() {}
 
 #if wxUSE_IMAGE && wxUSE_WXDIB
     wxImage ConvertToImage() const;
@@ -111,7 +112,10 @@ public:
     bool CopyFromDIB(const wxDIB& dib);
 #endif
 
-    virtual bool Create(int width, int height, int depth = -1);
+    virtual bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH);
+    virtual bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH)
+        { return Create(sz.GetWidth(), sz.GetHeight(), depth); }
+
     virtual bool Create(int width, int height, const wxDC& dc);
     virtual bool Create(const void* data, long type, int width, int height, int depth = 1);
     virtual bool LoadFile(const wxString& name, long type = wxBITMAP_DEFAULT_TYPE);
index 2a40965b35453915157dc369e2cdc6228dae8b1d..e60874f815b7fa0f8a6b1ea832e0980427792e33 100644 (file)
@@ -65,8 +65,10 @@ private:
 class WXDLLIMPEXP_CORE wxBitmap: public wxBitmapBase
 {
 public:
-    wxBitmap();
-    wxBitmap( int width, int height, int depth = -1 );
+    wxBitmap() {}
+    wxBitmap( int width, int height, int depth = -1 ) { Create( width, height, depth ); }
+    wxBitmap( const wxSize& sz, int depth = -1 ) { Create( sz, depth ); }
+    
     wxBitmap( const char bits[], int width, int height, int depth = 1 );
     wxBitmap( const char* const* bits );
 #ifdef wxNEEDS_CHARPP
@@ -81,7 +83,10 @@ public:
 
     static void InitStandardHandlers();
 
-    bool Create(int width, int height, int depth = -1);
+    bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH);
+    bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH)
+        { return Create(sz.GetWidth(), sz.GetHeight(), depth); }
+
     bool Create(const void* data, wxBitmapType type,
                 int width, int height, int depth = -1);
     // create the wxBitmap using a _copy_ of the pixmap
index ce3e67080d4ae7e2ccc6715d7cfa22406626878e..1d2b8b81f8e1534ea19af93dcfd03a1a6796ed80 100644 (file)
@@ -273,6 +273,11 @@ public:
         A depth of 32 including an alpha channel is supported under MSW, Mac and GTK+.
     */
     wxBitmap(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH);
+    
+    /**
+        @overload
+    */
+    wxBitmap(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH);
 
     /**
         Creates a bitmap from XPM data.
@@ -374,10 +379,15 @@ public:
     /**
         Creates a fresh bitmap.
         If the final argument is omitted, the display depth of the screen is used.
-
-        This overload works on all platforms.
+        
+        @return @true if the creation was successful.
     */
     virtual bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH);
+    
+    /**
+        @overload
+    */
+    virtual bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH);
 
     /*
         Creates a bitmap from the given data, which can be of arbitrary type.
index daffce382a6759824a06c79fe90b8e904faaebb8..b2569b01044dbc4e35ccfeba078af86cf4d4e1f0 100644 (file)
@@ -39,6 +39,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxBitmapHandler, wxBitmapHandlerBase)
 // ========================================================================
 // wxBitmapRefData
 // ========================================================================
+
 class wxBitmapRefData: public wxGDIRefData
 {
     friend class wxBitmap;
@@ -61,8 +62,6 @@ protected:
     wxMask             *m_bitmapMask; // Optional mask
 };
 
-#define M_BITMAPDATA ((wxBitmapRefData *)m_refData)
-
 wxBitmapRefData::wxBitmapRefData()
 {
     m_ok = FALSE;
@@ -102,6 +101,9 @@ wxBitmapRefData::~wxBitmapRefData()
 // ========================================================================
 // wxBitmap
 // ========================================================================
+
+#define M_BITMAPDATA ((wxBitmapRefData *)m_refData)
+
 IMPLEMENT_DYNAMIC_CLASS(wxBitmap, wxGDIObject)
 
 wxBitmap::wxBitmap()
@@ -125,11 +127,6 @@ wxBitmap::wxBitmap(const char bits[], int the_width, int the_height, int no_bits
     /* TODO: create the bitmap from data */
 }
 
-wxBitmap::wxBitmap(int w, int h, int d)
-{
-    (void)Create(w, h, d);
-}
-
 wxBitmap::wxBitmap(NSImage* cocoaNSImage)
 {
     (void) Create(cocoaNSImage);
index 4496298f13f70a5c77edf1018c7c791e18631484..239520cb7cf3416e065371fcfa2d8f032ba05432 100644 (file)
@@ -394,11 +394,6 @@ public:
 
 IMPLEMENT_DYNAMIC_CLASS(wxBitmap, wxBitmapBase)
 
-wxBitmap::wxBitmap(int width, int height, int depth)
-{
-    Create(width, height, depth);
-}
-
 bool wxBitmap::Create(const wxIDirectFBSurfacePtr& surface)
 {
     UnRef();
index 8a2785bbd82abe6b8b014477347e22df3473774a..65619c3d572d09df2ede79b06aeb7c1477b1702a 100644 (file)
@@ -179,7 +179,7 @@ GdkBitmap *wxMask::GetBitmap() const
 }
 
 //-----------------------------------------------------------------------------
-// wxBitmap
+// wxBitmapRefData
 //-----------------------------------------------------------------------------
 
 class wxBitmapRefData: public wxGDIRefData
@@ -226,17 +226,15 @@ wxBitmapRefData::~wxBitmapRefData()
 #endif // wxUSE_PALETTE
 }
 
+
+//-----------------------------------------------------------------------------
+// wxBitmap
 //-----------------------------------------------------------------------------
 
 #define M_BMPDATA static_cast<wxBitmapRefData*>(m_refData)
 
 IMPLEMENT_DYNAMIC_CLASS(wxBitmap,wxGDIObject)
 
-wxBitmap::wxBitmap(int width, int height, int depth)
-{
-    Create(width, height, depth);
-}
-
 wxBitmap::wxBitmap(const wxString &filename, wxBitmapType type)
 {
     LoadFile(filename, type);
index 3c651e38dbda359f75a7723b04fcfea19bb2545d..dba5a517fb0fb48746ad2e4146cd17ff95ee8886 100644 (file)
@@ -220,8 +220,9 @@ GdkBitmap *wxMask::GetBitmap() const
     return m_bitmap;
 }
 
+
 //-----------------------------------------------------------------------------
-// wxBitmap
+// wxBitmapRefData
 //-----------------------------------------------------------------------------
 
 class wxBitmapRefData : public wxGDIRefData
@@ -347,21 +348,15 @@ wxBitmapRefData::~wxBitmapRefData()
 #endif // wxUSE_PALETTE
 }
 
+
+//-----------------------------------------------------------------------------
+// wxBitmap
 //-----------------------------------------------------------------------------
 
 #define M_BMPDATA ((wxBitmapRefData *)m_refData)
 
 IMPLEMENT_DYNAMIC_CLASS(wxBitmap,wxGDIObject)
 
-wxBitmap::wxBitmap()
-{
-}
-
-wxBitmap::wxBitmap( int width, int height, int depth )
-{
-    Create( width, height, depth );
-}
-
 wxGDIRefData *wxBitmap::CreateGDIRefData() const
 {
     return new wxBitmapRefData;
index 013e9f467428c2e83ffe0393235b56ebcbd2b41c..3c717d4fe9fa621ca35f8e1e71ed2bc9fde066a2 100644 (file)
@@ -58,7 +58,7 @@ static pixel_format_t gs_pixel_format_wxImage =
     {0xFF,0x00,0, 0xFF,0x08,0, 0xFF,0x10,0, 0x00,0x00,0}; // RGB 24bpp for wxImage
 
 //-----------------------------------------------------------------------------
-// wxBitmap
+// wxBitmapRefData
 //-----------------------------------------------------------------------------
 
 class wxBitmapRefData: public wxGDIRefData
@@ -163,18 +163,15 @@ wxBitmapRefData::~wxBitmapRefData()
     delete m_palette;
 }
 
+
+//-----------------------------------------------------------------------------
+// wxBitmap
 //-----------------------------------------------------------------------------
 
 #define M_BMPDATA ((wxBitmapRefData *)m_refData)
 
 IMPLEMENT_DYNAMIC_CLASS(wxBitmap,wxBitmapBase)
 
-wxBitmap::wxBitmap(int width, int height, int depth)
-{
-    Create(width, height, depth);
-}
-
-
 wxGDIRefData *wxBitmap::CreateGDIRefData() const
 {
     return new wxBitmapRefData;
index 6e7e0436f6b63f4ab42b640241009765e3538a3d..c3ffd63876130691efad43eaddbdcfab0c6c9af3 100644 (file)
@@ -56,7 +56,7 @@
 #endif // no CLR_INVALID
 
 // ----------------------------------------------------------------------------
-// Bitmap data
+// wxBitmapRefData
 // ----------------------------------------------------------------------------
 
 class WXDLLEXPORT wxBitmapRefData : public wxGDIImageRefData
@@ -512,11 +512,6 @@ wxBitmap::wxBitmap(const char bits[], int width, int height, int depth)
 #endif
 }
 
-wxBitmap::wxBitmap(int w, int h, int d)
-{
-    (void)Create(w, h, d);
-}
-
 wxBitmap::wxBitmap(int w, int h, const wxDC& dc)
 {
     (void)Create(w, h, dc);
index 74db7030101b3c04d2f13403b885f43f7cfa6002..6f9f968eb15b10a42afbdb162d7b21327a2fe48d 100644 (file)
@@ -276,19 +276,6 @@ wxBitmap::wxBitmap(
     SetHBITMAP((WXHBITMAP)hBmp);
 } // end of wxBitmap::wxBitmap
 
-wxBitmap::wxBitmap(
-  int                               nW
-, int                               nH
-, int                               nD
-)
-{
-    Init();
-    (void)Create( nW
-                 ,nH
-                 ,nD
-                );
-} // end of wxBitmap::wxBitmap
-
 wxBitmap::wxBitmap(
   const void*                       pData
 , wxBitmapType                      lType
index 96a26525f9b5b92b20b9c96a2bc79decace898cd..71b8bda63aee43da5861312831e3a684d68bcb1d 100644 (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);
index 35e484a48a77013bb9cc2fda3e8c323930634b54..ed435cf0dddfc2bb0edffb0f697dc7500c37e6a1 100644 (file)
@@ -198,19 +198,11 @@ bool wxBitmap::CopyFromDIB(const wxDIB& dib)
 
 #endif // NEVER_USE_DIB
 
-wxBitmap::~wxBitmap()
-{
-}
-
 wxBitmap::wxBitmap(const char bits[], int width, int height, int depth)
 {
     Init();
 }
 
-wxBitmap::wxBitmap(int w, int h, int d)
-{
-}
-
 wxBitmap::wxBitmap(int w, int h, const wxDC& dc)
 {
 }
index be6e240a156fded5939edca5b3cd026839cfb609..c32c1eb031dc8f37eb136e04bc9a3a6752d15963 100644 (file)
@@ -224,7 +224,7 @@ bool wxMask::Create( const wxBitmap& bitmap )
 }
 
 //-----------------------------------------------------------------------------
-// wxBitmap
+// wxBitmapRefData
 //-----------------------------------------------------------------------------
 
 class wxBitmapRefData : public wxGDIRefData
@@ -347,18 +347,14 @@ static WXPixmap wxGetSubPixmap( WXDisplay* xdisplay, WXPixmap xpixmap,
     return (WXPixmap)ret;
 }
 
-#define M_BMPDATA ((wxBitmapRefData *)m_refData)
 
-IMPLEMENT_DYNAMIC_CLASS(wxBitmap,wxGDIObject)
+//-----------------------------------------------------------------------------
+// wxBitmap
+//-----------------------------------------------------------------------------
 
-wxBitmap::wxBitmap()
-{
-}
+#define M_BMPDATA ((wxBitmapRefData *)m_refData)
 
-wxBitmap::wxBitmap( int width, int height, int depth )
-{
-    Create( width, height, depth );
-}
+IMPLEMENT_DYNAMIC_CLASS(wxBitmap,wxGDIObject)
 
 bool wxBitmap::Create( int width, int height, int depth )
 {