X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f89238b9fe8396c67b3a12a469a930c9eb6e4be6..4976f9967a2dd37dc501e187d7b13a1e6ca22966:/wxPython/src/gtk/_gdi.py?ds=sidebyside diff --git a/wxPython/src/gtk/_gdi.py b/wxPython/src/gtk/_gdi.py index ca0399ca24..a70a8ba74f 100644 --- a/wxPython/src/gtk/_gdi.py +++ b/wxPython/src/gtk/_gdi.py @@ -2317,12 +2317,12 @@ class FontEnumerator(object): def __init__(self, *args, **kwargs): """__init__(self) -> FontEnumerator""" _gdi_.FontEnumerator_swiginit(self,_gdi_.new_FontEnumerator(*args, **kwargs)) - self._setCallbackInfo(self, FontEnumerator, 0) + FontEnumerator._setCallbackInfo(self, self, FontEnumerator) __swig_destroy__ = _gdi_.delete_FontEnumerator __del__ = lambda self : None; def _setCallbackInfo(*args, **kwargs): - """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)""" + """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=0)""" return _gdi_.FontEnumerator__setCallbackInfo(*args, **kwargs) def EnumerateFacenames(*args, **kwargs): @@ -2784,7 +2784,7 @@ class PyLocale(Locale): def __init__(self, *args, **kwargs): """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> PyLocale""" _gdi_.PyLocale_swiginit(self,_gdi_.new_PyLocale(*args, **kwargs)) - self._setCallbackInfo(self, PyLocale) + PyLocale._setCallbackInfo(self, self, PyLocale) __swig_destroy__ = _gdi_.delete_PyLocale __del__ = lambda self : None; @@ -4730,7 +4730,11 @@ class BufferedDC(MemoryDC): 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 + # save a ref so the other dc will not be deleted before self + self.__dc = args[0] + # also save a ref to the bitmap + if len(args) > 1: self.__bmp = args[1] + __swig_destroy__ = _gdi_.delete_BufferedDC __del__ = lambda self : None; @@ -4787,6 +4791,8 @@ class BufferedPaintDC(BufferedDC): 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) #--------------------------------------------------------------------------- @@ -5059,22 +5065,13 @@ _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 + matrix. The contents are specific and 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') + def __init__(self): raise AttributeError, "No constructor defined" __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): @@ -5095,6 +5092,14 @@ class GraphicsMatrix(GraphicsObject): """ 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) @@ -5107,7 +5112,8 @@ class GraphicsMatrix(GraphicsObject): """ IsEqual(self, GraphicsMatrix t) -> bool - Returns ``True`` if the elements of the transformation matrix are equal + Returns ``True`` if the elements of the transformation matrix are + equal """ return _gdi_.GraphicsMatrix_IsEqual(*args, **kwargs) @@ -5176,10 +5182,8 @@ _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') + def __init__(self): raise AttributeError, "No constructor defined" __repr__ = _swig_repr - def __init__(self, *args, **kwargs): - """__init__(self) -> GraphicsPath""" - _gdi_.GraphicsPath_swiginit(self,_gdi_.new_GraphicsPath(*args, **kwargs)) __swig_destroy__ = _gdi_.delete_GraphicsPath __del__ = lambda self : None; def MoveToPoint(*args): @@ -5238,9 +5242,9 @@ class GraphicsPath(GraphicsObject): def AddArc(*args): """ AddArc(self, Double x, Double y, Double r, Double startAngle, Double endAngle, - bool clockwise) + bool clockwise=True) AddArc(self, Point2D c, Double r, Double startAngle, Double endAngle, - bool clockwise) + bool clockwise=True) Adds an arc of a circle centering at (x,y) with radius (r) from startAngle to endAngle @@ -5276,8 +5280,8 @@ class GraphicsPath(GraphicsObject): """ AddArcToPoint(self, Double x1, Double y1, Double x2, Double y2, Double r) - Appends an arc to two tangents connecting (current) to (x1,y1) and (x1,y1) - to (x2,y2), also a straight line from (current) to (x1,y1) + Appends an arc to two tangents connecting (current) to (x1,y1) and + (x1,y1) to (x2,y2), also a straight line from (current) to (x1,y1) """ return _gdi_.GraphicsPath_AddArcToPoint(*args, **kwargs) @@ -5327,16 +5331,17 @@ class GraphicsPath(GraphicsObject): def GetBox(*args, **kwargs): """ - GetBox(self) -> wxRect2DDouble + GetBox(self) -> Rect2D - Gets the bounding box enclosing all points (possibly including control points) + Gets the bounding box enclosing all points (possibly including control + points) """ return _gdi_.GraphicsPath_GetBox(*args, **kwargs) def Contains(*args): """ Contains(self, Double x, Double y, int fillStyle=ODDEVEN_RULE) -> bool - Contains(self, wxPoint2DDouble c, int fillStyle=ODDEVEN_RULE) -> bool + Contains(self, Point2D c, int fillStyle=ODDEVEN_RULE) -> bool Returns ``True`` if the point is within the path. """ @@ -5384,9 +5389,9 @@ class GraphicsContext(GraphicsObject): """ CreateFromNative(void context) -> GraphicsContext - Creates a wx.GraphicsContext from a native context. This native context - must be eg a CGContextRef for Core Graphics, a Graphics pointer for - GDIPlus or a cairo_t pointer for Cairo. + Creates a wx.GraphicsContext from a native context. This native + context must be eg a CGContextRef for Core Graphics, a Graphics + pointer for GDIPlus or a cairo_t pointer for Cairo. """ return _gdi_.GraphicsContext_CreateFromNative(*args, **kwargs) @@ -5439,8 +5444,8 @@ class GraphicsContext(GraphicsObject): CreateRadialGradientBrush(self, Double xo, Double yo, Double xc, Double yc, Double radius, Colour oColor, Colour cColor) -> GraphicsBrush - Creates a native brush, having a radial gradient originating at - point (xo,yc) with color oColour and ends on a circle around (xc,yc) with + Creates a native brush, having a radial gradient originating at point + (xo,yc) with color oColour and ends on a circle around (xc,yc) with radius r and color cColour. """ return _gdi_.GraphicsContext_CreateRadialGradientBrush(*args, **kwargs) @@ -5467,7 +5472,8 @@ class GraphicsContext(GraphicsObject): """ PushState(self) - push the current state of the context, ie the transformation matrix on a stack + Push the current state of the context, (ie the transformation matrix) + on a stack """ return _gdi_.GraphicsContext_PushState(*args, **kwargs) @@ -5475,7 +5481,7 @@ class GraphicsContext(GraphicsObject): """ PopState(self) - pops a stored state from the stack + Pops a stored state from the stack """ return _gdi_.GraphicsContext_PopState(*args, **kwargs) @@ -5512,6 +5518,22 @@ class GraphicsContext(GraphicsObject): """ return _gdi_.GraphicsContext_GetNativeContext(*args, **kwargs) + def GetLogicalFunction(*args, **kwargs): + """ + GetLogicalFunction(self) -> int + + Returns the current logical function. + """ + return _gdi_.GraphicsContext_GetLogicalFunction(*args, **kwargs) + + def SetLogicalFunction(*args, **kwargs): + """ + SetLogicalFunction(self, int function) -> bool + + Sets the current logical function, returns ``True`` if it supported + """ + return _gdi_.GraphicsContext_SetLogicalFunction(*args, **kwargs) + def Translate(*args, **kwargs): """ Translate(self, Double dx, Double dy) @@ -5622,7 +5644,12 @@ class GraphicsContext(GraphicsObject): return _gdi_.GraphicsContext_DrawText(*args, **kwargs) def DrawRotatedText(*args, **kwargs): - """DrawRotatedText(self, String str, Double x, Double y, Double angle, GraphicsBrush backgroundBrush=NullGraphicsBrush)""" + """ + DrawRotatedText(self, String str, Double x, Double y, Double angle, GraphicsBrush backgroundBrush=NullGraphicsBrush) + + Draws a text string at the defined position, at the specified angle, + which is given in radians. + """ return _gdi_.GraphicsContext_DrawRotatedText(*args, **kwargs) def GetFullTextExtent(*args, **kwargs): @@ -5771,9 +5798,9 @@ def GraphicsContext_CreateFromNative(*args, **kwargs): """ GraphicsContext_CreateFromNative(void context) -> GraphicsContext - Creates a wx.GraphicsContext from a native context. This native context - must be eg a CGContextRef for Core Graphics, a Graphics pointer for - GDIPlus or a cairo_t pointer for Cairo. + Creates a wx.GraphicsContext from a native context. This native + context must be eg a CGContextRef for Core Graphics, a Graphics + pointer for GDIPlus or a cairo_t pointer for Cairo. """ return _gdi_.GraphicsContext_CreateFromNative(*args, **kwargs) @@ -5863,9 +5890,12 @@ class GCDC(DC): """Proxy of C++ GCDC 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, WindowDC dc) -> GCDC""" - _gdi_.GCDC_swiginit(self,_gdi_.new_GCDC(*args, **kwargs)) + def __init__(self, *args): + """ + __init__(self, WindowDC dc) -> GCDC + __init__(self, Window window) -> GCDC + """ + _gdi_.GCDC_swiginit(self,_gdi_.new_GCDC(*args)) self.__dc = args[0] # save a ref so the other dc will not be deleted before self __swig_destroy__ = _gdi_.delete_GCDC @@ -6534,17 +6564,17 @@ class RendererNative(object): def DrawHeaderButton(*args, **kwargs): """ DrawHeaderButton(self, Window win, DC dc, Rect rect, int flags=0, int sortArrow=HDR_SORT_ICON_NONE, - HeaderButtonParams params=None) + HeaderButtonParams params=None) -> int - Draw the header control button (such as what is used by `wx.ListCtrl` - in report mode.) + Draw a header control button (such as what is used by `wx.ListCtrl` in report + mode.) The optimal size of the label (text and icons) is returned. """ return _gdi_.RendererNative_DrawHeaderButton(*args, **kwargs) def DrawHeaderButtonContents(*args, **kwargs): """ DrawHeaderButtonContents(self, Window win, DC dc, Rect rect, int flags=0, int sortArrow=HDR_SORT_ICON_NONE, - HeaderButtonParams params=None) + HeaderButtonParams params=None) -> int Draw the contents of a header control button, (label, sort arrows, etc.) Normally this is only called by `DrawHeaderButton`. @@ -6863,7 +6893,7 @@ class PseudoDC(_core.Object): def FindObjects(*args, **kwargs): """ - FindObjects(self, int x, int y, int radius=1, wxColor bg=*wxWHITE) -> PyObject + FindObjects(self, int x, int y, int radius=1, Colour bg=*wxWHITE) -> PyObject Returns a list of all the id's that draw a pixel with color not equal to bg within radius of (x,y).