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 QPoint;
00018
class QRect;
00019
class KPixmapIOPrivate;
00086 class KPixmapIO
00087 {
00088
public:
00089
KPixmapIO();
00090 ~
KPixmapIO();
00091
00097
QPixmap convertToPixmap(
const QImage &image);
00098
00104
QImage convertToImage(
const QPixmap &pixmap);
00105
00113
void putImage(
QPixmap *dst,
int dx,
int dy,
const QImage *src);
00114
00119
void putImage(
QPixmap *dst,
const QPoint &offset,
const QImage *src);
00120
00130
QImage getImage(
const QPixmap *src,
int sx,
int sy,
int sw,
int sh);
00131
00136
QImage getImage(
const QPixmap *src,
const QRect &rect);
00137
00141 enum ShmPolicies {
00142 ShmDontKeep,
00143 ShmKeepAndGrow
00144 };
00145
00151
void setShmPolicy(
int policy);
00152
00158
void preAllocShm(
int size);
00159
00160
private:
00161
00162
00163
00164
00165
enum ByteOrders {
00166 bo32_ARGB, bo32_BGRA, bo24_RGB, bo24_BGR,
00167 bo16_RGB_565, bo16_BGR_565, bo16_RGB_555,
00168 bo16_BGR_555, bo8
00169 };
00170
00171
bool m_bShm;
00172
bool initXImage(
int w,
int h);
00173
void doneXImage();
00174
bool createXImage(
int w,
int h);
00175
void destroyXImage();
00176
bool createShmSegment(
int size);
00177
void destroyShmSegment();
00178
void convertToXImage(
const QImage &);
00179
QImage convertFromXImage();
00180
private:
00181 KPixmapIOPrivate* d;
00182 };
00183
00184
#endif // __KPixmapIO_h_Included__
This file is part of the documentation for kdeui Library Version 3.2.3.