Add static_data flag to SetData and SetAlpha so Python buffer objects

can be used in wxPython without double free()'s.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33250 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2005-04-02 02:04:52 +00:00
parent 2809785e15
commit 4013de1217
2 changed files with 10 additions and 6 deletions

View File

@@ -282,12 +282,12 @@ public:
// these functions provide fastest access to wxImage data but should be
// used carefully as no checks are done
unsigned char *GetData() const;
void SetData( unsigned char *data );
void SetData( unsigned char *data, int new_width, int new_height );
void SetData( unsigned char *data, bool static_data=false );
void SetData( unsigned char *data, int new_width, int new_height, bool static_data=false );
unsigned char *GetAlpha() const; // may return NULL!
bool HasAlpha() const { return GetAlpha() != NULL; }
void SetAlpha(unsigned char *alpha = NULL);
void SetAlpha(unsigned char *alpha = NULL, bool static_data=false);
void InitAlpha();
// Mask functions