20#ifndef __koPictureImage_h__
21#define __koPictureImage_h__
23#include "KoPictureBase.h"
26class KoPictureImagePrivate;
34class KoPictureImage : public KoPictureBase
45 virtual ~KoPictureImage();
47 KoPictureType::Type getType( void) const;
49 KoPictureBase* newCopy( void) const;
54 virtual bool isNull( void) const;
74 virtual void draw(TQPainter& painter, int x, int y, int width, int height, int sx = 0, int sy = 0, int sw = -1, int sh = -1, bool fastMode = false);
76 virtual TQDragObject* dragObject( TQWidget *dragSource = 0L, const char *name = 0L );
78 virtual bool loadData( const TQByteArray& array, const TQString& extension);
80 virtual bool save(TQIODevice* io) const;
82 virtual TQSize getOriginalSize( void) const;
84 virtual TQPixmap generatePixmap( const TQSize& size, bool smoothScale = false);
86 virtual TQString getMimeType( const TQString& extension) const;
92 virtual TQImage generateImage( const TQSize& size);
94 virtual bool hasAlphaBuffer() const
95 { return m_originalImage.hasAlphaBuffer(); }
97 virtual void setAlphaBuffer( bool enable)
98 { m_originalImage.setAlphaBuffer(enable); }
100 virtual TQImage createAlphaMask( int conversion_flags = 0) const
101 { return m_originalImage.createAlphaMask((TQt::ImageConversionFlags)conversion_flags); }
103 virtual void clearCache( void);
106 TQPixmap getPixmap(TQImage& image);
107 void scaleAndCreatePixmap( const TQSize& size, bool fastMode= false);
110 TQImage m_originalImage;
111 TQByteArray m_rawData;
112 TQPixmap m_cachedPixmap;
118 bool m_cacheIsInFastMode;
TDEAction * save(const TQObject *recvr, const char *slot, TDEActionCollection *parent, const char *name=0)
|