kpixmapio.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef __KPixmapIO_h_Included__
00012 #define __KPixmapIO_h_Included__
00013
00014 class QPixmap;
00015 class QImage;
00016 class QPoint;
00017 class QRect;
00018 class KPixmapIOPrivate;
00085 class KPixmapIO
00086 {
00087 public:
00088 KPixmapIO();
00089 ~KPixmapIO();
00090
00096 QPixmap convertToPixmap(const QImage &image);
00097
00103 QImage convertToImage(const QPixmap &pixmap);
00104
00112 void putImage(QPixmap *dst, int dx, int dy, const QImage *src);
00113
00118 void putImage(QPixmap *dst, const QPoint &offset, const QImage *src);
00119
00129 QImage getImage(const QPixmap *src, int sx, int sy, int sw, int sh);
00130
00135 QImage getImage(const QPixmap *src, const QRect &rect);
00136
00140 enum ShmPolicies {
00141 ShmDontKeep,
00142 ShmKeepAndGrow
00143 };
00144
00150 void setShmPolicy(int policy);
00151
00157 void preAllocShm(int size);
00158
00159 private:
00160
00161
00162
00163
00164 enum ByteOrders {
00165 bo32_ARGB, bo32_BGRA, bo24_RGB, bo24_BGR,
00166 bo16_RGB_565, bo16_BGR_565, bo16_RGB_555,
00167 bo16_BGR_555, bo8
00168 };
00169
00170 bool m_bShm;
00171 bool initXImage(int w, int h);
00172 void doneXImage();
00173 bool createXImage(int w, int h);
00174 void destroyXImage();
00175 bool createShmSegment(int size);
00176 void destroyShmSegment();
00177 void convertToXImage(const QImage &);
00178 QImage convertFromXImage();
00179 private:
00180 KPixmapIOPrivate* d;
00181 };
00182
00183 #endif // __KPixmapIO_h_Included__
This file is part of the documentation for kdeui Library Version 3.3.1.