X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e676f137e7c161ca889e84ed3a687396f8620533..f62262aacfac8b03ad7b8aca946c4fd5717b6c2e:/wxPython/src/_dc.i?ds=sidebyside diff --git a/wxPython/src/_dc.i b/wxPython/src/_dc.i index af1c7c0425..38162ff448 100644 --- a/wxPython/src/_dc.i +++ b/wxPython/src/_dc.i @@ -354,6 +354,57 @@ position.", " BlitPointSize); + DocDeclStr( + bool , StretchBlit(wxCoord dstX, wxCoord dstY, + wxCoord dstWidth, wxCoord dstHeight, + wxDC *source, + wxCoord srcX, wxCoord srcY, + wxCoord srcWidth, wxCoord srcHeight, + int rop = wxCOPY, bool useMask = false, + wxCoord srcMaskX = wxDefaultCoord, + wxCoord srcMaskY = wxDefaultCoord), + "Copy from a source DC to this DC, specifying the destination +coordinates, destination size, source DC, source coordinates, size of +source area to copy, logical function, whether to use a bitmap mask, +and mask source position.", " + + :param xdest: Destination device context x position. + :param ydest: Destination device context y position. + :param dstWidth: Width of destination area. + :param dstHeight: Height of destination area. + :param source: Source device context. + :param xsrc: Source device context x position. + :param ysrc: Source device context y position. + :param srcWidth: Width of source area to be copied. + :param srcHeight: Height of source area to be copied. + :param logicalFunc: Logical function to use: see `SetLogicalFunction`. + :param useMask: If true, StretchBlit does a transparent blit using + the mask that is associated with the bitmap selected + into the source device context. + :param xsrcMask: Source x position on the mask. If both xsrcMask and + ysrcMask are -1, xsrc and ysrc will be assumed for + the mask source position. Currently only implemented + on Windows. + :param ysrcMask: Source y position on the mask. +"); + + + + DocDeclStrName( + bool , StretchBlit(const wxPoint& dstPt, const wxSize& dstSize, + wxDC *source, const wxPoint& srcPt, const wxSize& srcSize, + int rop = wxCOPY, bool useMask = false, + const wxPoint& srcMaskPt = wxDefaultPosition), + "Copy from a source DC to this DC, specifying the destination +coordinates, destination size, source DC, source coordinates, size of +source area to copy, logical function, whether to use a bitmap mask, +and mask source position. This version is the same as `StretchBlit` +except `wx.Point` and `wx.Size` objects are used instead of individual +position and size components.", "", + StretchBlitPointSize); + + + DocDeclStr( wxBitmap , GetAsBitmap(const wxRect *subrect = NULL) const, "", ""); @@ -579,7 +630,7 @@ works for single line strings.", ""); DocDeclAStrName( void, GetTextExtent(const wxString& string, wxCoord *OUTPUT, wxCoord *OUTPUT, wxCoord *OUTPUT, wxCoord* OUTPUT, - wxFont* font = NULL), + const wxFont* font = NULL), "GetFullTextExtent(wxString string, Font font=None) ->\n (width, height, descent, externalLeading)", "Get the width, height, decent and leading of the text using the current or specified font. Only works for single line strings.", "", @@ -590,7 +641,7 @@ current or specified font. Only works for single line strings.", "", DocDeclAStr( void, GetMultiLineTextExtent(const wxString& text, wxCoord *OUTPUT, wxCoord *OUTPUT, wxCoord *OUTPUT, - wxFont *font = NULL), + const wxFont *font = NULL), "GetMultiLineTextExtent(wxString string, Font font=None) ->\n (width, height, lineHeight)", "Get the width, height, and line height of the text using the current or specified font. Works for single as well as multi-line @@ -1487,7 +1538,8 @@ destroyed safely.", ""); enum { wxBUFFER_VIRTUAL_AREA, - wxBUFFER_CLIENT_AREA + wxBUFFER_CLIENT_AREA, + wxBUFFER_USES_SHARED_BUFFER }; MustHaveApp(wxBufferedDC); @@ -1521,10 +1573,6 @@ that already do it automatically. class wxBufferedDC : public wxMemoryDC { public: - %pythonAppend wxBufferedDC - "self.__dc = args[0] # save a ref so the other dc will not be deleted before self"; - - %nokwargs wxBufferedDC; DocStr( wxBufferedDC, @@ -1550,8 +1598,16 @@ public: intended to cover the entire virtual size of a `wx.ScrolledWindow` or if it only covers the client area. Acceptable values are ``wx.BUFFER_VIRTUAL_AREA`` and ``wx.BUFFER_CLIENT_AREA``. - "); + + %nokwargs wxBufferedDC; + %pythonAppend wxBufferedDC +"# 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] +"; + wxBufferedDC( wxDC* dc, wxBitmap& buffer=wxNullBitmap, int style = wxBUFFER_CLIENT_AREA ); @@ -1610,6 +1666,8 @@ class wxBufferedPaintDC : public wxBufferedDC { public: + %pythonAppend wxBufferedPaintDC "if len(args) > 1: self.__bmp = args[1]"; + DocCtorStr( wxBufferedPaintDC( wxWindow *window, wxBitmap &buffer = wxNullBitmap, @@ -1832,5 +1890,23 @@ public: }; #endif +//--------------------------------------------------------------------------- + +%{ +#include +%} + +class wxSVGFileDC : public wxDC +{ + %nokwargs wxSVGFileDC; + + wxSVGFileDC(wxString f); + wxSVGFileDC(wxString f, int Width, int Height); + wxSVGFileDC(wxString f, int Width, int Height, float dpi); + + ~wxSVGFileDC(); + +}; + //--------------------------------------------------------------------------- //---------------------------------------------------------------------------