X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/526954c5968baa29218c994ec48e476ae2bd4b9f..9e9574fe45b176ee74bba8fad7574cf9906145d1:/interface/wx/dcsvg.h?ds=inline diff --git a/interface/wx/dcsvg.h b/interface/wx/dcsvg.h index cfc8027d46..23ad44c6b4 100644 --- a/interface/wx/dcsvg.h +++ b/interface/wx/dcsvg.h @@ -2,7 +2,6 @@ // Name: dcsvg.h // Purpose: interface of wxSVGFileDC // Author: wxWidgets team -// RCS-ID: $Id$ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -10,16 +9,15 @@ @class wxSVGFileDC A wxSVGFileDC is a device context onto which graphics and text can be - drawn, and the output produced as a vector file, in SVG format (see the W3C - SVG Specifications ). This - format can be read by a range of programs, including a Netscape plugin - (Adobe), full details are given in the SVG Implementation and Resource - Directory . Vector formats may often be smaller than - raster formats. + drawn, and the output produced as a vector file, in SVG format. + + This format can be read by a range of programs, including a Netscape plugin + (Adobe) and the open source Inkscape program (http://inkscape.org/). Full + details are given in the W3C SVG recommendation (http://www.w3.org/TR/SVG/). The intention behind wxSVGFileDC is that it can be used to produce a file corresponding to the screen display context, wxSVGFileDC, by passing the - wxSVGFileDC as a parameter instead of a wxSVGFileDC. Thus the wxSVGFileDC + wxSVGFileDC as a parameter instead of a wxDC. Thus the wxSVGFileDC is a write-only class. As the wxSVGFileDC is a vector format, raster operations like GetPixel() @@ -68,21 +66,52 @@ public: */ void SetLogicalFunction(wxRasterOperationMode function); + /** + Sets the clipping region for this device context to the intersection of + the given region described by the parameters of this method and the previously + set clipping region. + Clipping is implemented in the SVG output using SVG group elements (\), with + nested group elements being used to represent clipping region intersections when + two or more calls are made to SetClippingRegion(). + */ + void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, + wxCoord height); + + /** + This is an overloaded member function, provided for convenience. It differs from the + above function only in what argument(s) it accepts. + */ + void SetClippingRegion(const wxPoint& pt, const wxSize& sz); + + /** + This is an overloaded member function, provided for convenience. It differs from the + above function only in what argument(s) it accepts. + */ + void SetClippingRegion(const wxRect& rect); + + /** + This function is not implemented in this DC class. + It could be implemented in future if a GetPoints() function were made available on wxRegion. + */ + void SetClippingRegion(const wxRegion& region); + + /** + Destroys the current clipping region so that none of the DC is clipped. + Since intersections arising from sequential calls to SetClippingRegion are represented + with nested SVG group elements (\), all such groups are closed when + DestroyClippingRegion is called. + */ + void DestroyClippingRegion(); + //@{ /** Functions not implemented in this DC class. */ void CrossHair(wxCoord x, wxCoord y); - void DestroyClippingRegion(); bool FloodFill(wxCoord x, wxCoord y, const wxColour& colour, wxFloodFillStyle style = wxFLOOD_SURFACE); void GetClippingBox(wxCoord *x, wxCoord *y, wxCoord *width, wxCoord *height) const; bool GetPixel(wxCoord x, wxCoord y, wxColour* colour) const; - void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, - wxCoord height); - void SetClippingRegion(const wxPoint& pt, const wxSize& sz); - void SetClippingRegion(const wxRect& rect); - void SetClippingRegion(const wxRegion& region); void SetPalette(const wxPalette& palette); bool StartDoc(const wxString& message); //@}