kpixmapio.h Source File (kdeui Library)

| # kdeui Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# kpixmapio.h

    00001 /* vi: ts=8 sts=4 sw=4
    00002  *
    00003  * $Id: kpixmapio.h,v 1.8.2.2 2003/06/05 23:42:37 mueller Exp $
    00004  *
    00005  * This file is part of the KDE project, module kdeui.
    00006  * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
    00007  *
    00008  * You can Freely distribute this program under the GNU Library General
    00009  * Public License. See the file "COPYING.LIB" for the exact licensing terms.
    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      * Supported XImage byte orders. The notation ARGB means bytes
    00163      * containing A:R:G:B succeed in memory.
    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 kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 12:57:33 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001