.TH "KPixmapEffect" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdefx Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KPixmapEffect \- This class includes various pixmap-based graphical effects.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kpixmapeffect.h>\fP
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "enum \fBGradientType\fP { \fBVerticalGradient\fP, \fBHorizontalGradient\fP, \fBDiagonalGradient\fP, \fBCrossDiagonalGradient\fP, \fBPyramidGradient\fP, \fBRectangleGradient\fP, \fBPipeCrossGradient\fP, \fBEllipticGradient\fP }"
.br
.ti -1c
.RI "enum \fBRGBComponent\fP { \fBRed\fP, \fBGreen\fP, \fBBlue\fP }"
.br
.ti -1c
.RI "enum \fBLighting\fP { \fBNorthLite\fP, \fBNWLite\fP, \fBWestLite\fP, \fBSWLite\fP, \fBSouthLite\fP, \fBSELite\fP, \fBEastLite\fP, \fBNELite\fP }"
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static \fBKPixmap\fP & \fBgradient\fP (\fBKPixmap\fP &pixmap, const \fBQColor\fP &ca, const \fBQColor\fP &cb, GradientType type, int ncols=3)"
.br
.ti -1c
.RI "static \fBKPixmap\fP & \fBunbalancedGradient\fP (\fBKPixmap\fP &pixmap, const \fBQColor\fP &ca, const \fBQColor\fP &cb, GradientType type, int xfactor=100, int yfactor=100, int ncols=3)"
.br
.ti -1c
.RI "static \fBKPixmap\fP \fBcreateTiled\fP (const \fBKPixmap\fP &pixmap, \fBQSize\fP size)"
.br
.ti -1c
.RI "static \fBKPixmap\fP & \fBintensity\fP (\fBKPixmap\fP &pixmap, float ratio)"
.br
.ti -1c
.RI "static \fBKPixmap\fP & \fBchannelIntensity\fP (\fBKPixmap\fP &pixmap, float ratio, RGBComponent channel)"
.br
.ti -1c
.RI "static \fBKPixmap\fP & \fBblend\fP (\fBKPixmap\fP &pixmap, float initial_intensity, const \fBQColor\fP &bgnd, GradientType eff, bool anti_dir=false, int ncols=3)"
.br
.ti -1c
.RI "static \fBKPixmap\fP & \fBhash\fP (\fBKPixmap\fP &pixmap, Lighting lite=NorthLite, unsigned int spacing=0, int ncols=3)"
.br
.ti -1c
.RI "static \fBKPixmap\fP \fBpattern\fP (const \fBKPixmap\fP &pixmap, \fBQSize\fP size, const \fBQColor\fP &ca, const \fBQColor\fP &cb, int ncols=8)"
.br
.ti -1c
.RI "static \fBKPixmap\fP & \fBfade\fP (\fBKPixmap\fP &pixmap, double val, const \fBQColor\fP &color)"
.br
.ti -1c
.RI "static \fBKPixmap\fP & \fBtoGray\fP (\fBKPixmap\fP &pixmap, bool fast=false)"
.br
.ti -1c
.RI "static \fBKPixmap\fP & \fBdesaturate\fP (\fBKPixmap\fP &pixmap, float desat=0.3)"
.br
.ti -1c
.RI "static \fBKPixmap\fP & \fBcontrast\fP (\fBKPixmap\fP &pixmap, int c)"
.br
.ti -1c
.RI "static \fBKPixmap\fP & \fBdither\fP (\fBKPixmap\fP &pixmap, const \fBQColor\fP *palette, int size)"
.br
.ti -1c
.RI "static \fBKPixmap\fP \fBselectedPixmap\fP (const \fBKPixmap\fP &pixmap, const \fBQColor\fP &col)"
.br
.in -1c
.SH "Detailed Description"
.PP 
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. 
.PP
Definition at line 27 of file kpixmapeffect.h.
.SH "Member Function Documentation"
.PP 
.SS "\fBKPixmap\fP & KPixmapEffect::gradient (\fBKPixmap\fP & pixmap, const \fBQColor\fP & ca, const \fBQColor\fP & cb, GradientType type, int ncols = \fC3\fP)\fC [static]\fP"
.PP
Creates a gradient from color a to color b of the specified type. 
.PP
\fBParameters:\fP
.RS 4
\fIpixmap\fP The pixmap to process. 
.br
\fIca\fP Color a. 
.br
\fIcb\fP Color b. 
.br
\fItype\fP The type of gradient. 
.br
\fIncols\fP The number of colors to use when not running on a truecolor display. The gradient will be dithered to this number of colors. Pass 0 to prevent dithering. 
.RE
.PP
\fBReturns:\fP
.RS 4
Returns the generated pixmap, for convenience. 
.RE
.PP

