Code

Cleaned up virtual destructor problem and compile warnings.
[inkscape.git] / src / extension / internal / libwpg / WPGPaintInterface.h
1 /* libwpg
2  * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org)
3  * Copyright (C) 2004 Marc Oude Kotte (marc@solcon.nl)
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this library; if not, write to the 
17  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
18  * Boston, MA  02111-1301 USA
19  *
20  * For further information visit http://libwpg.sourceforge.net
21  */
23 /* "This product is not manufactured, approved, or supported by
24  * Corel Corporation or Corel Corporation Limited."
25  */
27 #ifndef __WPGPAINTINTERFACE_H__
28 #define __WPGPAINTINTERFACE_H__
30 #include "WPGBrush.h"
31 #include "WPGPath.h"
32 #include "WPGPen.h"
33 #include "WPGPoint.h"
34 #include "WPGRect.h"
36 namespace libwpg
37 {
39 class WPGPaintInterface {
40 public:
41         virtual ~WPGPaintInterface() {}
43         // none of the other callback functions will be called before this function is called
44         virtual void startDocument(double width, double height) = 0;
46         virtual void setPen(const WPGPen& pen) = 0;
47         
48         virtual void setBrush(const WPGBrush& brush) = 0;
50         typedef enum { AlternatingFill, WindingFill } FillRule;
51         virtual void setFillRule(FillRule rule ) = 0;
53         virtual void startLayer(unsigned int id) = 0;
55         virtual void endLayer(unsigned int id) = 0;
57         virtual void drawRectangle(const WPGRect& rect, double rx, double ry) = 0;
59         virtual void drawEllipse(const WPGPoint& center, double rx, double ry) = 0;
61         virtual void drawPolygon(const WPGPointArray& vertices) = 0;
63         virtual void drawPath(const WPGPath& path) = 0;
65         // none of the other callback functions will be called after this function is called
66         virtual void endDocument() = 0;
67 };
69 } // namespace libwpg
71 #endif // __WPGPAINTINTERFACE_H__
72