+ __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))
+ if len(args) > 1: self.__bmp = args[1]
+
+_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))
+_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):
+ """
+ __init__(self, String filename=EmptyString, int width=0, int height=0,
+ String description=EmptyString) -> MetaFileDC
+ """
+ _gdi_.MetaFileDC_swiginit(self,_gdi_.new_MetaFileDC(*args, **kwargs))
+_gdi_.MetaFileDC_swigregister(MetaFileDC)
+
+class PrinterDC(DC):
+ """Proxy of C++ PrinterDC 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, wxPrintData printData) -> PrinterDC"""
+ _gdi_.PrinterDC_swiginit(self,_gdi_.new_PrinterDC(*args, **kwargs))
+_gdi_.PrinterDC_swigregister(PrinterDC)
+
+#---------------------------------------------------------------------------
+
+class GraphicsObject(_core.Object):
+ """
+ This class is the superclass of native graphics objects like pens
+ etc. It provides the internal reference counting. It is not to be
+ instantiated by user code.
+ """
+ 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, GraphicsRenderer renderer=None) -> GraphicsObject
+
+ This class is the superclass of native graphics objects like pens
+ etc. It provides the internal reference counting. It is not to be
+ instantiated by user code.
+ """
+ _gdi_.GraphicsObject_swiginit(self,_gdi_.new_GraphicsObject(*args, **kwargs))
+ __swig_destroy__ = _gdi_.delete_GraphicsObject
+ __del__ = lambda self : None;
+ def IsNull(*args, **kwargs):
+ """
+ IsNull(self) -> bool
+
+ Is this object valid (false) or still empty (true)?
+ """
+ return _gdi_.GraphicsObject_IsNull(*args, **kwargs)
+
+ def GetRenderer(*args, **kwargs):
+ """
+ GetRenderer(self) -> GraphicsRenderer
+
+ Returns the renderer that was used to create this instance, or
+ ``None`` if it has not been initialized yet.
+ """
+ return _gdi_.GraphicsObject_GetRenderer(*args, **kwargs)
+
+_gdi_.GraphicsObject_swigregister(GraphicsObject)
+
+class GraphicsPen(GraphicsObject):
+ """
+ A wx.GraphicsPen is a native representation of a pen. It is used for
+ stroking a path on a `wx.GraphicsContext`. The contents are specific and
+ private to the respective renderer. The only way to get a valid instance
+ is via a CreatePen call on the graphics context or the renderer
+ instance.
+ """
+ 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) -> GraphicsPen
+
+ A wx.GraphicsPen is a native representation of a pen. It is used for
+ stroking a path on a `wx.GraphicsContext`. The contents are specific and
+ private to the respective renderer. The only way to get a valid instance
+ is via a CreatePen call on the graphics context or the renderer
+ instance.
+ """
+ _gdi_.GraphicsPen_swiginit(self,_gdi_.new_GraphicsPen(*args, **kwargs))
+ __swig_destroy__ = _gdi_.delete_GraphicsPen
+ __del__ = lambda self : None;
+_gdi_.GraphicsPen_swigregister(GraphicsPen)
+
+class GraphicsBrush(GraphicsObject):
+ """
+ A wx.GraphicsBrush is a native representation of a brush. It is used
+ for filling a path on a `wx.GraphicsContext`. The contents are
+ specific and private to the respective renderer. The only way to get a
+ valid instance is via a Create...Brush call on the graphics context or
+ the renderer instance.
+ """
+ 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) -> GraphicsBrush
+
+ A wx.GraphicsBrush is a native representation of a brush. It is used
+ for filling a path on a `wx.GraphicsContext`. The contents are
+ specific and private to the respective renderer. The only way to get a
+ valid instance is via a Create...Brush call on the graphics context or
+ the renderer instance.
+ """
+ _gdi_.GraphicsBrush_swiginit(self,_gdi_.new_GraphicsBrush(*args, **kwargs))
+ __swig_destroy__ = _gdi_.delete_GraphicsBrush
+ __del__ = lambda self : None;
+_gdi_.GraphicsBrush_swigregister(GraphicsBrush)
+
+class GraphicsFont(GraphicsObject):
+ """
+ A `wx.GraphicsFont` is a native representation of a font (including
+ text colour). The contents are specific an private to the respective
+ renderer. The only way to get a valid instance is via a CreateFont
+ call on the graphics context or the renderer instance.
+ """
+ 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) -> GraphicsFont
+
+ A `wx.GraphicsFont` is a native representation of a font (including
+ text colour). The contents are specific an private to the respective
+ renderer. The only way to get a valid instance is via a CreateFont
+ call on the graphics context or the renderer instance.
+ """
+ _gdi_.GraphicsFont_swiginit(self,_gdi_.new_GraphicsFont(*args, **kwargs))
+ __swig_destroy__ = _gdi_.delete_GraphicsFont
+ __del__ = lambda self : None;
+_gdi_.GraphicsFont_swigregister(GraphicsFont)
+
+class GraphicsMatrix(GraphicsObject):
+ """
+ A wx.GraphicsMatrix is a native representation of an affine
+ matrix. The contents are specific an private to the respective
+ renderer. The only way to get a valid instance is via a CreateMatrix
+ call on the graphics context or the renderer instance.
+ """
+ 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) -> GraphicsMatrix
+
+ A wx.GraphicsMatrix is a native representation of an affine
+ matrix. The contents are specific an private to the respective
+ renderer. The only way to get a valid instance is via a CreateMatrix
+ call on the graphics context or the renderer instance.
+ """
+ _gdi_.GraphicsMatrix_swiginit(self,_gdi_.new_GraphicsMatrix(*args, **kwargs))
+ __swig_destroy__ = _gdi_.delete_GraphicsMatrix
+ __del__ = lambda self : None;
+ def Concat(*args, **kwargs):
+ """
+ Concat(self, GraphicsMatrix t)
+
+ Concatenates the passed in matrix to the current matrix.
+ """
+ return _gdi_.GraphicsMatrix_Concat(*args, **kwargs)
+
+ def Set(*args, **kwargs):
+ """
+ Set(self, Double a=1.0, Double b=0.0, Double c=0.0, Double d=1.0,
+ Double tx=0.0, Double ty=0.0)
+
+ Sets the matrix to the specified values (default values are the
+ identity matrix.)
+ """
+ return _gdi_.GraphicsMatrix_Set(*args, **kwargs)
+
+ def Get(*args, **kwargs):
+ """
+ Get(self) --> (a, b, c, d, tx, ty)
+
+ Gets the component values of the matrix and returns them as a tuple.
+ """
+ return _gdi_.GraphicsMatrix_Get(*args, **kwargs)
+
+ def Invert(*args, **kwargs):
+ """
+ Invert(self)
+
+ Inverts the matrix.
+ """
+ return _gdi_.GraphicsMatrix_Invert(*args, **kwargs)
+
+ def IsEqual(*args, **kwargs):
+ """
+ IsEqual(self, GraphicsMatrix t) -> bool
+
+ Returns ``True`` if the elements of the transformation matrix are equal
+ """
+ return _gdi_.GraphicsMatrix_IsEqual(*args, **kwargs)
+
+ def IsIdentity(*args, **kwargs):
+ """
+ IsIdentity(self) -> bool
+
+ Returns ``True`` if this is the identity matrix
+ """
+ return _gdi_.GraphicsMatrix_IsIdentity(*args, **kwargs)
+
+ def Translate(*args, **kwargs):
+ """
+ Translate(self, Double dx, Double dy)
+
+ Add a translation to this matrix.
+ """
+ return _gdi_.GraphicsMatrix_Translate(*args, **kwargs)
+
+ def Scale(*args, **kwargs):
+ """
+ Scale(self, Double xScale, Double yScale)
+
+ Scales this matrix.
+ """
+ return _gdi_.GraphicsMatrix_Scale(*args, **kwargs)
+
+ def Rotate(*args, **kwargs):
+ """
+ Rotate(self, Double angle)
+
+ Rotates this matrix. The angle should be specified in radians.
+ """
+ return _gdi_.GraphicsMatrix_Rotate(*args, **kwargs)
+
+ def TransformPoint(*args, **kwargs):
+ """
+ TransformPoint(self, x, y) --> (x, y)
+
+ Applies this matrix to a point, returns the resulting point values
+ """
+ return _gdi_.GraphicsMatrix_TransformPoint(*args, **kwargs)
+
+ def TransformDistance(*args, **kwargs):
+ """
+ TransformDistance(self, dx, dy) --> (dx, dy)
+
+ Applies this matrix to a distance (ie. performs all transforms except
+ translations)
+ """
+ return _gdi_.GraphicsMatrix_TransformDistance(*args, **kwargs)
+
+ def GetNativeMatrix(*args, **kwargs):
+ """
+ GetNativeMatrix(self) -> void
+
+ Returns the native representation of the matrix. For CoreGraphics this
+ is a CFAffineMatrix pointer. For GDIPlus a Matrix Pointer and for
+ Cairo a cairo_matrix_t pointer. NOTE: For wxPython we still need a
+ way to make this value usable.
+ """
+ return _gdi_.GraphicsMatrix_GetNativeMatrix(*args, **kwargs)
+
+_gdi_.GraphicsMatrix_swigregister(GraphicsMatrix)
+
+class GraphicsPath(GraphicsObject):
+ """Proxy of C++ GraphicsPath class"""
+ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')