.PP
Definition at line 24 of file kpixmapeffect.cpp.
.PP
References QPainter::drawLine(), KImageEffect::gradient(), and QPainter::setPen().
.SS "\fBKPixmap\fP & KPixmapEffect::unbalancedGradient (\fBKPixmap\fP & pixmap, const \fBQColor\fP & ca, const \fBQColor\fP & cb, GradientType type, int xfactor = \fC100\fP, int yfactor = \fC100\fP, int ncols = \fC3\fP)\fC [static]\fP"
.PP
Creates an unbalanced gradient. 
.PP
An unbalanced gradient is a gradient where the transition from color a to color b is not linear, but in this case, exponential.
.PP
\fBParameters:\fP
.RS 4
\fIpixmap\fP The pixmap that should be written. 
.br
\fIca\fP Color a. 
.br
\fIcb\fP Color b. 
.br
\fItype\fP The type of gradient. 
.br
\fIxfactor\fP The x decay length. Use a value between -200 and 200. 
.br
\fIyfactor\fP The y decay length. 
.br
\fIncols\fP The number of colors. See \fBgradient\fP. 
.RE
.PP
\fBReturns:\fP
.RS 4
The generated pixmap, for convencience. 
.RE
.PP

.PP
Definition at line 88 of file kpixmapeffect.cpp.
.PP
References KImageEffect::unbalancedGradient().
.SS "\fBKPixmap\fP KPixmapEffect::createTiled (const \fBKPixmap\fP & pixmap, \fBQSize\fP size)\fC [static]\fP"
.PP
Creates a pixmap of a given size with the given pixmap. 
.PP
if the given size is bigger than the size of the pixmap, the pixmap is tiled.
.PP
\fBParameters:\fP
.RS 4
\fIpixmap\fP This is the source pixmap 
.br
\fIsize\fP The size the new pixmap should have. 
.RE
.PP
\fBReturns:\fP
.RS 4
The generated, tiled pixmap. 
.RE
.PP

.PP
Definition at line 240 of file kpixmapeffect.cpp.
.PP
References QPainter::drawTiledPixmap(), QSize::height(), and QSize::width().
.PP
Referenced by pattern().
.SS "\fBKPixmap\fP & KPixmapEffect::intensity (\fBKPixmap\fP & pixmap, float ratio)\fC [static]\fP"
.PP
Either brightens or dims a pixmap by a specified ratio. 
.PP
\fBParameters:\fP
.RS 4
\fIpixmap\fP The pixmap to process. 
.br
\fIratio\fP The ratio to use. Use negative value to dim. 
.RE
.PP
\fBReturns:\fP
.RS 4
Returns The pixmap(), provided for convenience. 
.RE
.PP

.PP
Definition at line 109 of file kpixmapeffect.cpp.
.PP
References QPixmap::convertToImage(), and KImageEffect::intensity().
.SS "\fBKPixmap\fP & KPixmapEffect::channelIntensity (\fBKPixmap\fP & pixmap, float ratio, RGBComponent channel)\fC [static]\fP"
.PP
Modifies the intensity of a pixmap's RGB channel component. 
.PP
\fBParameters:\fP
.RS 4
\fIpixmap\fP The pixmap to process. 
.br
\fIratio\fP value. Use negative value to dim. 
.br
\fIchannel\fP Which channel(s) should be modified 
.RE
.PP
\fBReturns:\fP
.RS 4
Returns the pixmap(), provided for convenience. 
.RE
.PP

