X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ba90345d082f759ed34d931833cafb09fc585d61..b3e51e0f0fea8747bfe4b2a9f9e0d184e4b0db38:/docs/latex/wx/image.tex diff --git a/docs/latex/wx/image.tex b/docs/latex/wx/image.tex index 56fed27525..4986bf1c19 100644 --- a/docs/latex/wx/image.tex +++ b/docs/latex/wx/image.tex @@ -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}}