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 <libwpd/libwpd.h>
00031 
00032 namespace libwpg
00033 {
00034 
00035 class WPGPaintInterface {
00036 public:
00037         virtual ~WPGPaintInterface() {}
00038 
00039         // none of the other callback functions will be called before this function is called
00040         virtual void startGraphics(const ::WPXPropertyList &propList) = 0;
00041 
00042         // none of the other callback functions will be called after this function is called
00043         virtual void endGraphics() = 0;
00044 
00045         virtual void setStyle(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &gradient) = 0;
00046 
00047         virtual void startLayer(const ::WPXPropertyList &propList) = 0;
00048 
00049         virtual void endLayer() = 0;
00050         
00051         virtual void startEmbeddedGraphics(const ::WPXPropertyList &propList) = 0;
00052         
00053         virtual void endEmbeddedGraphics() = 0;
00054 
00055         // Different primitive shapes
00056         virtual void drawRectangle(const ::WPXPropertyList& propList) = 0;
00057 
00058         virtual void drawEllipse(const ::WPXPropertyList& propList) = 0;
00059 
00060         virtual void drawPolygon(const ::WPXPropertyListVector &vertices) = 0;
00061 
00062         virtual void drawPolyline(const ::WPXPropertyListVector &vertices) = 0;
00063 
00064         virtual void drawPath(const ::WPXPropertyListVector &path) = 0;
00065 
00066         // Embedded binary/raster data
00067         virtual void drawGraphicObject(const ::WPXPropertyList &propList, const ::WPXBinaryData &binaryData) = 0;
00068         
00069         // Embedded text object
00070         virtual void startTextObject(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &path) = 0;
00071         virtual void endTextObject() = 0;
00072         
00073         virtual void startTextLine(const ::WPXPropertyList &propList) = 0;
00074         virtual void endTextLine() = 0;
00075         
00076         virtual void startTextSpan(const ::WPXPropertyList &propList) = 0;
00077         virtual void endTextSpan() = 0;
00078         
00079         virtual void insertText(const ::WPXString &str) = 0;
00080 };
00081 
00082 } // namespace libwpg
00083 
00084 #endif // __WPGPAINTINTERFACE_H__
00085 

Generated on Sun Nov 21 11:28:13 2010 for libwpg by doxygen 1.5.4