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); |