.PP
Definition at line 121 of file kpixmapeffect.cpp.
.PP
References KImageEffect::channelIntensity(), and QPixmap::convertToImage().
.SS "\fBKPixmap\fP & KPixmapEffect::blend (\fBKPixmap\fP & pixmap, float initial_intensity, const \fBQColor\fP & bgnd, GradientType eff, bool anti_dir = \fCfalse\fP, int ncols = \fC3\fP)\fC [static]\fP"
.PP
Blends the provided pixmap into a background of the indicated color. 
.PP
\fBParameters:\fP
.RS 4
\fIpixmap\fP The pixmap to process. 
.br
\fIinitial_intensity\fP this parameter takes values from -1 to 1: 
.PD 0

.IP "\(bu" 2
If positive, it tells how much to fade the image in its less affected spot. 
.IP "\(bu" 2
If negative, it tells roughly indicates how much of the image remains unaffected 
.PP
.br
\fIbgnd\fP Indicates the color of the background to blend in. 
.br
\fIeff\fP Lets you choose what kind of blending you like. 
.br
\fIanti_dir\fP Blend in the opposite direction (makes no much sense with concentric blending effects). 
.br
\fIncols\fP The number of colors to dither the pixmap to. Only used for 8 bpp pixmaps. 
.RE
.PP
\fBReturns:\fP
.RS 4
Returns the pixmap(), provided for convenience. 
.RE
.PP

.PP
Definition at line 140 of file kpixmapeffect.cpp.
.PP
References KImageEffect::blend(), QImage::convertDepth(), QPixmap::convertToImage(), QImage::depth(), KImageEffect::dither(), and QColor::setRgb().
.SS "\fBKPixmap\fP & KPixmapEffect::hash (\fBKPixmap\fP & pixmap, Lighting lite = \fCNorthLite\fP, unsigned int spacing = \fC0\fP, int ncols = \fC3\fP)\fC [static]\fP"
.PP
Builds a hash on any given pixmap. 
.PP
\fBParameters:\fP
.RS 4
\fIpixmap\fP The pixmap to process. 
.br
\fIlite\fP The hash faces the indicated lighting (cardinal poles) 
.br
\fIspacing\fP How many unmodified pixels inbetween hashes. 
.br
\fIncols\fP The number of colors to dither the pixmap to. Only used for 8 bpp pixmaps. 
.RE
.PP
\fBReturns:\fP
.RS 4
Returns The pixmap(), provided for convenience. 
.RE
.PP

.PP
Definition at line 179 of file kpixmapeffect.cpp.
.PP
References QPixmap::convertToImage(), KImageEffect::dither(), KImageEffect::hash(), and QColor::setRgb().
.SS "\fBKPixmap\fP KPixmapEffect::pattern (const \fBKPixmap\fP & pixmap, \fBQSize\fP size, const \fBQColor\fP & ca, const \fBQColor\fP & cb, int ncols = \fC8\fP)\fC [static]\fP"
.PP
Creates a pattern from a pixmap. 
.PP
The given pixmap is 'flattened' between color a to color b. Doesn't change the original pixmap.
.PP
\fBParameters:\fP
.RS 4
\fIpixmap\fP The pixmap to process. 
.br
\fIsize\fP The size of the returned pixmap. If \fCsize\fP is larger than the original, the resulting pixmap will be tiled. 
.br
\fIca\fP Color a. 
.br
\fIcb\fP Color b. 
.br
\fIncols\fP The number of colors to use. The image will be dithered to this depth. Pass zero to prevent dithering. 
.RE
.PP
\fBReturns:\fP
.RS 4
The resulting pixmap. 
.RE
.PP

.PP
Definition at line 223 of file kpixmapeffect.cpp.
.PP
References KPixmap::convertFromImage(), QPixmap::convertToImage(), createTiled(), and KImageEffect::flatten().
.SS "\fBKPixmap\fP & KPixmapEffect::fade (\fBKPixmap\fP & pixmap, double val, const \fBQColor\fP & color)\fC [static]\fP"
.PP
Fades a pixmap to a certain color. 
.PP
\fBParameters:\fP
.RS 4
\fIpixmap\fP The pixmap to process. 
.br
\fIval\fP The strength of the effect. 0 <= val <= 1. 
.br
\fIcolor\fP The color to blend to. 
.RE
.PP
\fBReturns:\fP
.RS 4
Returns the pixmap(), provided for convenience. 
.RE
.PP

