);
// 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); }
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
void SetQuality(int nQ);
wxPalette* GetPalette() const
- { return (GetBitmapData() ? (& GetBitmapData()->m_vBitmapPalette) : (wxPalette*) NULL); }
+ { return (GetBitmapData() ? (& GetBitmapData()->m_vBitmapPalette) : NULL); }
void SetPalette(const wxPalette& rPalette);
inline wxMask* GetMask() const
- { return (GetBitmapData() ? GetBitmapData()->m_pBitmapMask : (wxMask*) NULL); }
+ { return (GetBitmapData() ? GetBitmapData()->m_pBitmapMask : NULL); }
void SetMask(wxMask* pMask) ;
{ if (GetBitmapData()) GetBitmapData()->m_pSelectedInto = pDc; }
inline wxDC* GetSelectedInto() const
- { return (GetBitmapData() ? GetBitmapData()->m_pSelectedInto : (wxDC*) NULL); }
+ { return (GetBitmapData() ? GetBitmapData()->m_pSelectedInto : NULL); }
inline bool IsMono(void) const { return m_bIsMono; }