X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c0de73aebe3dcbd2ca8dc8d8d7ad6d743c05e2e8..df1a2934e9f32088cf6892d1362e4bd7a98885cc:/wxPython/src/gtk/_core.py diff --git a/wxPython/src/gtk/_core.py b/wxPython/src/gtk/_core.py index 38a522bc43..04fe738729 100644 --- a/wxPython/src/gtk/_core.py +++ b/wxPython/src/gtk/_core.py @@ -1588,6 +1588,8 @@ class FSFile(Object): self.this = newobj.this self.thisown = 1 del newobj.thisown + self.thisown = 0 # It will normally be deleted by the user of the wxFileSystem + def __del__(self, destroy=_core_.delete_FSFile): """__del__(self)""" try: @@ -2060,6 +2062,20 @@ class Image(Object): """ return _core_.Image_FindFirstUnusedColour(*args, **kwargs) + def ConvertAlphaToMask(*args, **kwargs): + """ + ConvertAlphaToMask(self, byte threshold=128) -> bool + + If the image has alpha channel, this method converts it to mask. All pixels + with alpha value less than ``threshold`` are replaced with mask colour and the + alpha channel is removed. Mask colour is chosen automatically using + `FindFirstUnusedColour`. + + If the image image doesn't have alpha channel, ConvertAlphaToMask does + nothing. + """ + return _core_.Image_ConvertAlphaToMask(*args, **kwargs) + def SetMaskFromImage(*args, **kwargs): """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool""" return _core_.Image_SetMaskFromImage(*args, **kwargs)