+ def __init__(self, *args):
+ """
+ __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
+
+ Constructs a buffered DC.
+ """
+ _gdi_.BufferedDC_swiginit(self,_gdi_.new_BufferedDC(*args))
+ self.__dc = args[0] # save a ref so the other dc will not be deleted before self
+
+ __swig_destroy__ = _gdi_.delete_BufferedDC
+ __del__ = lambda self : None;
+ def UnMask(*args, **kwargs):
+ """
+ UnMask(self)
+
+ Blits the buffer to the dc, and detaches the dc from the buffer (so it
+ can be effectively used once only). This is usually only called in
+ the destructor.
+ """
+ return _gdi_.BufferedDC_UnMask(*args, **kwargs)
+
+ def SetStyle(*args, **kwargs):
+ """SetStyle(self, int style)"""
+ return _gdi_.BufferedDC_SetStyle(*args, **kwargs)
+
+ def GetStyle(*args, **kwargs):
+ """GetStyle(self) -> int"""
+ return _gdi_.BufferedDC_GetStyle(*args, **kwargs)
+
+_gdi_.BufferedDC_swigregister(BufferedDC)
+
+class BufferedPaintDC(BufferedDC):
+ """
+ This is a subclass of `wx.BufferedDC` which can be used inside of an
+ EVT_PAINT event handler. Just create an object of this class instead
+ of `wx.PaintDC` and that's all you have to do to (mostly) avoid
+ flicker. The only thing to watch out for is that if you are using this
+ class together with `wx.ScrolledWindow`, you probably do **not** want
+ to call `wx.Window.PrepareDC` on it as it already does this internally
+ for the real underlying `wx.PaintDC`.
+
+ If your window is already fully buffered in a `wx.Bitmap` then your
+ EVT_PAINT handler can be as simple as just creating a
+ ``wx.BufferedPaintDC`` as it will `Blit` the buffer to the window
+ automatically when it is destroyed. For example::
+
+ def OnPaint(self, event):
+ dc = wx.BufferedPaintDC(self, self.buffer)
+
+
+
+ """
+ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args, **kwargs):
+ """
+ __init__(self, Window window, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedPaintDC
+
+ Create a buffered paint DC. As with `wx.BufferedDC`, you may either
+ provide the bitmap to be used for buffering or let this object create
+ one internally (in the latter case, the size of the client part of the
+ window is automatically used).
+ """
+ _gdi_.BufferedPaintDC_swiginit(self,_gdi_.new_BufferedPaintDC(*args, **kwargs))
+_gdi_.BufferedPaintDC_swigregister(BufferedPaintDC)
+
+#---------------------------------------------------------------------------
+
+class AutoBufferedPaintDC(DC):
+ """
+ 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`
+
+ """
+ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args, **kwargs):
+ """
+ __init__(self, Window win) -> AutoBufferedPaintDC
+
+ 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`
+
+ """
+ _gdi_.AutoBufferedPaintDC_swiginit(self,_gdi_.new_AutoBufferedPaintDC(*args, **kwargs))
+_gdi_.AutoBufferedPaintDC_swigregister(AutoBufferedPaintDC)
+
+
+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 has double-buffering enabled rather than just
+ going by platform defaults.
+ """
+ return _gdi_.AutoBufferedPaintDCFactory(*args, **kwargs)
+#---------------------------------------------------------------------------
+
+class MirrorDC(DC):
+ """
+ wx.MirrorDC is a simple wrapper class which is always associated with a
+ real `wx.DC` object and either forwards all of its operations to it
+ without changes (no mirroring takes place) or exchanges x and y
+ coordinates which makes it possible to reuse the same code to draw a
+ figure and its mirror -- i.e. reflection related to the diagonal line
+ x == y.
+ """
+ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args, **kwargs):
+ """
+ __init__(self, DC dc, bool mirror) -> MirrorDC
+
+ Creates a mirrored DC associated with the real *dc*. Everything drawn
+ on the wx.MirrorDC will appear on the *dc*, and will be mirrored if
+ *mirror* is True.
+ """
+ _gdi_.MirrorDC_swiginit(self,_gdi_.new_MirrorDC(*args, **kwargs))
+_gdi_.MirrorDC_swigregister(MirrorDC)
+
+#---------------------------------------------------------------------------
+
+class PostScriptDC(DC):
+ """This is a `wx.DC` that can write to PostScript files on any platform."""
+ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args, **kwargs):
+ """
+ __init__(self, wxPrintData printData) -> PostScriptDC
+
+ Constructs a PostScript printer device context from a `wx.PrintData`
+ object.
+ """
+ _gdi_.PostScriptDC_swiginit(self,_gdi_.new_PostScriptDC(*args, **kwargs))
+ def GetPrintData(*args, **kwargs):
+ """GetPrintData(self) -> wxPrintData"""
+ return _gdi_.PostScriptDC_GetPrintData(*args, **kwargs)
+
+ def SetPrintData(*args, **kwargs):
+ """SetPrintData(self, wxPrintData data)"""
+ return _gdi_.PostScriptDC_SetPrintData(*args, **kwargs)
+
+ def SetResolution(*args, **kwargs):
+ """
+ SetResolution(int ppi)
+
+ Set resolution (in pixels per inch) that will be used in PostScript
+ output. Default is 720ppi.
+ """
+ return _gdi_.PostScriptDC_SetResolution(*args, **kwargs)
+
+ SetResolution = staticmethod(SetResolution)
+ def GetResolution(*args, **kwargs):
+ """
+ GetResolution() -> int
+
+ Return resolution used in PostScript output.
+ """
+ return _gdi_.PostScriptDC_GetResolution(*args, **kwargs)
+
+ GetResolution = staticmethod(GetResolution)
+ PrintData = property(GetPrintData,SetPrintData,doc="See `GetPrintData` and `SetPrintData`")
+_gdi_.PostScriptDC_swigregister(PostScriptDC)
+
+def PostScriptDC_SetResolution(*args, **kwargs):
+ """
+ PostScriptDC_SetResolution(int ppi)
+
+ Set resolution (in pixels per inch) that will be used in PostScript
+ output. Default is 720ppi.
+ """
+ return _gdi_.PostScriptDC_SetResolution(*args, **kwargs)
+
+def PostScriptDC_GetResolution(*args):
+ """
+ PostScriptDC_GetResolution() -> int
+
+ Return resolution used in PostScript output.
+ """
+ return _gdi_.PostScriptDC_GetResolution(*args)
+
+#---------------------------------------------------------------------------
+
+class MetaFile(_core.Object):
+ """Proxy of C++ MetaFile class"""
+ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args, **kwargs):
+ """__init__(self, String filename=EmptyString) -> MetaFile"""
+ _gdi_.MetaFile_swiginit(self,_gdi_.new_MetaFile(*args, **kwargs))
+ __swig_destroy__ = _gdi_.delete_MetaFile
+ __del__ = lambda self : None;
+ def IsOk(*args, **kwargs):
+ """IsOk(self) -> bool"""
+ return _gdi_.MetaFile_IsOk(*args, **kwargs)
+
+ Ok = IsOk
+ def SetClipboard(*args, **kwargs):
+ """SetClipboard(self, int width=0, int height=0) -> bool"""
+ return _gdi_.MetaFile_SetClipboard(*args, **kwargs)
+
+ def GetSize(*args, **kwargs):
+ """GetSize(self) -> Size"""
+ return _gdi_.MetaFile_GetSize(*args, **kwargs)
+
+ def GetWidth(*args, **kwargs):
+ """GetWidth(self) -> int"""
+ return _gdi_.MetaFile_GetWidth(*args, **kwargs)
+
+ def GetHeight(*args, **kwargs):
+ """GetHeight(self) -> int"""
+ return _gdi_.MetaFile_GetHeight(*args, **kwargs)
+
+ def __nonzero__(self): return self.IsOk()
+_gdi_.MetaFile_swigregister(MetaFile)
+
+class MetaFileDC(DC):
+ """Proxy of C++ MetaFileDC class"""
+ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args, **kwargs):