Diffstat (limited to 'libopie2/opieui/oimageeffect.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opieui/oimageeffect.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libopie2/opieui/oimageeffect.h b/libopie2/opieui/oimageeffect.h index 313ea50..fb4d22d 100644 --- a/libopie2/opieui/oimageeffect.h +++ b/libopie2/opieui/oimageeffect.h @@ -1,130 +1,131 @@ //FIXME: Revise for Opie - do we really need such fancy stuff on PDA's? //FIXME: Maybe not on SL5xxx, but surely on C700 :)) +//FIXME: I think we don#t need that -zecke /* This file is part of the KDE libraries Copyright (C) 1998, 1999, 2001, 2002 Daniel M. Duley <mosfet@interaccess.com> (C) 1998, 1999 Christian Tibirna <ctibirna@total.net> (C) 1998, 1999 Dirk A. Mueller <mueller@kde.org> Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // $Id$ #ifndef OIMAGEEFFECT_H #define OIMAGEEFFECT_H class QImage; class QSize; class QColor; /** * This class includes various @ref 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. */ class OImageEffect { public: 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 }; enum NoiseType { UniformNoise=0, GaussianNoise, MultiplicativeGaussianNoise, ImpulseNoise, LaplacianNoise, PoissonNoise}; enum RotateDirection{ Rotate90, Rotate180, Rotate270 }; /** * Create a gradient from color a to color b of the specified type. * * @param size The desired size of the gradient. * @param ca Color a * @param cb Color b * @param type The type of gradient. * @param ncols 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. */ static QImage gradient(const QSize &size, const QColor &ca, const QColor &cb, GradientType type, int ncols=3); /** * 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. * * @param size The desired size of the gradient. * @param ca Color a * @param cb Color b * @param type The type of gradient. * @param xfactor The x decay length. Use a value between -200 and 200. * @param yfactor The y decay length. * @param ncols The number of colors. See OPixmapEffect:gradient. */ static QImage unbalancedGradient(const QSize &size, const QColor &ca, const QColor &cb, GradientType type, int xfactor = 100, int yfactor = 100, int ncols = 3); /** * Blends a color into the destination image, using an opacity * value for blending one into another. Very fast direct pixel * manipulation is used. * * @author Karol Szwed (gallium@kde.org) * @param clr source color to be blended into the destination image. * @param dst destination image in which the source will be blended into. * @param opacity opacity (in percent) which determines how much the source * color will be blended into the destination image. * @return The destination image (dst) containing the result. */ static QImage& blend(const QColor& clr, QImage& dst, float opacity); /** * Blend the src image into the destination image, using an opacity * value for blending one into another. Very fast direct pixel * manipulation is used. * * @author Karol Szwed (gallium@kde.org) * @param src source image to be blended into the destination image. * @param dst destination image in which the source will be blended into. * @param opacity opacity (in percent) which determines how much the source * image will be blended into the destination image. * @return The destination image (dst) containing the result. */ static QImage& blend(QImage& src, QImage& dst, float opacity); /** * Blend the provided image into a background of the indicated color. |