Made documentation for wxImage::GetData/SetData more explicit about

the fact that wxImage owns the pointer.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mattia Barbon 2002-07-06 21:16:35 +00:00
parent 0763604ab9
commit f811bc9ac0

View File

@ -351,6 +351,9 @@ Returns the image data as an array. This is most often used when doing
direct image manipulation. The return value points to an array of
characters in RGBRGBRGB$\ldots$ format.
You should not delete the returned pointer nor pass it to
\helpref{wxImage::SetData}{wximagesetdata}.
\membersection{wxImage::GetGreen}\label{wximagegetgreen}
\constfunc{unsigned char}{GetGreen}{\param{int}{ x}, \param{int}{ y}}
@ -810,6 +813,13 @@ Sets the image data without performing checks. The data given must have
the size (width*height*3) or results will be unexpected. Don't use this
method if you aren't sure you know what you are doing.
The data must have been allocated with malloc(), NOT with operator new.
After this call the pointer to the data is owned by the wxImage object,
that will be responsible for deleting it.
Do not pass to this function a pointer obtained through
\helpref{wxImage::GetData}{wximagegetdata}.
\membersection{wxImage::SetMask}\label{wximagesetmask}
\func{void}{SetMask}{\param{bool}{ hasMask = TRUE}}