class KImageEffect
|
This class includes various QImage based graphical effects. More... |
|
|
Public Types
- enum GradientType {VerticalGradient, HorizontalGradient, DiagonalGradient, CrossDiagonalGradient, PyramidGradient, RectangleGradient, PipeCrossGradient, EllipticGradient }
- enum RGBComponent {Red, Green, Blue, Gray, All }
- enum Lighting {NorthLite, NWLite, WestLite, SWLite, SouthLite, SELite, EastLite, NELite}
- enum ModulationType {Intensity, Saturation, HueShift, Contrast }
Public Static Methods
- static QImage gradient (const QSize &size, const QColor &ca, const QColor &cb, GradientType type, int ncols=3)
- static QImage unbalancedGradient (const QSize &size, const QColor &ca, const QColor &cb, GradientType type, int xfactor = 100, int yfactor = 100, int ncols = 3)
- static QImage& blend (QImage &image, float initial_intensity, const QColor &bgnd, GradientType eff, bool anti_dir=false)
- static QImage& blend (QImage &image1,QImage &image2, GradientType gt, int xf=100, int yf=100)
- static QImage& blend (QImage &image1, QImage &image2, QImage &blendImage, RGBComponent channel)
- static QImage& channelIntensity (QImage &image, float percent, RGBComponent channel)
- static QImage& fade (QImage &img, float val, const QColor &color)
- static QImage& flatten (QImage &image, const QColor &ca, const QColor &cb, int ncols=0)
- static QImage& hash (QImage &image, Lighting lite=NorthLite, unsigned int spacing=0)
- static QImage& intensity (QImage &image, float percent)
- static QImage& modulate (QImage &image, QImage &modImage, bool reverse, ModulationType type, int factor, RGBComponent channel)
- static QImage& toGray (QImage &image, bool fast = false)
- static QImage& desaturate (QImage &image, float desat = 0.3)
- static QImage& contrast (QImage &image, int c)
- static QImage& dither (QImage &img, const QColor *palette, int size)
Detailed Description
This class includes various QImage 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.
enum GradientType {VerticalGradient, HorizontalGradient, DiagonalGradient, CrossDiagonalGradient, PyramidGradient, RectangleGradient, PipeCrossGradient, EllipticGradient }
|
enum RGBComponent {Red, Green, Blue, Gray, All }
|
enum Lighting {NorthLite, NWLite, WestLite, SWLite, SouthLite, SELite, EastLite, NELite}
|
enum ModulationType {Intensity, Saturation, HueShift, Contrast }
|
[static]
Create a gradient from color a to color b of the specified type.
Parameters:
| |
QImage unbalancedGradient (const QSize &size, const QColor &ca, const QColor &cb, GradientType type, int xfactor = 100, int yfactor = 100, int ncols = 3)
|
[static]
Create 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.
Parameters:
| |
QImage& blend (QImage &image, float initial_intensity, const QColor &bgnd, GradientType eff, bool anti_dir=false)
|
[static]
Blend the provided image into a background of the indicated color.
Parameters:
| |
[static]
Blend an image into another one, using a gradient type
for blending from one to another.
Parameters:
| |
[static]
Blend an image into another one, using a color channel of a
third image for the decision of blending from one to another.
Parameters:
| |
QImage& channelIntensity (QImage &image, float percent, RGBComponent channel)
|
[static]
Modifies the intensity of a pixmap's RGB channel component.
Parameters:
| |
Returns: The image, provided for convenience.
[static]
Fade an image to a certain background color.
The number of colors will not be changed.
Parameters:
| |
Returns: Returns the image(), provided for convenience.
[static]
This recolors a pixmap. The most dark color will become color a,
the most bright one color b, and in between.
Parameters:
| |
QImage& hash (QImage &image, Lighting lite=NorthLite, unsigned int spacing=0)
|
[static]
Build a hash on any given QImage
Parameters:
| |
Returns: Returns the image(), provided for convenience.
[static]
Either brighten or dim the image by a specified percent.
For example, .50 will modify the colors by 50%.
Parameters:
| |
Returns: Returns The image(), provided for convenience.
QImage& modulate (QImage &image, QImage &modImage, bool reverse, ModulationType type, int factor, RGBComponent channel)
|
[static]
Modulate the image with a color channel of another image.
Parameters:
| |
Returns: Returns the image(), provided for convenience.
[static]
Convert an image to grayscale.
Parameters:
| |
Returns: Returns the image(), provided for convenience.
[static]
Desaturate an image evenly.
Parameters:
| |
Returns: Returns the image(), provided for convenience.
[static]
Modifie the contrast of an image.
Parameters:
| |
Returns: The image(), provided for convenience.
[static]
Dither an image using Floyd-Steinberg dithering for low-color
situations.
Parameters:
| |
Returns: Returns the image(), provided for convenience.
Generated by: prospector@porky.devel.redhat.com on Fri Nov 3 09:58:47 2000, using kdoc 2.0a42. |