]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/_gdi.py
Ref counting overview.
[wxWidgets.git] / wxPython / src / msw / _gdi.py
index 21407a9ad2db6cf479f023d6295872609d02ebed..97c169cf0b165efa02b0ed7b4325c893e69dfd8f 100644 (file)
@@ -4484,7 +4484,7 @@ class MemoryDC(DC):
 
         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
 
@@ -4496,13 +4496,14 @@ class MemoryDC(DC):
     __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
-        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):
@@ -4536,7 +4537,7 @@ def MemoryDCFromDC(*args, **kwargs):
 
 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
@@ -4549,8 +4550,8 @@ class BufferedDC(DC):
     `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')
@@ -4559,7 +4560,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, Window win, DC dc, Size area, int style=BUFFER_CLIENT_AREA) -> BufferedDC
 
         Constructs a buffered DC.
         """
@@ -4767,10 +4767,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`.
+
+    :see: `wx.AutoBufferedPaintDCFactory`
     """
     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):
@@ -5133,9 +5147,9 @@ class GraphicsContext(object):
         """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)"""