WPGPaintInterface.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
00002 /* libwpg
00003  * Version: MPL 2.0 / LGPLv2.1+
00004  *
00005  * This Source Code Form is subject to the terms of the Mozilla Public
00006  * License, v. 2.0. If a copy of the MPL was not distributed with this
00007  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
00008  *
00009  * Major Contributor(s):
00010  * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org)
00011  * Copyright (C) 2004 Marc Oude Kotte (marc@solcon.nl)
00012  *
00013  * For minor contributions see the git repository.
00014  *
00015  * Alternatively, the contents of this file may be used under the terms
00016  * of the GNU Lesser General Public License Version 2.1 or later
00017  * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
00018  * applicable instead of those above.
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 {
00037 public:
00038         virtual ~WPGPaintInterface() {}
00039 
00040         // none of the other callback functions will be called before this function is called
00041         virtual void startGraphics(const ::WPXPropertyList &propList) = 0;
00042 
00043         // none of the other callback functions will be called after this function is called
00044         virtual void endGraphics() = 0;
00045 
00046         virtual void setStyle(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &gradient) = 0;
00047 
00048         virtual void startLayer(const ::WPXPropertyList &propList) = 0;
00049 
00050         virtual void endLayer() = 0;
00051 
00052         virtual void startEmbeddedGraphics(const ::WPXPropertyList &propList) = 0;
00053 
00054         virtual void endEmbeddedGraphics() = 0;
00055 
00056         // Different primitive shapes
00057         virtual void drawRectangle(const ::WPXPropertyList &propList) = 0;
00058 
00059         virtual void drawEllipse(const ::WPXPropertyList &propList) = 0;
00060 
00061         virtual void drawPolygon(const ::WPXPropertyListVector &vertices) = 0;
00062 
00063         virtual void drawPolyline(const ::WPXPropertyListVector &vertices) = 0;
00064 
00065         virtual void drawPath(const ::WPXPropertyListVector &path) = 0;
00066 
00067         // Embedded binary/raster data
00068         virtual void drawGraphicObject(const ::WPXPropertyList &propList, const ::WPXBinaryData &binaryData) = 0;
00069 
00070         // Embedded text object
00071         virtual void startTextObject(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &path) = 0;
00072         virtual void endTextObject() = 0;
00073 
00074         virtual void startTextLine(const ::WPXPropertyList &propList) = 0;
00075         virtual void endTextLine() = 0;
00076 
00077         virtual void startTextSpan(const ::WPXPropertyList &propList) = 0;
00078         virtual void endTextSpan() = 0;
00079 
00080         virtual void insertText(const ::WPXString &str) = 0;
00081 };
00082 
00083 } // namespace libwpg
00084 
00085 #endif // __WPGPAINTINTERFACE_H__
00086 
00087 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */