]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gtk/_gdi.py
logical vs. boolean operators, unused decls and vars, etc
[wxWidgets.git] / wxPython / src / gtk / _gdi.py
index 453f64fb3536f5f25466049cc3c9ed10f4fc02f5..b2dcd21f6b1bd0b9ec1bbd543ae8d7570219f3b9 100644 (file)
@@ -4391,7 +4391,7 @@ class MemoryDC(DC):
 
         dc = wx.MemoryDC()
         dc.SelectObject(bitmap)
 
         dc = wx.MemoryDC()
         dc.SelectObject(bitmap)
-        # draw on the dc usign any of the Draw methods
+        # draw on the dc using any of the Draw methods
         dc.SelectObject(wx.NullBitmap)
         # the bitmap now contains wahtever was drawn upon it
 
         dc.SelectObject(wx.NullBitmap)
         # the bitmap now contains wahtever was drawn upon it
 
@@ -4403,13 +4403,14 @@ class MemoryDC(DC):
     __repr__ = _swig_repr
     def __init__(self, *args, **kwargs): 
         """
     __repr__ = _swig_repr
     def __init__(self, *args, **kwargs): 
         """
-        __init__(self) -> MemoryDC
+        __init__(self, Bitmap bitmap=NullBitmap) -> MemoryDC
 
         Constructs a new memory device context.
 
         Use the Ok member to test whether the constructor was successful in
 
         Constructs a new memory device context.
 
         Use the Ok member to test whether the constructor was successful in
-        creating a usable device context. Don't forget to select a bitmap into
-        the DC before drawing on it.
+        creating a usable device context. If a bitmap is not given to this
+        constructor then don't forget to select a bitmap into the DC before
+        drawing on it.
         """
         _gdi_.MemoryDC_swiginit(self,_gdi_.new_MemoryDC(*args, **kwargs))
     def SelectObject(*args, **kwargs):
         """
         _gdi_.MemoryDC_swiginit(self,_gdi_.new_MemoryDC(*args, **kwargs))
     def SelectObject(*args, **kwargs):
@@ -4443,7 +4444,7 @@ def MemoryDCFromDC(*args, **kwargs):
 
 BUFFER_VIRTUAL_AREA = _gdi_.BUFFER_VIRTUAL_AREA
 BUFFER_CLIENT_AREA = _gdi_.BUFFER_CLIENT_AREA
 
 BUFFER_VIRTUAL_AREA = _gdi_.BUFFER_VIRTUAL_AREA
 BUFFER_CLIENT_AREA = _gdi_.BUFFER_CLIENT_AREA
-class BufferedDC(DC):
+class BufferedDC(MemoryDC):
     """
     This simple class provides a simple way to avoid flicker: when drawing
     on it, everything is in fact first drawn on an in-memory buffer (a
     """
     This simple class provides a simple way to avoid flicker: when drawing
     on it, everything is in fact first drawn on an in-memory buffer (a
@@ -4456,8 +4457,8 @@ class BufferedDC(DC):
     `wx.BufferedPaintDC`.
 
     Please note that GTK+ 2.0 and OS X provide double buffering themselves
     `wx.BufferedPaintDC`.
 
     Please note that GTK+ 2.0 and OS X provide double buffering themselves
-    natively so using this class on those platforms will normally result
-    in an unneeded level of buffering.
+    natively. wxBufferedDC is aware of this however, and will bypass the buffering
+    unless an explicit buffer bitmap is given.
 
     """
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
 
     """
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
@@ -4466,7 +4467,6 @@ class BufferedDC(DC):
         """
         __init__(self, DC dc, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedDC
         __init__(self, DC dc, Size area, int style=BUFFER_CLIENT_AREA) -> BufferedDC
         """
         __init__(self, DC dc, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedDC
         __init__(self, DC dc, Size area, int style=BUFFER_CLIENT_AREA) -> BufferedDC
-        __init__(self, Window win, DC dc, Size area, int style=BUFFER_CLIENT_AREA) -> BufferedDC
 
         Constructs a buffered DC.
         """
 
         Constructs a buffered DC.
         """
@@ -4674,10 +4674,24 @@ class AutoBufferedPaintDC(_AutoBufferedPaintDCBase):
     """
     If the current platform double buffers by default then this DC is the
     same as a plain `wx.PaintDC`, otherwise it is a `wx.BufferedPaintDC`.
     """
     If the current platform double buffers by default then this DC is the
     same as a plain `wx.PaintDC`, otherwise it is a `wx.BufferedPaintDC`.
+
+    :see: `wx.AutoBufferedPaintDCFactory`
     """
     def __init__(self, window):
         _AutoBufferedPaintDCBase.__init__(self, window)
 
     """
     def __init__(self, window):
         _AutoBufferedPaintDCBase.__init__(self, window)
 
+
+def AutoBufferedPaintDCFactory(*args, **kwargs):
+  """
+    AutoBufferedPaintDCFactory(Window window) -> DC
+
+    Checks if the window is natively double buffered and will return a
+    `wx.PaintDC` if it is, a `wx.BufferedPaintDC` otherwise.  The
+    advantage of this function over `wx.AutoBufferedPaintDC` is that this
+    function will check if the the specified window supports has
+    double-buffering enabled rather than just going by platform defaults.
+    """
+  return _gdi_.AutoBufferedPaintDCFactory(*args, **kwargs)
 #---------------------------------------------------------------------------
 
 class MirrorDC(DC):
 #---------------------------------------------------------------------------
 
 class MirrorDC(DC):
@@ -5008,9 +5022,9 @@ class GraphicsContext(object):
         """StrokeLines(self, List points)"""
         return _gdi_.GraphicsContext_StrokeLines(*args, **kwargs)
 
         """StrokeLines(self, List points)"""
         return _gdi_.GraphicsContext_StrokeLines(*args, **kwargs)
 
-    def StrokeDisconnectedLines(*args, **kwargs):
-        """StrokeDisconnectedLines(self, PyObject beginPoints, PyObject endPoints)"""
-        return _gdi_.GraphicsContext_StrokeDisconnectedLines(*args, **kwargs)
+    def StrokeLineSegements(*args, **kwargs):
+        """StrokeLineSegements(self, PyObject beginPoints, PyObject endPoints)"""
+        return _gdi_.GraphicsContext_StrokeLineSegements(*args, **kwargs)
 
     def DrawLines(*args, **kwargs):
         """DrawLines(self, size_t points, int fillStyle=WINDING_RULE)"""
 
     def DrawLines(*args, **kwargs):
         """DrawLines(self, size_t points, int fillStyle=WINDING_RULE)"""