- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

VSDSVGGenerator.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* libvisio
3 * Version: MPL 1.1 / GPLv2+ / LGPLv2+
4 *
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License or as specified alternatively below. You may obtain a copy of
8 * the License at http://www.mozilla.org/MPL/
9 *
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
14 *
15 * Major Contributor(s):
16 * Copyright (C) 2011 Fridrich Strba <fridrich.strba@bluewin.ch>
17 * Copyright (C) 2011 Eilidh McAdam <tibbylickle@gmail.com>
18 *
19 *
20 * All Rights Reserved.
21 *
22 * For minor contributions see the git repository.
23 *
24 * Alternatively, the contents of this file may be used under the terms of
25 * either the GNU General Public License Version 2 or later (the "GPLv2+"), or
26 * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
27 * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable
28 * instead of those above.
29 */
30
31 #ifndef __VISIOSVGGENERATOR_H__
32 #define __VISIOSVGGENERATOR_H__
33
34 #include <stdio.h>
35 #include <iostream>
36 #include <sstream>
37 #include <libwpd/libwpd.h>
38 #include <libwpg/libwpg.h>
39 #include <libvisio/libvisio.h>
40
41 namespace libvisio
42 {
43 struct VSDSVGGeneratorPrivate;
44
45 class VSDSVGGenerator : public libwpg::WPGPaintInterface
46 {
47 public:
48 VSDSVGGenerator(VSDStringVector &vec, const WPXString &nmspace="svg");
49 ~VSDSVGGenerator();
50
51 void startGraphics(const ::WPXPropertyList &propList);
52 void endGraphics();
53 void startLayer(const ::WPXPropertyList &propList);
54 void endLayer();
55 void startEmbeddedGraphics(const ::WPXPropertyList & /*propList*/) {}
56 void endEmbeddedGraphics() {}
57
58 void setStyle(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &gradient);
59
60 void drawRectangle(const ::WPXPropertyList &propList);
61 void drawEllipse(const ::WPXPropertyList &propList);
62 void drawPolyline(const ::WPXPropertyListVector &vertices);
63 void drawPolygon(const ::WPXPropertyListVector &vertices);
64 void drawPath(const ::WPXPropertyListVector &path);
65 void drawGraphicObject(const ::WPXPropertyList &propList, const ::WPXBinaryData &binaryData);
66 void startTextObject(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &path);
67 void endTextObject();
68 void startTextLine(const ::WPXPropertyList & /* propList */) {}
69 void endTextLine() {}
70 void startTextSpan(const ::WPXPropertyList &propList);
71 void endTextSpan();
72 void insertText(const ::WPXString &str);
73
74 private:
75 VSDSVGGenerator(const VSDSVGGenerator &);
76 VSDSVGGenerator &operator=(const VSDSVGGenerator &);
77 VSDSVGGeneratorPrivate *m_pImpl;
78 };
79
80 } // namespace libvisio
81
82 #endif // __VISIOSVGGENERATOR_H__
83 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libvisio::VSDSVGGenerator::startTextSpan
void startTextSpan(const ::WPXPropertyList &propList)
Definition: VSDSVGGenerator.cpp:806
libvisio::VSDSVGGenerator
Definition: VSDSVGGenerator.h:45
libvisio::VSDSVGGenerator::endLayer
void endLayer()
Definition: VSDSVGGenerator.cpp:592
libvisio::VSDSVGGenerator::endTextSpan
void endTextSpan()
Definition: VSDSVGGenerator.cpp:830
libvisio.h
libvisio::VSDSVGGeneratorPrivate
Definition: VSDSVGGenerator.cpp:70
libvisio::VSDSVGGenerator::drawRectangle
void drawRectangle(const ::WPXPropertyList &propList)
Definition: VSDSVGGenerator.cpp:602
libvisio::VSDStringVector
Definition: VSDStringVector.h:39
libvisio::VSDSVGGenerator::endTextObject
void endTextObject()
Definition: VSDSVGGenerator.cpp:801
libvisio::VSDSVGGenerator::drawEllipse
void drawEllipse(const ::WPXPropertyList &propList)
Definition: VSDSVGGenerator.cpp:615
libvisio::VSDSVGGenerator::~VSDSVGGenerator
~VSDSVGGenerator()
Definition: VSDSVGGenerator.cpp:549
libvisio::VSDSVGGenerator::VSDSVGGenerator
VSDSVGGenerator(VSDStringVector &vec, const WPXString &nmspace="svg")
Definition: VSDSVGGenerator.cpp:544
libvisio::VSDSVGGenerator::drawPolyline
void drawPolyline(const ::WPXPropertyListVector &vertices)
Definition: VSDSVGGenerator.cpp:631
libvisio::VSDSVGGenerator::startTextLine
void startTextLine(const ::WPXPropertyList &)
Definition: VSDSVGGenerator.h:68
libvisio::VSDSVGGenerator::drawPath
void drawPath(const ::WPXPropertyListVector &path)
Definition: VSDSVGGenerator.cpp:641
libvisio::VSDSVGGenerator::insertText
void insertText(const ::WPXString &str)
Definition: VSDSVGGenerator.cpp:835
libvisio::VSDSVGGenerator::endEmbeddedGraphics
void endEmbeddedGraphics()
Definition: VSDSVGGenerator.h:56
libvisio::VSDSVGGenerator::startTextObject
void startTextObject(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &path)
Definition: VSDSVGGenerator.cpp:741
libvisio::VSDSVGGenerator::endTextLine
void endTextLine()
Definition: VSDSVGGenerator.h:69
libvisio::VSDSVGGenerator::m_pImpl
VSDSVGGeneratorPrivate * m_pImpl
Definition: VSDSVGGenerator.h:77
libvisio::VSDSVGGenerator::endGraphics
void endGraphics()
Definition: VSDSVGGenerator.cpp:572
libvisio::VSDSVGGenerator::drawGraphicObject
void drawGraphicObject(const ::WPXPropertyList &propList, const ::WPXBinaryData &binaryData)
Definition: VSDSVGGenerator.cpp:698
libvisio::VSDSVGGenerator::startEmbeddedGraphics
void startEmbeddedGraphics(const ::WPXPropertyList &)
Definition: VSDSVGGenerator.h:55
libvisio::VSDSVGGenerator::operator=
VSDSVGGenerator & operator=(const VSDSVGGenerator &)
libvisio::VSDSVGGenerator::startLayer
void startLayer(const ::WPXPropertyList &propList)
Definition: VSDSVGGenerator.cpp:580
libvisio::VSDSVGGenerator::startGraphics
void startGraphics(const ::WPXPropertyList &propList)
Definition: VSDSVGGenerator.cpp:554
libvisio::VSDSVGGenerator::setStyle
void setStyle(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &gradient)
Definition: VSDSVGGenerator.cpp:597
libvisio::VSDSVGGenerator::drawPolygon
void drawPolygon(const ::WPXPropertyListVector &vertices)
Definition: VSDSVGGenerator.cpp:636