Faith::ImageEffect Class Reference

#include <faith/imageeffect.h>

List of all members.

Public Types

 VerticalGradient
 HorizontalGradient
 DiagonalGradient
 CrossDiagonalGradient
 PyramidGradient
 RectangleGradient
 PipeCrossGradient
 EllipticGradient
enum  GradientType {
  VerticalGradient, HorizontalGradient, DiagonalGradient, CrossDiagonalGradient,
  PyramidGradient, RectangleGradient, PipeCrossGradient, EllipticGradient
}

Static Public Member Functions

static Image gradient (const Size &size, const Color &ca, const Color &cb, GradientType type, int ncols=3)
static Image unbalancedGradient (const Size &size, const Color &ca, const Color &cb, GradientType type, int xfactor=100, int yfactor=100, int ncols=3)
static ImagetoGray (Image &image, bool fast=false)


Detailed Description

This class includes various Image 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.


Member Enumeration Documentation

enum Faith::ImageEffect::GradientType

This enum provides a gradient type specification

See also:
ImageEffect::blend(), ImageEffect::gradient(), ImageEffect::unbalancedGradient()
Enumerator:
VerticalGradient 
HorizontalGradient 
DiagonalGradient 
CrossDiagonalGradient 
PyramidGradient 
RectangleGradient 
PipeCrossGradient 
EllipticGradient 


Member Function Documentation

static Image Faith::ImageEffect::gradient ( const Size size,
const Color ca,
const Color cb,
GradientType  type,
int  ncols = 3 
) [static]

Create a gradient from color a to color b of the specified type.

Parameters:
size The desired size of the gradient.
ca Color a
cb Color b
type The type of gradient.
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 Image& Faith::ImageEffect::toGray ( Image image,
bool  fast = false 
) [static]

Convert an image to grayscale.

Parameters:
image The QImage to process.
fast Set to true in order to use a faster but non-photographic quality algorithm. Appropriate for things such as toolbar icons.
Returns:
Returns the image(), provided for convenience.
Author:
Daniel M. Duley (mosfet)

static Image Faith::ImageEffect::unbalancedGradient ( const Size size,
const Color ca,
const Color 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:
size The desired size of the gradient.
ca Color a
cb Color b
type The type of gradient.
xfactor The x decay length. Use a value between -200 and 200.
yfactor The y decay length.
ncols The number of colors. See ImageEffect:gradient.


The documentation for this class was generated from the following file:
Generated on Fri Sep 1 00:23:09 2006 for Faith by  doxygen 1.4.7