00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef FBTK_FBPIXMAP_HH
00025 #define FBTK_FBPIXMAP_HH
00026
00027 #include "FbDrawable.hh"
00028
00029 #include <X11/Xlib.h>
00030
00031 namespace FbTk {
00032
00034 class FbPixmap:public FbDrawable {
00035 public:
00036 FbPixmap();
00038 explicit FbPixmap(const FbPixmap ©);
00040 explicit FbPixmap(Pixmap pm);
00041 FbPixmap(const FbDrawable &src,
00042 unsigned int width, unsigned int height,
00043 int depth);
00044 FbPixmap(Drawable src,
00045 unsigned int width, unsigned int height,
00046 int depth);
00047
00048 virtual ~FbPixmap();
00049
00050 void copy(const FbPixmap &the_copy);
00051 void copy(Pixmap pixmap);
00053 void rotate();
00055 void scale(unsigned int width, unsigned int height);
00056 void resize(unsigned int width, unsigned int height);
00058 Pixmap release();
00059
00060 FbPixmap &operator = (const FbPixmap ©);
00062 FbPixmap &operator = (Pixmap pm);
00063
00064 inline Drawable drawable() const { return m_pm; }
00065 inline unsigned int width() const { return m_width; }
00066 inline unsigned int height() const { return m_height; }
00067 inline int depth() const { return m_depth; }
00068
00069
00070 private:
00071 void free();
00072 void create(Drawable src,
00073 unsigned int width, unsigned int height,
00074 int depth);
00075 Pixmap m_pm;
00076 unsigned int m_width, m_height;
00077 int m_depth;
00078 };
00079
00080 }
00081
00082 #endif // FBTK_FBPIXMAP_HH
00083