%\overview{Overview}{wxbitmapoverview}
%
This class encapsulates the concept of a platform-dependent bitmap,
-either monochrome or colour.
+either monochrome or colour or colour with alpha channel support.
\wxheading{Derived from}
Creates a new bitmap. A depth of -1 indicates the depth of the current screen
or visual. Some platforms only support 1 for monochrome and -1 for the current
-colour setting.
+colour setting. Beginning with version 2.5.4 of wxWidgets a depth if 32 including
+an alpha channel is supported under MSW, Mac and GTK+.
\func{}{wxBitmap}{\param{const char**}{ bits}}
void *GetRawData(wxPixelDataBase& data, int bpp);
void UngetRawData(wxPixelDataBase& data);
- bool HasAlpha() const { return true; }
- void UseAlpha() { }
+ bool HasAlpha() const;
+ void UseAlpha();
protected:
bool CreateFromXpm(const char **bits);
void *GetRawData(wxPixelDataBase& data, int bpp);
void UngetRawData(wxPixelDataBase& data);
- bool HasAlpha() const { return true; }
- void UseAlpha() { }
+ bool HasAlpha() const;
+ void UseAlpha();
protected:
bool CreateFromXpm(const char **bits);
{
}
+
+bool wxBitmap::HasAlpha() const
+{
+#ifdef __WXGTK20__
+ return HasPixbuf();
+#else
+ return false;
+#endif
+}
+
+void wxBitmap::UseAlpha()
+{
+#ifdef __WXGTK20__
+ GetPixbuf();
+#endif
+}
+
//-----------------------------------------------------------------------------
// wxBitmapHandler
//-----------------------------------------------------------------------------
{
}
+
+bool wxBitmap::HasAlpha() const
+{
+#ifdef __WXGTK20__
+ return HasPixbuf();
+#else
+ return false;
+#endif
+}
+
+void wxBitmap::UseAlpha()
+{
+#ifdef __WXGTK20__
+ GetPixbuf();
+#endif
+}
+
//-----------------------------------------------------------------------------
// wxBitmapHandler
//-----------------------------------------------------------------------------