- wxMask *GetMask(void) const;
- void SetMask( wxMask *mask );
-
- void Resize( int height, int width );
-
- bool SaveFile( const wxString &name, int type, wxPalette *palette = NULL );
- bool LoadFile( const wxString &name, int type );
-
- wxPalette *GetPalette(void) const;
- wxPalette *GetColourMap(void) const
- { return GetPalette(); };
-
- private:
-
- friend wxDC;
- friend wxPaintDC;
- friend wxMemoryDC;
- friend wxToolBarGTK;
- friend wxBitmapButton;
- friend wxStaticBitmap;
-
- GdkPixmap *GetPixmap(void) const;
- GdkBitmap *GetBitmap(void) const;
-
- void DestroyImage(void);
- void RecreateImage(void);
- void Render(void);
-
- // no data :-)
+ GdkPixmap *GetPixmap() const;
+ GdkBitmap *GetBitmap() const;
+ bool HasPixmap() const;
+
+ // Basically, this corresponds to Win32 StretchBlt()
+ wxBitmap Rescale( int clipx, int clipy, int clipwidth, int clipheight, int width, int height );
+
+ // raw bitmap access support functions
+ void *GetRawData(wxPixelDataBase& data, int bpp);
+ void UngetRawData(wxPixelDataBase& data);
+
+ bool HasAlpha() const;
+
+protected:
+ bool CreateFromImage(const wxImage& image, int depth);
+
+ virtual wxObjectRefData *CreateRefData() const;
+ virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
+
+private:
+ // to be called from CreateFromImage only!
+ bool CreateFromImageAsBitmap(const wxImage& image);
+ bool CreateFromImageAsPixmap(const wxImage& image);
+
+ friend class wxBitmapHandler;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxBitmap)
+};
+
+//-----------------------------------------------------------------------------
+// wxBitmapHandler
+//-----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_CORE wxBitmapHandler: public wxBitmapHandlerBase
+{
+ DECLARE_ABSTRACT_CLASS(wxBitmapHandler)