WPGPaintInterface.h

Go to the documentation of this file.
00001 /* libwpg
00002  * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org)
00003  * Copyright (C) 2004 Marc Oude Kotte (marc@solcon.nl)
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Library General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Library General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Library General Public
00016  * License along with this library; if not, write to the
00017  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA  02111-1301 USA
00019  *
00020  * For further information visit http://libwpg.sourceforge.net
00021  */
00022 
00023 /* "This product is not manufactured, approved, or supported by
00024  * Corel Corporation or Corel Corporation Limited."
00025  */
00026 
00027 #ifndef __WPGPAINTINTERFACE_H__
00028 #define __WPGPAINTINTERFACE_H__
00029 
00030 #include "WPGBitmap.h"
00031 #include "WPGBinaryData.h"
00032 #include "WPGBrush.h"
00033 #include "WPGPath.h"
00034 #include "WPGPen.h"
00035 #include "WPGPoint.h"
00036 #include "WPGRect.h"
00037 
00038 namespace libwpg
00039 {
00040 
00041 class WPGPaintInterface {
00042 public:
00043         virtual ~WPGPaintInterface() {}
00044 
00045         // none of the other callback functions will be called before this function is called
00046         virtual void startGraphics(double width, double height) = 0;
00047 
00048         virtual void setPen(const WPGPen& pen) = 0;
00049 
00050         virtual void setBrush(const WPGBrush& brush) = 0;
00051 
00052         typedef enum { AlternatingFill, WindingFill } FillRule;
00053         virtual void setFillRule(FillRule rule ) = 0;
00054 
00055         virtual void startLayer(unsigned int id) = 0;
00056 
00057         virtual void endLayer(unsigned int id) = 0;
00058 
00059         virtual void drawRectangle(const WPGRect& rect, double rx, double ry) = 0;
00060 
00061         virtual void drawEllipse(const WPGPoint& center, double rx, double ry) = 0;
00062 
00063         virtual void drawPolygon(const WPGPointArray& vertices) = 0;
00064 
00065         virtual void drawPath(const WPGPath& path) = 0;
00066 
00067         virtual void drawBitmap(const WPGBitmap& bitmap) = 0;
00068         
00069         virtual void drawImageObject(const WPGBinaryData& binaryData) = 0;
00070 
00071         // none of the other callback functions will be called after this function is called
00072         virtual void endGraphics() = 0;
00073 };
00074 
00075 } // namespace libwpg
00076 
00077 #endif // __WPGPAINTINTERFACE_H__
00078 

Generated on Wed Aug 29 16:58:58 2007 for libwpg by doxygen 1.5.3