mention that bitmap must be selected out of wxMemoryDC before being used for anything else (patch 1823516)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-10-31 16:14:29 +00:00
parent c7753f0a99
commit f20f1e944c

View File

@@ -37,6 +37,16 @@ for anything. Typical usage is as follows:
Note that the memory DC {\it must} be deleted (or the bitmap selected out of it) before a bitmap
can be reselected into another memory DC.
And, before performing any other operations on the bitmap data, the bitmap must
be selected out of the memory DC:
\begin{verbatim}
temp_dc.SelectObject(wxNullBitmap)
\end{verbatim}
(this happens automatically when wxMemoryDC object goes out of scope).
\wxheading{See also}
\helpref{wxBitmap}{wxbitmap}, \helpref{wxDC}{wxdc}
@@ -69,11 +79,13 @@ Works exactly like \helpref{SelectObjectAsSource}{wxmemorydcselectobjectassource
this is the function you should use when you select a bitmap because you want to modify
it, e.g. drawing on this DC.
Be careful to use this function and not \helpref{SelectObjectAsSource}{wxmemorydcselectobjectassource}
when you want to modify the bitmap you are selecting otherwise you may incurr in some
problems related to wxBitmap being a reference counted object
Using \helpref{SelectObjectAsSource}{wxmemorydcselectobjectassource} when modifying
the bitmap may incurr some problems related to wxBitmap being a reference counted object
(see \helpref{reference counting overview}{trefcount}).
Also, before using the updated bitmap data, make sure to select it out of context first
(for example by selecting wxNullBitmap into the device context).
\wxheading{See also}
\helpref{wxDC::DrawBitmap}{wxdcdrawbitmap}