Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

opixmapeffect.h

Go to the documentation of this file.
00001 /* This file is part of the KDE libraries
00002     Copyright (C) 1998, 1999 Christian Tibirna <ctibirna@total.net>
00003               (C) 1998, 1999 Daniel M. Duley <mosfet@kde.org>
00004               (C) 1998, 1999 Dirk A. Mueller <mueller@kde.org>
00005 
00006 */
00007 
00008 // $Id: opixmapeffect.h,v 1.3 2004/10/07 19:36:35 clem Exp $
00009 
00010 #ifndef __OPIXMAP_EFFECT_H
00011 #define __OPIXMAP_EFFECT_H
00012 
00013 
00014 #include <qsize.h>
00015 typedef QPixmap OPixmap;
00016 class QColor;
00017 
00018 
00019 namespace Opie {
00020 namespace Ui   {
00029 class OPixmapEffect
00030 {
00031 public:
00032     enum GradientType { VerticalGradient, HorizontalGradient,
00033                         DiagonalGradient, CrossDiagonalGradient,
00034                         PyramidGradient, RectangleGradient,
00035                         PipeCrossGradient, EllipticGradient };
00036     enum RGBComponent { Red, Green, Blue };
00037 
00038     enum Lighting {NorthLite, NWLite, WestLite, SWLite,
00039                    SouthLite, SELite, EastLite, NELite};
00040 
00053     static OPixmap& gradient(OPixmap& pixmap, const QColor &ca, const QColor &cb,
00054                             GradientType type, int ncols=3);
00055 
00071     static OPixmap& unbalancedGradient(OPixmap& pixmap, const QColor &ca,
00072                    const QColor &cb, GradientType type, int xfactor = 100,
00073                    int yfactor = 100, int ncols=3);
00074 
00086     static OPixmap createTiled(const OPixmap& pixmap, QSize size);
00087 
00095     static OPixmap& intensity(OPixmap& pixmap, float ratio);
00096 
00105     static OPixmap& channelIntensity(OPixmap& pixmap, float ratio,
00106                                     RGBComponent channel);
00107 
00123     static OPixmap& blend(OPixmap& pixmap, float initial_intensity,
00124                          const QColor &bgnd, GradientType eff,
00125                          bool anti_dir=false, int ncols=3);
00126 
00135     static OPixmap& hash(OPixmap& pixmap, Lighting lite=NorthLite,
00136                         unsigned int spacing=0, int ncols=3);
00137 
00151     static OPixmap pattern(const OPixmap& pixmap, QSize size,
00152                    const QColor &ca, const QColor &cb, int ncols=8);
00153 
00162     static OPixmap& fade(OPixmap& pixmap, double val, const QColor &color);
00163 
00172     static OPixmap& toGray(OPixmap& pixmap, bool fast=false);
00173 
00181     static OPixmap& desaturate(OPixmap& pixmap, float desat = 0.3);
00182 
00190     static OPixmap& contrast(OPixmap& pixmap, int c);
00191 
00201     static OPixmap& dither(OPixmap &pixmap, const QColor *palette, int size);
00202 
00209     static OPixmap selectedPixmap( const OPixmap &pixmap, const QColor &col );
00210 };
00211 }
00212 }
00213 
00214 #endif

Generated on Sat Nov 5 16:16:26 2005 for OPIE by  doxygen 1.4.2