]> git.saurik.com Git - wxWidgets.git/commitdiff
mention that bitmap must be selected out of wxMemoryDC before being used for anything...
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 31 Oct 2007 16:14:29 +0000 (16:14 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 31 Oct 2007 16:14:29 +0000 (16:14 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/memorydc.tex

index 0f36054aca2997c01c571e3748d846d4daf33f1d..e71262b954304a2cdea653263c94e76784989fa1 100644 (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}