kpixmapeffect.h
00001
00002
00003
00004
00005
00006
00007
00008
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.0.