From: Julian Smart Date: Mon, 22 Nov 2004 16:37:10 +0000 (+0000) Subject: Note about copy ctor X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2faa8e74b5cb5d630db5c24f1b8b5ce22a812bcd?ds=sidebyside Note about copy ctor git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/docs/latex/wx/bitmap.tex b/docs/latex/wx/bitmap.tex index 19d751882e..385a64fde1 100644 --- a/docs/latex/wx/bitmap.tex +++ b/docs/latex/wx/bitmap.tex @@ -38,7 +38,15 @@ Default constructor. \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}}