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");
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*/) {}
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:
78 };
79 
80 } // namespace libvisio
81 
82 #endif // __VISIOSVGGENERATOR_H__
83 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
void startTextSpan(const ::WPXPropertyList &propList)
Definition: VSDSVGGenerator.cpp:806
Definition: VSDSVGGenerator.h:45
void endLayer()
Definition: VSDSVGGenerator.cpp:592
void endTextSpan()
Definition: VSDSVGGenerator.cpp:830
Definition: VSDSVGGenerator.cpp:70
void drawRectangle(const ::WPXPropertyList &propList)
Definition: VSDSVGGenerator.cpp:602
Definition: VSDStringVector.h:39
void endTextObject()
Definition: VSDSVGGenerator.cpp:801
void drawEllipse(const ::WPXPropertyList &propList)
Definition: VSDSVGGenerator.cpp:615
~VSDSVGGenerator()
Definition: VSDSVGGenerator.cpp:549
VSDSVGGenerator(VSDStringVector &vec, const WPXString &nmspace="svg")
Definition: VSDSVGGenerator.cpp:544
void drawPolyline(const ::WPXPropertyListVector &vertices)
Definition: VSDSVGGenerator.cpp:631
void startTextLine(const ::WPXPropertyList &)
Definition: VSDSVGGenerator.h:68
void drawPath(const ::WPXPropertyListVector &path)
Definition: VSDSVGGenerator.cpp:641
void insertText(const ::WPXString &str)
Definition: VSDSVGGenerator.cpp:835
void endEmbeddedGraphics()
Definition: VSDSVGGenerator.h:56
void startTextObject(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &path)
Definition: VSDSVGGenerator.cpp:741
void endTextLine()
Definition: VSDSVGGenerator.h:69
VSDSVGGeneratorPrivate * m_pImpl
Definition: VSDSVGGenerator.h:77
void endGraphics()
Definition: VSDSVGGenerator.cpp:572
void drawGraphicObject(const ::WPXPropertyList &propList, const ::WPXBinaryData &binaryData)
Definition: VSDSVGGenerator.cpp:698
void startEmbeddedGraphics(const ::WPXPropertyList &)
Definition: VSDSVGGenerator.h:55
VSDSVGGenerator & operator=(const VSDSVGGenerator &)
void startLayer(const ::WPXPropertyList &propList)
Definition: VSDSVGGenerator.cpp:580
void startGraphics(const ::WPXPropertyList &propList)
Definition: VSDSVGGenerator.cpp:554
void setStyle(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &gradient)
Definition: VSDSVGGenerator.cpp:597
void drawPolygon(const ::WPXPropertyListVector &vertices)
Definition: VSDSVGGenerator.cpp:636

Generated for libvisio by doxygen 1.8.5