2 * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org)
3 * Copyright (C) 2007 Fridrich Strba (fridrich_strba@bluewin.ch)
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.
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.
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
20 * For further information visit http://libwpg.sourceforge.net
23 /* "This product is not manufactured, approved, or supported by
24 * Corel Corporation or Corel Corporation Limited."
27 #ifndef __ODGEXPORTER_HXX__
28 #define __ODGEXPORTER_HXX__
34 #include <libwpd/WPXString.h>
35 #include <libwpg/libwpg.h>
36 #include <libwpg/WPGBinaryData.h>
37 #include "filter/DocumentElement.hxx"
38 #include "filter/DocumentHandler.hxx"
40 class OdgExporter
: public libwpg::WPGPaintInterface
{
42 OdgExporter(DocumentHandler
*pHandler
);
45 void startDocument(double width
, double height
);
46 void startGraphics(double width
, double height
) { startDocument(width
, height
); }
48 void endGraphics() { endDocument(); };
49 void startLayer(unsigned int id
);
50 void endLayer(unsigned int id
);
52 void setPen(const libwpg::WPGPen
& pen
);
53 void setBrush(const libwpg::WPGBrush
& brush
);
54 void setFillRule(FillRule rule
);
56 void drawRectangle(const libwpg::WPGRect
& rect
, double rx
, double ry
);
57 void drawEllipse(const libwpg::WPGPoint
& center
, double rx
, double ry
);
58 void drawPolygon(const libwpg::WPGPointArray
& vertices
);
59 void drawPath(const libwpg::WPGPath
& path
);
60 void drawBitmap(const libwpg::WPGBitmap
& bitmap
);
61 void drawImageObject(const libwpg::WPGBinaryData
& binaryData
);
64 std::vector
<DocumentElement
*> mpBodyElements
;
65 std::vector
<DocumentElement
*> mpStylesElements
;
66 DocumentHandler
*mpHandler
;
69 libwpg::WPGBrush m_brush
;
75 WPXString
doubleToString(const double value
);
78 #endif // __ODGEXPORTER_HXX__