filters
wmfexport.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef WMFEXPORT_H
00020 #define WMFEXPORT_H
00021
00022 #include <qpen.h>
00023 #include <qbrush.h>
00024 #include <qptrlist.h>
00025 #include <qpointarray.h>
00026 #include <KoFilter.h>
00027 #include "vvisitor.h"
00028
00029 class KoWmfWrite;
00030 class VPath;
00031 class VDocument;
00032 class VSubpath;
00033 class VText;
00034
00035 class WmfExport : public KoFilter, private VVisitor
00036 {
00037 Q_OBJECT
00038
00039 public:
00040 WmfExport( KoFilter *parent, const char *name, const QStringList&);
00041 virtual ~WmfExport();
00042
00043 virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to );
00044
00045 private:
00046 void visitVPath( VPath& composite );
00047 void visitVDocument( VDocument& document );
00048 void visitVSubpath( VSubpath& path );
00049 void visitVText( VText& text );
00050 void getBrush( QBrush& brush, const VFill *fill );
00051 void getPen( QPen& pen, const VStroke *stroke );
00052
00053
00054
00055
00056
00057 int coordX( double left )
00058 { return (int)(left * mScaleX); }
00059 int coordY( double top )
00060 { return (int)((mDoc->height() - top) * mScaleY); }
00061
00062 private:
00063 KoWmfWrite *mWmf;
00064 VDocument *mDoc;
00065 int mDpi;
00066 double mScaleX;
00067 double mScaleY;
00068 QPtrList<QPointArray> mListPa;
00069 };
00070
00071 #endif
|