.TH "KPixmapEffect" 3 "28 Jan 2004" "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 "\fBKPixmap\fP & \fBgradient\fP (\fBKPixmap\fP &pixmap, const  \fBQColor\fP &ca, const  \fBQColor\fP &cb, GradientType type, int ncols=3)"
.br
.RI "\fICreates a gradient from color a to color b of the specified type. \fP"
.ti -1c
.RI "\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
.RI "\fICreates an unbalanced gradient. \fP"
.ti -1c
.RI "\fBKPixmap\fP \fBcreateTiled\fP (const  \fBKPixmap\fP &pixmap, \fBQSize\fP size)"
.br
.RI "\fICreates a pixmap of a given size with the given pixmap. \fP"
.ti -1c
.RI "\fBKPixmap\fP & \fBintensity\fP (\fBKPixmap\fP &pixmap, float ratio)"
.br
.RI "\fIEither brightens or dims a pixmap by a specified ratio. \fP"
.ti -1c
.RI "\fBKPixmap\fP & \fBchannelIntensity\fP (\fBKPixmap\fP &pixmap, float ratio, RGBComponent channel)"
.br
.RI "\fIModifies the intensity of a pixmap's RGB channel component. \fP"
.ti -1c
.RI "\fBKPixmap\fP & \fBblend\fP (\fBKPixmap\fP &pixmap, float initial_intensity, const  \fBQColor\fP &bgnd, GradientType eff, bool anti_dir=false, int ncols=3)"
.br
.RI "\fIBlends the provided pixmap into a background of the indicated color. \fP"
.ti -1c
.RI "\fBKPixmap\fP & \fBhash\fP (\fBKPixmap\fP &pixmap, Lighting lite=NorthLite, unsigned int spacing=0, int ncols=3)"
.br
.RI "\fIBuilds a hash on any given pixmap. \fP"
.ti -1c
.RI "\fBKPixmap\fP \fBpattern\fP (const  \fBKPixmap\fP &pixmap, \fBQSize\fP size, const  \fBQColor\fP &ca, const  \fBQColor\fP &cb, int ncols=8)"
.br
.RI "\fICreates a pattern from a pixmap. \fP"
.ti -1c
.RI "\fBKPixmap\fP & \fBfade\fP (\fBKPixmap\fP &pixmap, double val, const  \fBQColor\fP &color)"
.br
.RI "\fIRecolors a pixmap. \fP"
.ti -1c
.RI "\fBKPixmap\fP & \fBtoGray\fP (\fBKPixmap\fP &pixmap, bool fast=false)"
.br
.RI "\fIConverts a pixmap to grayscale. \fP"
.ti -1c
.RI "\fBKPixmap\fP & \fBdesaturate\fP (\fBKPixmap\fP &pixmap, float desat=0.3)"
.br
.RI "\fIDesaturates a pixmap. \fP"
.ti -1c
.RI "\fBKPixmap\fP & \fBcontrast\fP (\fBKPixmap\fP &pixmap, int c)"
.br
.RI "\fIModifies the contrast of a pixmap. \fP"
.ti -1c
.RI "\fBKPixmap\fP & \fBdither\fP (\fBKPixmap\fP &pixmap, const  \fBQColor\fP *palette, int size)"
.br
.RI "\fIDithers a pixmap using Floyd-Steinberg dithering for low-color situations. \fP"
.ti -1c
.RI "\fBKPixmap\fP \fBselectedPixmap\fP (const  \fBKPixmap\fP &pixmap, const  \fBQColor\fP &col)"
.br
.RI "\fICalculate a 'selected' pixmap, for instance a selected icon on the desktop. \fP"
.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 26 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 = 3)\fC [static]\fP"
.PP
Creates a gradient from color a to color b of the specified type. \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
Definition at line 24 of file kpixmapeffect.cpp.
.PP
References QColor::blue(), KPixmap::convertFromImage(), QPixmap::depth(), QPainter::drawLine(), KImageEffect::gradient(), QColor::green(), QPixmap::height(), QColor::red(), QPainter::setPen(), QPixmap::size(), and QPixmap::width().
.SS "\fBKPixmap\fP & KPixmapEffect::unbalancedGradient (\fBKPixmap\fP & pixmap, const \fBQColor\fP & ca, const \fBQColor\fP & cb, GradientType type, int xfactor = 100, int yfactor = 100, int ncols = 3)\fC [static]\fP"
.PP
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.
.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
Definition at line 88 of file kpixmapeffect.cpp.
.PP
References KPixmap::convertFromImage(), QPixmap::size(), and 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. 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
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. \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 \fBpixmap\fP(), provided for convenience. 
.RE
.PP
Definition at line 109 of file kpixmapeffect.cpp.
.PP
References KPixmap::convertFromImage(), 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. \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 \fBpixmap\fP(), provided for convenience. 
.RE
.PP
Definition at line 121 of file kpixmapeffect.cpp.
.PP
References KImageEffect::channelIntensity(), KPixmap::convertFromImage(), and QPixmap::convertToImage().
.SS "\fBKPixmap\fP & KPixmapEffect::blend (\fBKPixmap\fP & pixmap, float initial_intensity, const \fBQColor\fP & bgnd, GradientType eff, bool anti_dir = false, int ncols = 3)\fC [static]\fP"
.PP
Blends the provided pixmap into a background of the indicated color. \fBParameters:\fP
.RS 4
\fIpixmap\fP The pixmap to process. 
.br
\fIinitial_intensity\fP this parameter takes values from -1 to 1: 
.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). 
.RE
.PP
\fBReturns:\fP
.RS 4
Returns the \fBpixmap\fP(), provided for convenience. 
.RE
.PP
Definition at line 140 of file kpixmapeffect.cpp.
.PP
References KImageEffect::blend(), QImage::convertDepth(), KPixmap::convertFromImage(), QPixmap::convertToImage(), QPixmap::depth(), QImage::depth(), KImageEffect::dither(), and QColor::setRgb().
.SS "\fBKPixmap\fP & KPixmapEffect::hash (\fBKPixmap\fP & pixmap, Lighting lite = NorthLite, unsigned int spacing = 0, int ncols = 3)\fC [static]\fP"
.PP
Builds a hash on any given pixmap. \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. 
.RE
.PP
\fBReturns:\fP
.RS 4
Returns The \fBpixmap\fP(), provided for convenience. 
.RE
.PP
Definition at line 179 of file kpixmapeffect.cpp.
.PP
References KPixmap::convertFromImage(), QPixmap::convertToImage(), QPixmap::depth(), 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 = 8)\fC [static]\fP"
.PP
Creates a pattern from a pixmap. The given pixmap is 'flattened' between color a to color b.
.PP
\fBParameters:\fP
.RS 4
\fIpixmap\fP The pixmap to process. 
.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 \fBpixmap\fP(), provided for convenience. 
.RE
.PP
Definition at line 223 of file kpixmapeffect.cpp.
.PP
References KPixmap::convertFromImage(), QPixmap::convertToImage(), createTiled(), QPixmap::depth(), and KImageEffect::flatten().
.SS "\fBKPixmap\fP & KPixmapEffect::fade (\fBKPixmap\fP & pixmap, double val, const \fBQColor\fP & color)\fC [static]\fP"
.PP
Recolors a pixmap. The most dark color will become color a, the most bright one color b, and in between.
.PP
\fBParameters:\fP
.RS 4
\fIpixmap\fP The pixmap to process. 
.br
\fIca\fP Color a. 
.br
\fIcb\fP Color b. 
.br
\fIncols\fP The number of colors to use. Pass zero to prevent dithering. 
.RE
.PP
\fBReturns:\fP
.RS 4
Returns the \fBpixmap\fP(), provided for convenience. 
.RE
.PP
Definition at line 257 of file kpixmapeffect.cpp.
.PP
References KPixmap::convertFromImage(), QPixmap::convertToImage(), and KImageEffect::fade().
.SS "\fBKPixmap\fP & KPixmapEffect::toGray (\fBKPixmap\fP & pixmap, bool fast = false)\fC [static]\fP"
.PP
Converts a pixmap to grayscale. \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 \fBpixmap\fP(), provided for convenience. 
.RE
.PP
Definition at line 268 of file kpixmapeffect.cpp.
.PP
References KPixmap::convertFromImage(), QPixmap::convertToImage(), and KImageEffect::toGray().
.SS "\fBKPixmap\fP & KPixmapEffect::desaturate (\fBKPixmap\fP & pixmap, float desat = 0.3)\fC [static]\fP"
.PP
Desaturates a pixmap. \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 \fBpixmap\fP(), provided for convenience. 
.RE
.PP
Definition at line 278 of file kpixmapeffect.cpp.
.PP
References KPixmap::convertFromImage(), 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. \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 \fBpixmap\fP(), provided for convenience. 
.RE
.PP
Definition at line 287 of file kpixmapeffect.cpp.
.PP
References KImageEffect::contrast(), KPixmap::convertFromImage(), 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. \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 \fBpixmap\fP(), provided for convenience. 
.RE
.PP
Definition at line 303 of file kpixmapeffect.cpp.
.PP
References KPixmap::convertFromImage(), 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. \fBParameters:\fP
.RS 4
\fIpixmap\fP the pixmap to select 
.br
\fIcol\fP the selected color, usually from \fBQColorGroup::highlight()\fP. 
.RE
.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.
