author | sandman <sandman> | 2002-11-01 16:07:10 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-11-01 16:07:10 (UTC) |
commit | 9e4d914ade0af86707531a80e93a870e52738ce6 (patch) (side-by-side diff) | |
tree | 13bcdec43e9d1afc7392ce44cd72ff1289f0c8eb /noncore/styles/theme/ogfxeffect.h | |
parent | 28b70b2b7f8fa03ba0991fb73dccf7b46e5c3d1f (diff) | |
download | opie-9e4d914ade0af86707531a80e93a870e52738ce6.zip opie-9e4d914ade0af86707531a80e93a870e52738ce6.tar.gz opie-9e4d914ade0af86707531a80e93a870e52738ce6.tar.bz2 |
Some fixes and enhancements:
- don't rely on clipping information from Qt/E -- this doesn't work
- theme style has support for all KDE gradient types now
Diffstat (limited to 'noncore/styles/theme/ogfxeffect.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/styles/theme/ogfxeffect.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/noncore/styles/theme/ogfxeffect.h b/noncore/styles/theme/ogfxeffect.h index 45a8482..755537f 100644 --- a/noncore/styles/theme/ogfxeffect.h +++ b/noncore/styles/theme/ogfxeffect.h @@ -27,48 +27,51 @@ public: enum GradientType { VerticalGradient, HorizontalGradient, DiagonalGradient, CrossDiagonalGradient, PyramidGradient, RectangleGradient, PipeCrossGradient, EllipticGradient }; enum RGBComponent { Red, Green, Blue }; enum Lighting {NorthLite, NWLite, WestLite, SWLite, SouthLite, SELite, EastLite, NELite}; /** * Create a gradient from color a to color b of the specified type. * * @param pixmap The pixmap to process. * @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. * @return Returns the generated pixmap, for convenience. */ static QPixmap& gradient(QPixmap& pixmap, const QColor &ca, const QColor &cb, GradientType type, int ncols=3); + static QImage gradient (const QSize &size, const QColor &ca, const QColor &cb, + GradientType type, int ncols=3); + /** * Blend the provided pixmap into a background of the indicated color * * @param pixmap The pixmap to process. * @param initial_intensity this parameter takes values from -1 to 1: * @li If positive, it tells how much to fade the image in its * less affected spot. * @li If negative, it tells roughly indicates how much of the image * remains unaffected * @param bgnd Indicates the color of the background to blend in. * @param eff Lets you choose what kind of blending you like. * @param anti_dir Blend in the opposite direction (makes no much sense * with concentric blending effects). * @return Returns the @ref pixmap(), provided for convenience. */ static QPixmap& blend(QPixmap& pixmap, float initial_intensity, const QColor &bgnd, GradientType eff, bool anti_dir=false, int ncols=3); static QImage& blend(QImage &image, float initial_intensity, const QColor &bgnd, GradientType eff, bool anti_dir); |