kdefx Library: kpixmapeffect.h Source File (kdefx Library)

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

# kpixmapeffect.h

    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: kpixmapeffect.h 345302 2004-09-09 20:44:57Z staniek $
    00009
    00010 #ifndef __KPIXMAP_EFFECT_H
    00011 #define __KPIXMAP_EFFECT_H
    00012
    00013 #include <kdelibs_export.h>
    00014
    00015 #include <qsize.h>
    00016 class KPixmap;
    00017 class QColor;
    00018
    00027 class KDEFX_EXPORT KPixmapEffect
    00028 {
    00029 public:
    00030     enum GradientType { VerticalGradient, HorizontalGradient,
    00031             DiagonalGradient, CrossDiagonalGradient,
    00032             PyramidGradient, RectangleGradient,
    00033             PipeCrossGradient, EllipticGradient };
    00034     enum RGBComponent { Red, Green, Blue };
    00035
    00036     enum Lighting {NorthLite, NWLite, WestLite, SWLite,
    00037            SouthLite, SELite, EastLite, NELite};
    00038
    00051     static KPixmap& gradient(KPixmap& pixmap, const QColor &ca, const QColor &cb,
    00052                             GradientType type, int ncols=3);
    00053
    00069     static KPixmap& unbalancedGradient(KPixmap& pixmap, const QColor &ca,
    00070                    const QColor &cb, GradientType type, int xfactor = 100,
    00071                    int yfactor = 100, int ncols=3);
    00072
    00084     static KPixmap createTiled(const KPixmap& pixmap, QSize size);
    00085
    00093     static KPixmap& intensity(KPixmap& pixmap, float ratio);
    00094
    00103     static KPixmap& channelIntensity(KPixmap& pixmap, float ratio,
    00104                                     RGBComponent channel);
    00105
    00123     static KPixmap& blend(KPixmap& pixmap, float initial_intensity,
    00124                          const QColor &bgnd, GradientType eff,
    00125                          bool anti_dir=false, int ncols=3);
    00126
    00137     static KPixmap& hash(KPixmap& pixmap, Lighting lite=NorthLite,
    00138                         unsigned int spacing=0, int ncols=3);
    00139
    00156     static KPixmap pattern(const KPixmap& pixmap, QSize size,
    00157                    const QColor &ca, const QColor &cb, int ncols=8);
    00158
    00167     static KPixmap& fade(KPixmap& pixmap, double val, const QColor &color);
    00168
    00177     static KPixmap& toGray(KPixmap& pixmap, bool fast=false);
    00178
    00186     static KPixmap& desaturate(KPixmap& pixmap, float desat = 0.3);
    00187
    00195     static KPixmap& contrast(KPixmap& pixmap, int c);
    00196
    00206     static KPixmap& dither(KPixmap &pixmap, const QColor *palette, int size);
    00207
    00214     static KPixmap selectedPixmap( const KPixmap &pixmap, const QColor &col );
    00215 };
    00216
    00217
    00218 #endif

This file is part of the documentation for kdefx Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:17:09 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003