X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4276dc529d44f9107748f2ed6ca36f8ddfce12f4..9176f38f730c3415ac7a911c2f85cdea7eca4478:/wxPython/src/gtk/gdi.py diff --git a/wxPython/src/gtk/gdi.py b/wxPython/src/gtk/gdi.py index 30da66d3fe..ac5ff3d7ad 100644 --- a/wxPython/src/gtk/gdi.py +++ b/wxPython/src/gtk/gdi.py @@ -51,13 +51,13 @@ class Colour(core.Object): etc. Valid RGB values are in the range 0 to 255. In wxPython there are typemaps that will automatically convert from a colour - name, or from a "#RRGGBB" colour hex value string to a wx.Colour object when + name, or from a '#RRGGBB' colour hex value string to a wx.Colour object when calling C++ methods that expect a wxColour. This means that the following are all equivallent: win.SetBackgroundColour(wxColour(0,0,255)) - win.SetBackgroundColour("BLUE") - win.SetBackgroundColour("#0000FF") + win.SetBackgroundColour('BLUE') + win.SetBackgroundColour('#0000FF') You can retrieve the various current system colour settings with wx.SystemSettings.GetColour. @@ -482,6 +482,14 @@ class Bitmap(GDIObject): """ return _gdi.Bitmap_GetDepth(*args, **kwargs) + def GetSize(*args, **kwargs): + """ + GetSize() -> Size + + Get the size of the bitmap. + """ + return _gdi.Bitmap_GetSize(*args, **kwargs) + def ConvertToImage(*args, **kwargs): """ ConvertToImage() -> Image @@ -570,6 +578,14 @@ class Bitmap(GDIObject): """ return _gdi.Bitmap_SetDepth(*args, **kwargs) + def SetSize(*args, **kwargs): + """ + SetSize(Size size) + + Set the bitmap size + """ + return _gdi.Bitmap_SetSize(*args, **kwargs) + def __nonzero__(self): return self.Ok() def __eq__(*args, **kwargs): """__eq__(Bitmap other) -> bool""" @@ -587,18 +603,6 @@ class BitmapPtr(Bitmap): self.__class__ = Bitmap _gdi.Bitmap_swigregister(BitmapPtr) -def EmptyBitmap(*args, **kwargs): - """ - EmptyBitmap(int width, int height, int depth=-1) -> Bitmap - - Creates a new bitmap of the given size. A depth of -1 indicates the depth of - the current screen or visual. Some platforms only support 1 for monochrome and - -1 for the current colour setting. - """ - val = _gdi.new_EmptyBitmap(*args, **kwargs) - val.thisown = 1 - return val - def BitmapFromIcon(*args, **kwargs): """ BitmapFromIcon(Icon icon) -> Bitmap @@ -645,6 +649,19 @@ def BitmapFromBits(*args, **kwargs): val.thisown = 1 return val +def EmptyBitmap(*args): + """ + EmptyBitmap(int width, int height, int depth=-1) -> Bitmap + EmptyBitmap(Size size, int depth=-1) -> Bitmap + + Creates a new bitmap of the given size. A depth of -1 indicates + the depth of the current screen or visual. Some platforms only + support 1 for monochrome and -1 for the current colour setting. + """ + val = _gdi.new_EmptyBitmap(*args) + val.thisown = 1 + return val + class Mask(core.Object): """ This class encapsulates a monochrome mask bitmap, where the masked area is @@ -1171,6 +1188,7 @@ FONTENCODING_ISO8859_14 = _gdi.FONTENCODING_ISO8859_14 FONTENCODING_ISO8859_15 = _gdi.FONTENCODING_ISO8859_15 FONTENCODING_ISO8859_MAX = _gdi.FONTENCODING_ISO8859_MAX FONTENCODING_KOI8 = _gdi.FONTENCODING_KOI8 +FONTENCODING_KOI8_U = _gdi.FONTENCODING_KOI8_U FONTENCODING_ALTERNATIVE = _gdi.FONTENCODING_ALTERNATIVE FONTENCODING_BULGARIAN = _gdi.FONTENCODING_BULGARIAN FONTENCODING_CP437 = _gdi.FONTENCODING_CP437 @@ -1449,6 +1467,11 @@ class FontMapper(object): return _gdi.FontMapper_GetEncodingDescription(*args, **kwargs) GetEncodingDescription = staticmethod(GetEncodingDescription) + def GetEncodingFromName(*args, **kwargs): + """GetEncodingFromName(String name) -> int""" + return _gdi.FontMapper_GetEncodingFromName(*args, **kwargs) + + GetEncodingFromName = staticmethod(GetEncodingFromName) def SetConfig(*args, **kwargs): """SetConfig(ConfigBase config)""" return _gdi.FontMapper_SetConfig(*args, **kwargs) @@ -1510,6 +1533,10 @@ def FontMapper_GetEncodingDescription(*args, **kwargs): """FontMapper_GetEncodingDescription(int encoding) -> String""" return _gdi.FontMapper_GetEncodingDescription(*args, **kwargs) +def FontMapper_GetEncodingFromName(*args, **kwargs): + """FontMapper_GetEncodingFromName(String name) -> int""" + return _gdi.FontMapper_GetEncodingFromName(*args, **kwargs) + def FontMapper_GetDefaultConfigPath(*args, **kwargs): """FontMapper_GetDefaultConfigPath() -> String""" return _gdi.FontMapper_GetDefaultConfigPath(*args, **kwargs)