Implemented wxBitmap::HasAlpha() and ::UseAlpha().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32086 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
a4ea2d8dbb
commit
0ff2a74d0c
@ -3,7 +3,7 @@
|
|||||||
%\overview{Overview}{wxbitmapoverview}
|
%\overview{Overview}{wxbitmapoverview}
|
||||||
%
|
%
|
||||||
This class encapsulates the concept of a platform-dependent bitmap,
|
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}
|
\wxheading{Derived from}
|
||||||
|
|
||||||
@ -72,7 +72,8 @@ bitmaps from static data.
|
|||||||
|
|
||||||
Creates a new bitmap. A depth of -1 indicates the depth of the current screen
|
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
|
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}}
|
\func{}{wxBitmap}{\param{const char**}{ bits}}
|
||||||
|
|
||||||
|
@ -137,8 +137,8 @@ public:
|
|||||||
void *GetRawData(wxPixelDataBase& data, int bpp);
|
void *GetRawData(wxPixelDataBase& data, int bpp);
|
||||||
void UngetRawData(wxPixelDataBase& data);
|
void UngetRawData(wxPixelDataBase& data);
|
||||||
|
|
||||||
bool HasAlpha() const { return true; }
|
bool HasAlpha() const;
|
||||||
void UseAlpha() { }
|
void UseAlpha();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool CreateFromXpm(const char **bits);
|
bool CreateFromXpm(const char **bits);
|
||||||
|
@ -137,8 +137,8 @@ public:
|
|||||||
void *GetRawData(wxPixelDataBase& data, int bpp);
|
void *GetRawData(wxPixelDataBase& data, int bpp);
|
||||||
void UngetRawData(wxPixelDataBase& data);
|
void UngetRawData(wxPixelDataBase& data);
|
||||||
|
|
||||||
bool HasAlpha() const { return true; }
|
bool HasAlpha() const;
|
||||||
void UseAlpha() { }
|
void UseAlpha();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool CreateFromXpm(const char **bits);
|
bool CreateFromXpm(const char **bits);
|
||||||
|
@ -1597,6 +1597,23 @@ void wxBitmap::UngetRawData(wxPixelDataBase& data)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool wxBitmap::HasAlpha() const
|
||||||
|
{
|
||||||
|
#ifdef __WXGTK20__
|
||||||
|
return HasPixbuf();
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxBitmap::UseAlpha()
|
||||||
|
{
|
||||||
|
#ifdef __WXGTK20__
|
||||||
|
GetPixbuf();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxBitmapHandler
|
// wxBitmapHandler
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -1597,6 +1597,23 @@ void wxBitmap::UngetRawData(wxPixelDataBase& data)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool wxBitmap::HasAlpha() const
|
||||||
|
{
|
||||||
|
#ifdef __WXGTK20__
|
||||||
|
return HasPixbuf();
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxBitmap::UseAlpha()
|
||||||
|
{
|
||||||
|
#ifdef __WXGTK20__
|
||||||
|
GetPixbuf();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxBitmapHandler
|
// wxBitmapHandler
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user