Faith::PixmapEffect Class Reference

#include <faith/pixmapeffect.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 Pixmapgradient (Pixmap &pixmap, const Color &ca, const Color &cb, GradientType type, int ncols=3)
static PixmapunbalancedGradient (Pixmap &pixmap, const Color &ca, const Color &cb, GradientType type, int xfactor=100, int yfactor=100, int ncols=3)
static PixmaptoGray (Pixmap &pixmap, bool fast=false)


Detailed Description

This class includes various pixmap-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::PixmapEffect::GradientType

Enumerator:
VerticalGradient 
HorizontalGradient 
DiagonalGradient 
CrossDiagonalGradient 
PyramidGradient 
RectangleGradient 
PipeCrossGradient 
EllipticGradient 


Member Function Documentation

static Pixmap& Faith::PixmapEffect::gradient ( Pixmap pixmap,
const Color ca,
const Color cb,
GradientType  type,
int  ncols = 3 
) [static]

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

Parameters:
pixmap The pixmap to process.
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.
Returns:
Returns the generated pixmap, for convenience.

static Pixmap& Faith::PixmapEffect::toGray ( Pixmap pixmap,
bool  fast = false 
) [static]

Converts a pixmap to grayscale.

Parameters:
pixmap The pixmap 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 pixmap, provided for convenience.

static Pixmap& Faith::PixmapEffect::unbalancedGradient ( Pixmap pixmap,
const Color ca,
const Color cb,
GradientType  type,
int  xfactor = 100,
int  yfactor = 100,
int  ncols = 3 
) [static]

Creates 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:
pixmap The pixmap that should be written.
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 gradient.
Returns:
The generated pixmap, for convencience.


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