]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/_gdi.py
reSWIGged
[wxWidgets.git] / wxPython / src / msw / _gdi.py
index d16853e71cbd1fe008adde7b212fc7c3f3236ecb..bacf6ef65ca75f039d91e12bf16be42686c052b6 100644 (file)
@@ -1180,9 +1180,13 @@ class Region(GDIObject):
         return _gdi_.Region_ConvertToBitmap(*args, **kwargs)
 
     def UnionBitmap(*args, **kwargs):
         return _gdi_.Region_ConvertToBitmap(*args, **kwargs)
 
     def UnionBitmap(*args, **kwargs):
-        """UnionBitmap(self, Bitmap bmp, Colour transColour=NullColour, int tolerance=0) -> bool"""
+        """UnionBitmap(self, Bitmap bmp) -> bool"""
         return _gdi_.Region_UnionBitmap(*args, **kwargs)
 
         return _gdi_.Region_UnionBitmap(*args, **kwargs)
 
+    def UnionBitmapColour(*args, **kwargs):
+        """UnionBitmapColour(self, Bitmap bmp, Colour transColour, int tolerance=0) -> bool"""
+        return _gdi_.Region_UnionBitmapColour(*args, **kwargs)
+
 
 class RegionPtr(Region):
     def __init__(self, this):
 
 class RegionPtr(Region):
     def __init__(self, this):
@@ -1192,11 +1196,17 @@ class RegionPtr(Region):
 _gdi_.Region_swigregister(RegionPtr)
 
 def RegionFromBitmap(*args, **kwargs):
 _gdi_.Region_swigregister(RegionPtr)
 
 def RegionFromBitmap(*args, **kwargs):
-    """RegionFromBitmap(Bitmap bmp, Colour transColour=NullColour, int tolerance=0) -> Region"""
+    """RegionFromBitmap(Bitmap bmp) -> Region"""
     val = _gdi_.new_RegionFromBitmap(*args, **kwargs)
     val.thisown = 1
     return val
 
     val = _gdi_.new_RegionFromBitmap(*args, **kwargs)
     val.thisown = 1
     return val
 
+def RegionFromBitmapColour(*args, **kwargs):
+    """RegionFromBitmapColour(Bitmap bmp, Colour transColour, int tolerance=0) -> Region"""
+    val = _gdi_.new_RegionFromBitmapColour(*args, **kwargs)
+    val.thisown = 1
+    return val
+
 def RegionFromPoints(*args, **kwargs):
     """RegionFromPoints(int points, Point points_array, int fillStyle=WINDING_RULE) -> Region"""
     val = _gdi_.new_RegionFromPoints(*args, **kwargs)
 def RegionFromPoints(*args, **kwargs):
     """RegionFromPoints(int points, Point points_array, int fillStyle=WINDING_RULE) -> Region"""
     val = _gdi_.new_RegionFromPoints(*args, **kwargs)
@@ -2394,16 +2404,7 @@ def EncodingConverter_CanConvert(*args, **kwargs):
     return _gdi_.EncodingConverter_CanConvert(*args, **kwargs)
 
 #----------------------------------------------------------------------------
     return _gdi_.EncodingConverter_CanConvert(*args, **kwargs)
 
 #----------------------------------------------------------------------------
-# wxGTK sets the locale when initialized.  Doing this at the Python
-# level should set it up to match what GTK is doing at the C level.
-if wx.Platform == "__WXGTK__":
-    try:
-        import locale
-        locale.setlocale(locale.LC_ALL, "")
-    except:
-        pass
-
-# On MSW add the directory where the wxWindows catalogs were installed
+# On MSW add the directory where the wxWidgets catalogs were installed
 # to the default catalog path.
 if wx.Platform == "__WXMSW__":
     import os
 # to the default catalog path.
 if wx.Platform == "__WXMSW__":
     import os
@@ -2698,7 +2699,12 @@ class DC(_core.Object):
         return _gdi_.DC_GetCharWidth(*args, **kwargs)
 
     def GetTextExtent(*args, **kwargs):
         return _gdi_.DC_GetCharWidth(*args, **kwargs)
 
     def GetTextExtent(*args, **kwargs):
-        """GetTextExtent(wxString string) -> (width, height)"""
+        """
+        GetTextExtent(wxString string) -> (width, height)
+
+        Get the width and height of the text using the current font. Only
+        works for single line strings.
+        """
         return _gdi_.DC_GetTextExtent(*args, **kwargs)
 
     def GetFullTextExtent(*args, **kwargs):
         return _gdi_.DC_GetTextExtent(*args, **kwargs)
 
     def GetFullTextExtent(*args, **kwargs):
@@ -2715,6 +2721,10 @@ class DC(_core.Object):
         """
         GetMultiLineTextExtent(wxString string, Font font=None) ->
            (width, height, descent, externalLeading)
         """
         GetMultiLineTextExtent(wxString string, Font font=None) ->
            (width, height, descent, externalLeading)
+
+        Get the width, height, decent and leading of the text using the
+        current or specified font. Works for single as well as multi-line
+        strings.
         """
         return _gdi_.DC_GetMultiLineTextExtent(*args, **kwargs)
 
         """
         return _gdi_.DC_GetMultiLineTextExtent(*args, **kwargs)
 
@@ -2951,6 +2961,10 @@ class DC(_core.Object):
         return _gdi_.DC_GetBoundingBox(*args, **kwargs)
 
     def __nonzero__(self): return self.Ok() 
         return _gdi_.DC_GetBoundingBox(*args, **kwargs)
 
     def __nonzero__(self): return self.Ok() 
+    def GetHDC(*args, **kwargs):
+        """GetHDC(self) -> long"""
+        return _gdi_.DC_GetHDC(*args, **kwargs)
+
     def _DrawPointList(*args, **kwargs):
         """_DrawPointList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
         return _gdi_.DC__DrawPointList(*args, **kwargs)
     def _DrawPointList(*args, **kwargs):
         """_DrawPointList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
         return _gdi_.DC__DrawPointList(*args, **kwargs)