00001 /* This file is part of the KDE libraries 00002 Copyright (C) 1998, 1999, 2001, 2002 Daniel M. Duley <mosfet@interaccess.com> 00003 (C) 1998, 1999 Christian Tibirna <ctibirna@total.net> 00004 (C) 1998, 1999 Dirk A. Mueller <mueller@kde.org> 00005 00006 Redistribution and use in source and binary forms, with or without 00007 modification, are permitted provided that the following conditions 00008 are met: 00009 00010 1. Redistributions of source code must retain the above copyright 00011 notice, this list of conditions and the following disclaimer. 00012 2. Redistributions in binary form must reproduce the above copyright 00013 notice, this list of conditions and the following disclaimer in the 00014 documentation and/or other materials provided with the distribution. 00015 00016 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 00017 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 00018 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 00019 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 00020 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 00021 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00022 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00023 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00024 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 00025 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00026 00027 */ 00028 00029 #ifndef FAITH__IMAGEEFFECT_H 00030 #define FAITH__IMAGEEFFECT_H 00031 00032 00033 #include <faith/ui.h> 00034 00035 namespace Faith 00036 { 00037 00038 class Image; 00039 class Size; 00040 class Color; 00041 class Point; 00042 class Rect; 00043 00052 class FAITH_UI_EXPORT ImageEffect 00053 { 00054 public: 00060 enum GradientType 00061 { 00062 VerticalGradient, 00063 HorizontalGradient, 00064 DiagonalGradient, 00065 CrossDiagonalGradient, 00066 PyramidGradient, 00067 RectangleGradient, 00068 PipeCrossGradient, 00069 EllipticGradient 00070 }; 00071 00083 static Image gradient(const Size &size, const Color &ca, 00084 const Color &cb, GradientType type, int ncols=3); 00085 00100 static Image unbalancedGradient( 00101 const Size &size, const Color &ca, 00102 const Color &cb, GradientType type, int xfactor = 100, 00103 int yfactor = 100, int ncols = 3 00104 ); 00105 00115 static Image& toGray(Image &image, bool fast = false); 00116 }; 00117 00118 } 00119 00120 #endif
1.4.7