Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

ImageEffect Class Reference

This class adds functionality not present in KImageEffect. More...

#include <image_effect.h>

List of all members.

Static Public Methods

void blendOnLower (int x_offset, int y_offset, QImage const &upper, QImage &lower)
void blend (QImage &image, float val, QRgb color, bool fade_rgb, bool fade_alpha)
void blend (QImage &image, int val, QRgb color, bool fade_rgb, bool fade_alpha)
void colorize (QImage &image, float val, QRgb color)
void colorize (QImage &image, int val, QRgb color)
void scale (QImage &image, int new_width, int new_height)

Static Private Methods

void calcScaleFactors (int from_pixels, int to_pixels, int sum, std::vector< int > &lengths, std::vector< int > &starts, std::vector< int > &factor_offsets, std::vector< Q_UINT32 > &factors)


Detailed Description

This class adds functionality not present in KImageEffect.

Author:
Ralf Schmelter (ralfs@pc2a.chemie.uni-dortmund.de).
Version:
0.1


Member Function Documentation

void ImageEffect::blend QImage & image,
int val,
QRgb color,
bool fade_rgb,
bool fade_alpha
[static]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

void ImageEffect::blend QImage & image,
float val,
QRgb color,
bool fade_rgb,
bool fade_alpha
[static]
 

Blend the image to the given color.

Parameters:
image   The image to fade.
The   blend ammount (in the range [0:1]).
color   The color to blend to.
fade_rgb   If true, we blend the rgb channels.
fade_alpha   If true, we blend the alpha channel.

void ImageEffect::blendOnLower int x_offset,
int y_offset,
QImage const & upper,
QImage & lower
[static]
 

Blends the upper image on the lower.

In contrast to KImageEffect::blendOnLower() the alpha channel of the resulting image is calculated correctly. The implementation is taken mostly from KImageEffect::blendOnLower(), with only small adjustments.

Note that both images must be 32bit images.

Parameters:
x_offset   The x-offset of the upper image.
y_offset   The y-offset of the upper image.
upper   The upper image.
lower   The lower image, which also holds the result.

void ImageEffect::calcScaleFactors int from_pixels,
int to_pixels,
int sum,
std::vector< int > & lengths,
std::vector< int > & starts,
std::vector< int > & factor_offsets,
std::vector< Q_UINT32 > & factors
[static, private]
 

Creates the scale factor vectors.

Parameters:
from_pixels   The original number of pixels.
to_pixels   The new number of pixels.
sum   The sum of the factors.
lengths   Here we store the number pixels for the new pixels.
starts   Here we store of indices of the start pixels.
factor_offsets   Here we store the offsets in the factors array.
factors   Here we store the factos.

void ImageEffect::colorize QImage & image,
int val,
QRgb color
[static]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

void ImageEffect::colorize QImage & image,
float val,
QRgb color
[static]
 

Colorizes the image to the given color.

Parameters:
image   The image to fade.
The   colorize ammount (in the range [0:1]).
color   The color to fade to.
fade_rgb   If true, we fade the rgb channels.
fade_alpha   If true, we fade the alpha channel.

void ImageEffect::scale QImage & image,
int new_width,
int new_height
[static]
 

Scales the image.

Parameters:
image   The image to use.
new_width   The new width.
new_height   The new height.


The documentation for this class was generated from the following file:
Generated at Sun Jan 6 18:49:11 2002 for EasySok by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001