%\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}
\helpref{wxGDIObject}{wxgdiobject}\\
\helpref{wxObject}{wxobject}
-\wxheading{Include file}
+\wxheading{Include files}
<wx/bitmap.h>
\latexignore{\rtfignore{\wxheading{Members}}}
-\membersection{wxBitmap::wxBitmap}\label{wxbitmapconstr}
+\membersection{wxBitmap::wxBitmap}\label{wxbitmapctor}
\func{}{wxBitmap}{\void}
\func{}{wxBitmap}{\param{const wxBitmap\& }{bitmap}}
-Copy constructor.
+Copy constructor. Note that this does not take a fresh copy of the data,
+but instead makes the internal data point to {\it bitmap}'s data. So
+changing one bitmap will change the other. To make a real copy, you can
+use:
+
+\begin{verbatim}
+ wxBitmap newBitmap = oldBitmap.GetSubBitmap(
+ wxRect(0, 0, oldBitmap.GetWidth(), oldBitmap.GetHeight()));
+\end{verbatim}
\func{}{wxBitmap}{\param{void*}{ data}, \param{int}{ type}, \param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}}
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 of 32 including
+an alpha channel is supported under MSW, Mac and GTK+.
\func{}{wxBitmap}{\param{const char**}{ bits}}
\twocolwidtha{5cm}
\begin{twocollist}
\twocolitem{\indexit{wxBITMAP\_TYPE\_BMP}}{Load a Windows bitmap file.}
-\twocolitem{\indexit{wxBITMAP\_TYPE\_BMP\_RESOURCE}}{Load a Windows bitmap from the resource database.}
+\twocolitem{\indexit{wxBITMAP\_TYPE\_BMP\_RESOURCE}}{Load a Windows bitmap resource from the executable. Windows only.}
+\twocolitem{\indexit{wxBITMAP\_TYPE\_PICT\_RESOURCE}}{Load a PICT image resource from the executable. Mac OS only.}
\twocolitem{\indexit{wxBITMAP\_TYPE\_GIF}}{Load a GIF bitmap file.}
\twocolitem{\indexit{wxBITMAP\_TYPE\_XBM}}{Load an X bitmap file.}
\twocolitem{\indexit{wxBITMAP\_TYPE\_XPM}}{Load an XPM bitmap file.}
-\twocolitem{\indexit{wxBITMAP\_TYPE\_RESOURCE}}{Load a Windows resource name.}
\end{twocollist}
The validity of these flags depends on the platform and wxWidgets configuration.
\end{itemize}
}
-\membersection{wxBitmap::\destruct{wxBitmap}}
+\membersection{wxBitmap::\destruct{wxBitmap}}\label{wxbitmapdtor}
\func{}{\destruct{wxBitmap}}{\void}
\helpref{wxBitmapHandler}{wxbitmaphandler}
-\membersection{wxBitmap::CleanUpHandlers}
+\membersection{wxBitmap::CleanUpHandlers}\label{wxbitmapcleanuphandlers}
\func{static void}{CleanUpHandlers}{\void}
\docparam{data}{Data whose type depends on the value of {\it type}.}
-\docparam{type}{A bitmap type identifier - see \helpref{wxBitmap::wxBitmap}{wxbitmapconstr} for a list
+\docparam{type}{A bitmap type identifier - see \helpref{wxBitmap::wxBitmap}{wxbitmapctor} for a list
of possible values.}
\wxheading{Return value}
\wxheading{See also}
-\helpref{wxBitmap::wxBitmap}{wxbitmapconstr}
+\helpref{wxBitmap::wxBitmap}{wxbitmapctor}
-\membersection{wxBitmap::FindHandler}
+\membersection{wxBitmap::FindHandler}\label{wxbitmapfindhandler}
\func{static wxBitmapHandler*}{FindHandler}{\param{const wxString\& }{name}}
Finds the handler with the given name.
-\func{static wxBitmapHandler*}{FindHandler}{\param{const wxString\& }{extension}, \param{long}{ bitmapType}}
+\func{static wxBitmapHandler*}{FindHandler}{\param{const wxString\& }{extension}, \param{wxBitmapType}{ bitmapType}}
Finds the handler associated with the given extension and type.
-\func{static wxBitmapHandler*}{FindHandler}{\param{long }{bitmapType}}
+\func{static wxBitmapHandler*}{FindHandler}{\param{wxBitmapType }{bitmapType}}
Finds the handler associated with the given bitmap type.
\helpref{wxBitmapHandler}{wxbitmaphandler}
-\membersection{wxBitmap::GetDepth}
+\membersection{wxBitmap::GetDepth}\label{wxbitmapgetdepth}
\constfunc{int}{GetDepth}{\void}
Gets the colour depth of the bitmap. A value of 1 indicates a
monochrome bitmap.
-\membersection{wxBitmap::GetHandlers}
+\membersection{wxBitmap::GetHandlers}\label{wxbitmapgethandlers}
\func{static wxList\&}{GetHandlers}{\void}
Returns a sub bitmap of the current one as long as the rect belongs entirely to
the bitmap. This function preserves bit depth and mask information.
-\membersection{wxBitmap::InitStandardHandlers}
+\membersection{wxBitmap::InitStandardHandlers}\label{wxbitmapinitstandardhandlers}
\func{static void}{InitStandardHandlers}{\void}
\helpref{wxBitmapHandler}{wxbitmaphandler}
-\membersection{wxBitmap::InsertHandler}
+\membersection{wxBitmap::InsertHandler}\label{wxbitmapinserthandler}
\func{static void}{InsertHandler}{\param{wxBitmapHandler*}{ handler}}
\membersection{wxBitmap::LoadFile}\label{wxbitmaploadfile}
-\func{bool}{LoadFile}{\param{const wxString\&}{ name}, \param{long}{ type}}
+\func{bool}{LoadFile}{\param{const wxString\&}{ name}, \param{wxBitmapType}{ type}}
Loads a bitmap from a file or resource.
\twocolwidtha{5cm}
\begin{twocollist}
\twocolitem{{\bf wxBITMAP\_TYPE\_BMP}}{Load a Windows bitmap file.}
-\twocolitem{{\bf wxBITMAP\_TYPE\_BMP\_RESOURCE}}{Load a Windows bitmap from the resource database.}
+\twocolitem{{\bf wxBITMAP\_TYPE\_BMP\_RESOURCE}}{Load a Windows bitmap resource from the executable.}
+\twocolitem{{\bf wxBITMAP\_TYPE\_PICT\_RESOURCE}}{Load a PICT image resource from the executable. Mac OS only.}
\twocolitem{{\bf wxBITMAP\_TYPE\_GIF}}{Load a GIF bitmap file.}
\twocolitem{{\bf wxBITMAP\_TYPE\_XBM}}{Load an X bitmap file.}
\twocolitem{{\bf wxBITMAP\_TYPE\_XPM}}{Load an XPM bitmap file.}
Returns true if bitmap data is present.
-\membersection{wxBitmap::RemoveHandler}
+\membersection{wxBitmap::RemoveHandler}\label{wxbitmapremovehandler}
\func{static bool}{RemoveHandler}{\param{const wxString\& }{name}}
\membersection{wxBitmap::SaveFile}\label{wxbitmapsavefile}
-\func{bool}{SaveFile}{\param{const wxString\& }{name}, \param{int}{ type}, \param{wxPalette* }{palette = NULL}}
+\func{bool}{SaveFile}{\param{const wxString\& }{name}, \param{wxBitmapType}{ type}, \param{wxPalette* }{palette = NULL}}
Saves a bitmap in the named file.
\helpref{wxBitmap::GetMask}{wxbitmapgetmask}, \helpref{wxMask}{wxmask}
%% VZ: this function is an implementation detail and shouldn't be documented
-%%\membersection{wxBitmap::SetOk}
+%%\membersection{wxBitmap::SetOk}\label{wxbitmapsetok}
%%
%%\func{void}{SetOk}{\param{int }{isOk}}
%%
\func{void}{SetPalette}{\param{const wxPalette\& }{palette}}
-Sets the associated palette.
+Sets the associated palette. (Not implemented under GTK+).
\wxheading{Parameters}
\helpref{wxPalette}{wxpalette}
-\membersection{wxBitmap::SetWidth}
+\membersection{wxBitmap::SetWidth}\label{wxbitmapsetwidth}
\func{void}{SetWidth}{\param{int }{width}}
\docparam{width}{Bitmap width in pixels.}
-\membersection{wxBitmap::operator $=$}
+\membersection{wxBitmap::operator $=$}\label{wxbitmapassign}
\func{wxBitmap\& }{operator $=$}{\param{const wxBitmap\& }{bitmap}}
Returns 'this' object.
-\membersection{wxBitmap::operator $==$}
+\membersection{wxBitmap::operator $==$}\label{wxbitmapequal}
\func{bool}{operator $==$}{\param{const wxBitmap\& }{bitmap}}
Returns true if the bitmaps were effectively equal, false otherwise.
-\membersection{wxBitmap::operator $!=$}
+\membersection{wxBitmap::operator $!=$}\label{wxbitmapnotequal}
\func{bool}{operator $!=$}{\param{const wxBitmap\& }{bitmap}}