.PP
Definition at line 257 of file kpixmapeffect.cpp.
.PP
References QPixmap::convertToImage(), and KImageEffect::fade().
.SS "\fBKPixmap\fP & KPixmapEffect::toGray (\fBKPixmap\fP & pixmap, bool fast = \fCfalse\fP)\fC [static]\fP"
.PP
Converts a pixmap to grayscale. 
.PP
\fBParameters:\fP
.RS 4
\fIpixmap\fP The pixmap to process. 
.br
\fIfast\fP Set to \fCtrue\fP in order to use a faster but non-photographic quality algorithm. Appropriate for things such as toolbar icons. 
.RE
.PP
\fBReturns:\fP
.RS 4
Returns the pixmap(), provided for convenience. 
.RE
.PP

.PP
Definition at line 268 of file kpixmapeffect.cpp.
.PP
References QPixmap::convertToImage(), and KImageEffect::toGray().
.SS "\fBKPixmap\fP & KPixmapEffect::desaturate (\fBKPixmap\fP & pixmap, float desat = \fC0.3\fP)\fC [static]\fP"
.PP
Desaturates a pixmap. 
.PP
\fBParameters:\fP
.RS 4
\fIpixmap\fP The pixmap to process. 
.br
\fIdesat\fP A value between 0 and 1 setting the degree of desaturation 
.RE
.PP
\fBReturns:\fP
.RS 4
Returns The pixmap(), provided for convenience. 
.RE
.PP

.PP
Definition at line 278 of file kpixmapeffect.cpp.
.PP
References QPixmap::convertToImage(), and KImageEffect::desaturate().
.SS "\fBKPixmap\fP & KPixmapEffect::contrast (\fBKPixmap\fP & pixmap, int c)\fC [static]\fP"
.PP
Modifies the contrast of a pixmap. 
.PP
\fBParameters:\fP
.RS 4
\fIpixmap\fP The pixmap to process. 
.br
\fIc\fP A contrast value between -255 and 255. 
.RE
.PP
\fBReturns:\fP
.RS 4
Returns the pixmap(), provided for convenience. 
.RE
.PP

.PP
Definition at line 287 of file kpixmapeffect.cpp.
.PP
References KImageEffect::contrast(), and QPixmap::convertToImage().
.SS "\fBKPixmap\fP & KPixmapEffect::dither (\fBKPixmap\fP & pixmap, const \fBQColor\fP * palette, int size)\fC [static]\fP"
.PP
Dithers a pixmap using Floyd-Steinberg dithering for low-color situations. 
.PP
\fBParameters:\fP
.RS 4
\fIpixmap\fP The pixmap to process. 
.br
\fIpalette\fP The color palette to use. 
.br
\fIsize\fP The size of the palette. 
.RE
.PP
\fBReturns:\fP
.RS 4
Returns the pixmap(), provided for convenience. 
.RE
.PP

.PP
Definition at line 303 of file kpixmapeffect.cpp.
.PP
References QPixmap::convertToImage(), and KImageEffect::dither().
.SS "\fBKPixmap\fP KPixmapEffect::selectedPixmap (const \fBKPixmap\fP & pixmap, const \fBQColor\fP & col)\fC [static]\fP"
.PP
Calculate a 'selected' pixmap, for instance a selected icon on the desktop. 
.PP
\fBParameters:\fP
.RS 4
\fIpixmap\fP the pixmap to select 
.br
\fIcol\fP the selected color, usually from \fBQColorGroup::highlight()\fP. 
.RE
.PP

.PP
Definition at line 318 of file kpixmapeffect.cpp.
.PP
References KPixmap::convertFromImage(), QPixmap::convertToImage(), and KImageEffect::selectedImage().

.SH "Author"
.PP 
Generated automatically by Doxygen for kdefx Library from the source code.
