kpixmapeffect.h
/* This file is part of the KDE libraries
Copyright (C) 1998, 1999 Christian Tibirna <ctibirna@total.net>
(C) 1998, 1999 Daniel M. Duley <mosfet@kde.org>
(C) 1998, 1999 Dirk Mueller <mueller@kde.org>
*/
// $Id: kpixmapeffect.h 399215 2005-03-20 14:33:45Z mueller $
#ifndef __KPIXMAP_EFFECT_H
#define __KPIXMAP_EFFECT_H
#include <kdelibs_export.h>
#include <qsize.h>
class KPixmap;
class QColor;
class KDEFX_EXPORT KPixmapEffect
{
public:
enum GradientType { VerticalGradient, HorizontalGradient,
DiagonalGradient, CrossDiagonalGradient,
PyramidGradient, RectangleGradient,
PipeCrossGradient, EllipticGradient };
enum RGBComponent { Red, Green, Blue };
enum Lighting {NorthLite, NWLite, WestLite, SWLite,
SouthLite, SELite, EastLite, NELite};
static KPixmap& gradient(KPixmap& pixmap, const QColor &ca, const QColor &cb,
GradientType type, int ncols=3);
static KPixmap& unbalancedGradient(KPixmap& pixmap, const QColor &ca,
const QColor &cb, GradientType type, int xfactor = 100,
int yfactor = 100, int ncols=3);
static KPixmap createTiled(const KPixmap& pixmap, QSize size);
static KPixmap& intensity(KPixmap& pixmap, float ratio);
static KPixmap& channelIntensity(KPixmap& pixmap, float ratio,
RGBComponent channel);
static KPixmap& blend(KPixmap& pixmap, float initial_intensity,
const QColor &bgnd, GradientType eff,
bool anti_dir=false, int ncols=3);
static KPixmap& hash(KPixmap& pixmap, Lighting lite=NorthLite,
unsigned int spacing=0, int ncols=3);
static KPixmap pattern(const KPixmap& pixmap, QSize size,
const QColor &ca, const QColor &cb, int ncols=8);
static KPixmap& fade(KPixmap& pixmap, double val, const QColor &color);
static KPixmap& toGray(KPixmap& pixmap, bool fast=false);
static KPixmap& desaturate(KPixmap& pixmap, float desat = 0.3);
static KPixmap& contrast(KPixmap& pixmap, int c);
static KPixmap& dither(KPixmap &pixmap, const QColor *palette, int size);
static KPixmap selectedPixmap( const KPixmap &pixmap, const QColor &col );
};
#endif
KPixmapEffect
This class includes various pixmap-based graphical effects.
Definition: kpixmapeffect.h:27
KPixmap
Off-screen paint device with extended features.
Definition: kpixmap.h:57

KDE Home | KDE Accessibility Home | Description of Access Keys