filters
svgexport.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __SVGEXPORT_H__
00021 #define __SVGEXPORT_H__
00022
00023 #include <KoFilter.h>
00024
00025 #include "vvisitor.h"
00026 #include "vgradient.h"
00027
00028 #include "svggraphiccontext.h"
00029
00030 #include <qptrstack.h>
00031
00032 class QTextStream;
00033 class VColor;
00034 class VPath;
00035 class VDocument;
00036 class VFill;
00037 class VGroup;
00038 class VImage;
00039 class VLayer;
00040 class VSubpath;
00041 class VStroke;
00042 class VText;
00043 class VTransformCmd;
00044
00045
00046 class SvgExport : public KoFilter, private VVisitor
00047 {
00048 Q_OBJECT
00049
00050 public:
00051 SvgExport( KoFilter* parent, const char* name, const QStringList& );
00052 virtual ~SvgExport() {}
00053
00054 virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to );
00055
00056 private:
00057 virtual void visitVPath( VPath& composite );
00058 virtual void visitVDocument( VDocument& document );
00059 virtual void visitVGroup( VGroup& group );
00060 virtual void visitVImage( VImage& image );
00061 virtual void visitVLayer( VLayer& layer );
00062 virtual void visitVSubpath( VSubpath& path );
00063 virtual void visitVText( VText& text );
00064
00065 void getStroke( const VStroke& stroke, QTextStream *stream );
00066 void getColorStops( const QPtrVector<VColorStop> &colorStops );
00067 void getFill( const VFill& fill, QTextStream *stream );
00068 void getGradient( const VGradient& grad );
00069 void getPattern( const VPattern& patt );
00070 void getHexColor( QTextStream *, const VColor& color );
00071 QString getID( VObject *obj );
00072
00073 void writePathToStream( VPath &composite, const QString &id, QTextStream *stream, unsigned int indent );
00074
00075 QTextStream* m_stream;
00076 QTextStream* m_defs;
00077 QTextStream* m_body;
00078
00079 QPtrStack<SvgGraphicsContext> m_gc;
00080
00081 unsigned int m_indent;
00082 unsigned int m_indent2;
00083
00084 VTransformCmd *m_trans;
00085 };
00086
00087 #endif
00088
|