KPixmapEffect Class Reference
This class includes various pixmap-based graphical effects. More...
#include <kpixmapeffect.h>
Public Types | |
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 Public Member Functions | |
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) |
Detailed Description
This class includes various pixmap-based graphical effects.Everything is static, so there is no need to create an instance of this class. You can just call the static methods. They are encapsulated here merely to provide a common namespace.
Definition at line 27 of file kpixmapeffect.h.
Member Function Documentation
|
Creates a gradient from color a to color b of the specified type.
Definition at line 24 of file kpixmapeffect.cpp. References QPainter::drawLine(), KImageEffect::gradient(), and QPainter::setPen(). |
|
Creates an unbalanced gradient. An unbalanced gradient is a gradient where the transition from color a to color b is not linear, but in this case, exponential.
Definition at line 88 of file kpixmapeffect.cpp. References KImageEffect::unbalancedGradient(). |
|
Creates a pixmap of a given size with the given pixmap. if the given size is bigger than the size of the pixmap, the pixmap is tiled.
Definition at line 240 of file kpixmapeffect.cpp. References QPainter::drawTiledPixmap(), QSize::height(), and QSize::width(). Referenced by pattern(). |
|
Either brightens or dims a pixmap by a specified ratio.
Definition at line 109 of file kpixmapeffect.cpp. References QPixmap::convertToImage(), and KImageEffect::intensity(). |
|
Modifies the intensity of a pixmap's RGB channel component.
Definition at line 121 of file kpixmapeffect.cpp. References KImageEffect::channelIntensity(), and QPixmap::convertToImage(). |
|
Blends the provided pixmap into a background of the indicated color.
Definition at line 140 of file kpixmapeffect.cpp. References KImageEffect::blend(), QImage::convertDepth(), QPixmap::convertToImage(), QImage::depth(), KImageEffect::dither(), and QColor::setRgb(). |
|
Builds a hash on any given pixmap.
Definition at line 179 of file kpixmapeffect.cpp. References QPixmap::convertToImage(), KImageEffect::dither(), KImageEffect::hash(), and QColor::setRgb(). |
|
Creates a pattern from a pixmap. The given pixmap is "flattened" between color a to color b. Doesn't change the original pixmap.
Definition at line 223 of file kpixmapeffect.cpp. References KPixmap::convertFromImage(), QPixmap::convertToImage(), createTiled(), and KImageEffect::flatten(). |
|
Fades a pixmap to a certain color.
Definition at line 257 of file kpixmapeffect.cpp. References QPixmap::convertToImage(), and KImageEffect::fade(). |
|
Converts a pixmap to grayscale.
Definition at line 268 of file kpixmapeffect.cpp. References QPixmap::convertToImage(), and KImageEffect::toGray(). |
|
Desaturates a pixmap.
Definition at line 278 of file kpixmapeffect.cpp. References QPixmap::convertToImage(), and KImageEffect::desaturate(). |
|
Modifies the contrast of a pixmap.
Definition at line 287 of file kpixmapeffect.cpp. References KImageEffect::contrast(), and QPixmap::convertToImage(). |
|
Dithers a pixmap using Floyd-Steinberg dithering for low-color situations.
Definition at line 303 of file kpixmapeffect.cpp. References QPixmap::convertToImage(), and KImageEffect::dither(). |
|
Calculate a 'selected' pixmap, for instance a selected icon on the desktop.
Definition at line 318 of file kpixmapeffect.cpp. References KPixmap::convertFromImage(), QPixmap::convertToImage(), and KImageEffect::selectedImage(). |
The documentation for this class was generated from the following files: