]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/dcsvg.h
Allow overriding print preview frame creation in docview.
[wxWidgets.git] / interface / wx / dcsvg.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: dcsvg.h
3 // Purpose: interface of wxSVGFileDC
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 @class wxSVGFileDC
11
12 A wxSVGFileDC is a device context onto which graphics and text can be
13 drawn, and the output produced as a vector file, in SVG format (see the W3C
14 SVG Specifications <http://www.w3.org/TR/2001/REC-SVG-20010904/>). This
15 format can be read by a range of programs, including a Netscape plugin
16 (Adobe), full details are given in the SVG Implementation and Resource
17 Directory <http://www.svgi.org/>. Vector formats may often be smaller than
18 raster formats.
19
20 The intention behind wxSVGFileDC is that it can be used to produce a file
21 corresponding to the screen display context, wxSVGFileDC, by passing the
22 wxSVGFileDC as a parameter instead of a wxSVGFileDC. Thus the wxSVGFileDC
23 is a write-only class.
24
25 As the wxSVGFileDC is a vector format, raster operations like GetPixel()
26 are unlikely to be supported. However, the SVG specification allows for PNG
27 format raster files to be embedded in the SVG, and so bitmaps, icons and
28 blit operations in wxSVGFileDC are supported.
29
30 A more substantial SVG library (for reading and writing) is available at
31 the wxArt2D website <http://wxart2d.sourceforge.net/>.
32
33 @library{wxcore}
34 @category{dc}
35 */
36 class wxSVGFileDC : public wxDC
37 {
38 public:
39 /**
40 Initializes a wxSVGFileDC with the given @a f filename with the given
41 @a Width and @a Height at @a dpi resolution.
42 */
43 wxSVGFileDC(const wxString& filename, int width = 320, int height = 240, double dpi = 72);
44
45 /**
46 Destructor.
47 */
48 virtual ~wxSVGFileDC();
49
50 /**
51 Does nothing.
52 */
53 void EndDoc();
54
55 /**
56 Does nothing.
57 */
58 void EndPage();
59
60 /**
61 This makes no sense in wxSVGFileDC and does nothing.
62 */
63 void Clear();
64
65 /**
66 Does the same as wxDC::SetLogicalFunction(), except that only wxCOPY is
67 available. Trying to set one of the other values will fail.
68 */
69 void SetLogicalFunction(wxRasterOperationMode function);
70
71 //@{
72 /**
73 Functions not implemented in this DC class.
74 */
75 void CrossHair(wxCoord x, wxCoord y);
76 void DestroyClippingRegion();
77 bool FloodFill(wxCoord x, wxCoord y, const wxColour& colour,
78 wxFloodFillStyle style = wxFLOOD_SURFACE);
79 void GetClippingBox(wxCoord *x, wxCoord *y, wxCoord *width, wxCoord *height) const;
80 bool GetPixel(wxCoord x, wxCoord y, wxColour* colour) const;
81 void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width,
82 wxCoord height);
83 void SetClippingRegion(const wxPoint& pt, const wxSize& sz);
84 void SetClippingRegion(const wxRect& rect);
85 void SetClippingRegion(const wxRegion& region);
86 void SetPalette(const wxPalette& palette);
87 bool StartDoc(const wxString& message);
88 //@}
89 };
90