Scribus
Open source desktop publishing at your fingertips
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  */
22 
23 /* "This product is not manufactured, approved, or supported by
24  * Corel Corporation or Corel Corporation Limited."
25  */
26 
27 #ifndef __WPGPAINTINTERFACE_H__
28 #define __WPGPAINTINTERFACE_H__
29 
30 #include "WPGBitmap.h"
31 #include "WPGBinaryData.h"
32 #include "WPGBrush.h"
33 #include "WPGPath.h"
34 #include "WPGPen.h"
35 #include "WPGPoint.h"
36 #include "WPGRect.h"
37 
38 namespace libwpg
39 {
40 
42 public:
43  virtual ~WPGPaintInterface() {}
44 
45  // none of the other callback functions will be called before this function is called
46  virtual void startGraphics(double width, double height) = 0;
47 
48  virtual void setPen(const WPGPen& pen) = 0;
49 
50  virtual void setBrush(const WPGBrush& brush) = 0;
51 
52  typedef enum { AlternatingFill, WindingFill } FillRule;
53  virtual void setFillRule(FillRule rule ) = 0;
54 
55  virtual void startLayer(unsigned int id) = 0;
56 
57  virtual void endLayer(unsigned int id) = 0;
58 
59  virtual void drawRectangle(const WPGRect& rect, double rx, double ry) = 0;
60 
61  virtual void drawEllipse(const WPGPoint& center, double rx, double ry) = 0;
62 
63  virtual void drawPolygon(const WPGPointArray& vertices, bool closed) = 0;
64 
65  virtual void drawPath(const WPGPath& path) = 0;
66 
67  virtual void drawBitmap(const WPGBitmap& bitmap, double hres, double vres) = 0;
68 
69  virtual void drawImageObject(const WPGBinaryData& binaryData) = 0;
70 
71  // none of the other callback functions will be called after this function is called
72  virtual void endGraphics() = 0;
73 };
74 
75 } // namespace libwpg
76 
77 #endif // __WPGPAINTINTERFACE_H__
78 
Definition: WPGBitmap.h:37
Definition: WPGPoint.h:34
Definition: WPGPath.h:55
Definition: WPGBinaryData.h:39
Definition: WPGPaintInterface.h:41
Definition: WPGBrush.h:35
Definition: WPGPen.h:51
Definition: WPGPoint.h:51
Definition: WPGRect.h:34
Definition: WPGBinaryData.h:34