00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef __OGFX_EFFECT_H
00011 #define __OGFX_EFFECT_H
00012
00013 #include <qpixmap.h>
00014 #include <qimage.h>
00015
00024 class OGfxEffect
00025 {
00026 public:
00027 enum GradientType { VerticalGradient, HorizontalGradient,
00028 DiagonalGradient, CrossDiagonalGradient,
00029 PyramidGradient, RectangleGradient,
00030 PipeCrossGradient, EllipticGradient };
00031 enum RGBComponent { Red, Green, Blue };
00032
00033 enum Lighting {NorthLite, NWLite, WestLite, SWLite,
00034 SouthLite, SELite, EastLite, NELite};
00035
00048 static QPixmap& gradient(QPixmap& pixmap, const QColor &ca, const QColor &cb,
00049 GradientType type, int ncols=3);
00050
00051 static QImage gradient (const QSize &size, const QColor &ca, const QColor &cb,
00052 GradientType type, int ncols=3);
00053
00054
00070 static QPixmap& blend(QPixmap& pixmap, float initial_intensity,
00071 const QColor &bgnd, GradientType eff,
00072 bool anti_dir=false, int ncols=3);
00073
00074
00075 static QImage& blend(QImage &image, float initial_intensity,
00076 const QColor &bgnd, GradientType eff,
00077 bool anti_dir);
00078 };
00079
00080
00081 #endif