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