23#include "kowmfreadprivate.h"
25KoWmfRead::KoWmfRead() {
29KoWmfRead::~KoWmfRead() {
36 TQFile file( filename );
38 if ( !file.open( IO_ReadOnly ) )
40 kdDebug() << "KoWmfRead : Cannot open file " << TQString(TQFile::encodeName(filename)) << endl;
44 bool ret = mKwmf-> load( file.readAll() );
53 return mKwmf-> load( array );
59 return mKwmf-> play( this );
63bool KoWmfRead::isValid( void ) const {
69 return mKwmf->mStandard;
73bool KoWmfRead::isPlaceable( void ) const {
74 return mKwmf->mPlaceable;
78bool KoWmfRead::isEnhanced( void ) const {
79 return mKwmf->mEnhanced;
89 if ( mKwmf->mPlaceable ) {
KoWmfReadPrivate allows to read WMF files.
TQRect mBBox bounding rectangle
bool load(const TQByteArray &array) Load WMF file.
int mDpi number of points per inch for the default size
int mNbrFunc number of functions to draw (==0 for all)
bool play(KoWmfRead *readKwmf) Plays a metafile in readKwmf and returns true on success.
void setDebug(int nbFunc) Activate debug mode.
virtual bool load(const TQString &fileName) Load WMF file.
virtual bool play() play the WMF file => call virtuals functions
int defaultDpi(void) const Returns the default DotPerInch for placeable meta file, return 0 for Standard meta file.
virtual TQRect boundingRect(void) const Returns the bounding rectangle Standard Meta File : return the bounding box from setWindowOrg and set...
bool isStandard(void) const Returns true if the metafile is standard / placeable / enhanced / valid.
|