filters

xamlexport.h
1/* This file is part of the KDE project
2 Copyright (C) 2002, 2003 The Karbon Developers
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef __XAMLEXPORT_H__
21#define __XAMLEXPORT_H__
22
23#include <KoFilter.h>
24
25#include "vvisitor.h"
26#include "vgradient.h"
27
28#include "xamlgraphiccontext.h"
29
30#include <tqptrstack.h>
31
32class TQTextStream;
33class VColor;
34class VPath;
35class VDocument;
36class VFill;
37class VGroup;
38class VLayer;
39class VSubpath;
40class VStroke;
41class VText;
42
43
44class XAMLExport : public KoFilter, private VVisitor
45{
46 TQ_OBJECT
47
48
49public:
50 XAMLExport( KoFilter* parent, const char* name, const TQStringList& );
51 virtual ~XAMLExport() {}
52
53 virtual KoFilter::ConversionStatus convert( const TQCString& from, const TQCString& to );
54
55private:
56 virtual void visitVPath( VPath& composite );
57 virtual void visitVDocument( VDocument& document );
58 virtual void visitVGroup( VGroup& group );
59 virtual void visitVSubpath( VSubpath& path );
60 //virtual void visitVText( VText& text );
61
62 void getStroke( const VStroke& stroke );
63 void getColorStops( const TQPtrVector<VColorStop> &colorStops );
64 void getFill( const VFill& fill );
65 void getGradient( const VGradient& grad );
66 void getHexColor( TQTextStream *, const VColor& color );
67 TQString getID( VObject *obj );
68
69 TQTextStream* m_stream;
70 TQTextStream* m_defs;
71 TQTextStream* m_body;
72
73 TQPtrStack<XAMLGraphicsContext> m_gc;
74};
75
76#endif
77