]>
Commit | Line | Data |
---|---|---|
23324ae1 FM |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: dcsvg.h | |
e54c96f1 | 3 | // Purpose: interface of wxSVGFileDC |
23324ae1 FM |
4 | // Author: wxWidgets team |
5 | // RCS-ID: $Id$ | |
526954c5 | 6 | // Licence: wxWindows licence |
23324ae1 FM |
7 | ///////////////////////////////////////////////////////////////////////////// |
8 | ||
9 | /** | |
10 | @class wxSVGFileDC | |
7c913512 | 11 | |
3a7fb603 BP |
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. | |
7c913512 | 19 | |
23324ae1 | 20 | The intention behind wxSVGFileDC is that it can be used to produce a file |
3a7fb603 BP |
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. | |
7c913512 | 24 | |
3a7fb603 BP |
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. | |
7c913512 | 29 | |
3a7fb603 BP |
30 | A more substantial SVG library (for reading and writing) is available at |
31 | the wxArt2D website <http://wxart2d.sourceforge.net/>. | |
7c913512 | 32 | |
23324ae1 | 33 | @library{wxcore} |
3a7fb603 | 34 | @category{dc} |
23324ae1 FM |
35 | */ |
36 | class wxSVGFileDC : public wxDC | |
37 | { | |
38 | public: | |
1db8f1dc BP |
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 | */ | |
11e3af6e | 43 | wxSVGFileDC(const wxString& filename, int width = 320, int height = 240, double dpi = 72); |
23324ae1 FM |
44 | |
45 | /** | |
46 | Destructor. | |
47 | */ | |
adaaa686 | 48 | virtual ~wxSVGFileDC(); |
23324ae1 | 49 | |
23324ae1 | 50 | /** |
1db8f1dc | 51 | Does nothing. |
23324ae1 FM |
52 | */ |
53 | void EndDoc(); | |
54 | ||
23324ae1 | 55 | /** |
1db8f1dc | 56 | Does nothing. |
23324ae1 FM |
57 | */ |
58 | void EndPage(); | |
59 | ||
60 | /** | |
f045ad8d | 61 | This makes no sense in wxSVGFileDC and does nothing. |
23324ae1 | 62 | */ |
f045ad8d | 63 | void Clear(); |
23324ae1 FM |
64 | |
65 | /** | |
f045ad8d FM |
66 | Does the same as wxDC::SetLogicalFunction(), except that only wxCOPY is |
67 | available. Trying to set one of the other values will fail. | |
23324ae1 | 68 | */ |
f045ad8d | 69 | void SetLogicalFunction(wxRasterOperationMode function); |
23324ae1 FM |
70 | |
71 | //@{ | |
72 | /** | |
f045ad8d | 73 | Functions not implemented in this DC class. |
23324ae1 | 74 | */ |
f045ad8d FM |
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); | |
4ccf0566 | 79 | void GetClippingBox(wxCoord *x, wxCoord *y, wxCoord *width, wxCoord *height) const; |
0004982c | 80 | bool GetPixel(wxCoord x, wxCoord y, wxColour* colour) const; |
23324ae1 FM |
81 | void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, |
82 | wxCoord height); | |
7c913512 FM |
83 | void SetClippingRegion(const wxPoint& pt, const wxSize& sz); |
84 | void SetClippingRegion(const wxRect& rect); | |
85 | void SetClippingRegion(const wxRegion& region); | |
23324ae1 | 86 | void SetPalette(const wxPalette& palette); |
23324ae1 | 87 | bool StartDoc(const wxString& message); |
f045ad8d | 88 | //@} |
23324ae1 | 89 | }; |
e54c96f1 | 90 |