]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/dcsvg.h
Add two step creation to wxTextEntryDialog.
[wxWidgets.git] / interface / wx / dcsvg.h
CommitLineData
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 12 A wxSVGFileDC is a device context onto which graphics and text can be
e844dc64
VZ
13 drawn, and the output produced as a vector file, in SVG format.
14
15 This format can be read by a range of programs, including a Netscape plugin
16 (Adobe) and the open source Inkscape program (http://inkscape.org/). Full
17 details are given in the W3C SVG recommendation (http://www.w3.org/TR/SVG/).
7c913512 18
23324ae1 19 The intention behind wxSVGFileDC is that it can be used to produce a file
3a7fb603 20 corresponding to the screen display context, wxSVGFileDC, by passing the
e844dc64 21 wxSVGFileDC as a parameter instead of a wxDC. Thus the wxSVGFileDC
3a7fb603 22 is a write-only class.
7c913512 23
3a7fb603
BP
24 As the wxSVGFileDC is a vector format, raster operations like GetPixel()
25 are unlikely to be supported. However, the SVG specification allows for PNG
26 format raster files to be embedded in the SVG, and so bitmaps, icons and
27 blit operations in wxSVGFileDC are supported.
7c913512 28
3a7fb603
BP
29 A more substantial SVG library (for reading and writing) is available at
30 the wxArt2D website <http://wxart2d.sourceforge.net/>.
7c913512 31
23324ae1 32 @library{wxcore}
3a7fb603 33 @category{dc}
23324ae1
FM
34*/
35class wxSVGFileDC : public wxDC
36{
37public:
1db8f1dc
BP
38 /**
39 Initializes a wxSVGFileDC with the given @a f filename with the given
40 @a Width and @a Height at @a dpi resolution.
41 */
11e3af6e 42 wxSVGFileDC(const wxString& filename, int width = 320, int height = 240, double dpi = 72);
23324ae1
FM
43
44 /**
45 Destructor.
46 */
adaaa686 47 virtual ~wxSVGFileDC();
23324ae1 48
23324ae1 49 /**
1db8f1dc 50 Does nothing.
23324ae1
FM
51 */
52 void EndDoc();
53
23324ae1 54 /**
1db8f1dc 55 Does nothing.
23324ae1
FM
56 */
57 void EndPage();
58
59 /**
f045ad8d 60 This makes no sense in wxSVGFileDC and does nothing.
23324ae1 61 */
f045ad8d 62 void Clear();
23324ae1
FM
63
64 /**
f045ad8d
FM
65 Does the same as wxDC::SetLogicalFunction(), except that only wxCOPY is
66 available. Trying to set one of the other values will fail.
23324ae1 67 */
f045ad8d 68 void SetLogicalFunction(wxRasterOperationMode function);
23324ae1
FM
69
70 //@{
71 /**
f045ad8d 72 Functions not implemented in this DC class.
23324ae1 73 */
f045ad8d
FM
74 void CrossHair(wxCoord x, wxCoord y);
75 void DestroyClippingRegion();
76 bool FloodFill(wxCoord x, wxCoord y, const wxColour& colour,
77 wxFloodFillStyle style = wxFLOOD_SURFACE);
4ccf0566 78 void GetClippingBox(wxCoord *x, wxCoord *y, wxCoord *width, wxCoord *height) const;
0004982c 79 bool GetPixel(wxCoord x, wxCoord y, wxColour* colour) const;
23324ae1
FM
80 void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width,
81 wxCoord height);
7c913512
FM
82 void SetClippingRegion(const wxPoint& pt, const wxSize& sz);
83 void SetClippingRegion(const wxRect& rect);
84 void SetClippingRegion(const wxRegion& region);
23324ae1 85 void SetPalette(const wxPalette& palette);
23324ae1 86 bool StartDoc(const wxString& message);
f045ad8d 87 //@}
23324ae1 88};
e54c96f1 89