#include <piece_image_effect.h>
Public Methods | |
| PieceImageEffect () | |
| PieceImageEffect (QDomElement const &dom_element) | |
| QImage | apply (QImage const &image) const |
| bool | operator== (PieceImageEffect const &other_effect) const |
Private Types | |
| enum | EffectType { MOVE, ROTATE_LEFT, ROTATE_RIGHT, UTURN, HMIRROR, VMIRROR, BLEND_RGB, BLEND_RGBA, BLEND_ALPHA, COLORIZE, SCALE, CROP } |
Private Methods | |
| void | putFactor (QDomElement const &element, QString const &name, int scale) |
| void | putColor (QDomElement const &element) |
| void | rotate90 (QImage &image) const |
| void | rotate180 (QImage &image) const |
| void | rotate270 (QImage &image) const |
| void | horizontalMirror (QImage &image) const |
| void | verticalMirror (QImage &image) const |
| void | blendRgb (QImage &image, int factor, int red, int green, int blue) const |
| void | blendRgba (QImage &image, int factor, int red, int green, int blue, int alpha) const |
| void | blendAlpha (QImage &image, int factor, int alpha) const |
| void | colorize (QImage &image, int factor, int red, int green, int blue) const |
| void | crop (QImage &image, int x_offset, int y_offset, int width, int height) const |
| void | move (QImage &image, int x_offset, int y_offset) const |
| void | scale (QImage &image, int width, int height) const |
Private Attributes | |
| std::vector< int > | m_effects |
| std::vector< int > | m_parameters |
|
|
The type of effects.
|
|
|
Creates an empty object with no effects.
|
|
|
Creates the effect from an dom element.
|
|
|
Returns a new version of a given image, with all effects specified applied.
|
|
||||||||||||||||||||||
|
Blends the alpha channel of the image to a specific value.
|
|
||||||||||||||||||||||||||||||||||||
|
Blends the image to a color.
|
|
|||||||||||||||||||||||||||||||||||||||||||
|
Blends the image to a color.
|
|
||||||||||||||||||||||||||||||||||||
|
Colorizes the image to a color.
|
|
||||||||||||||||||||||||||||||||||||
|
Crops the image.
|
|
|
Does horizontal mirroring.
|
|
||||||||||||||||||||||
|
Moves the image.
|
|
|
Returns true if the two piece image effects are equal.
|
|
|
Puts the color (rgba values) to the parameter list.
|
|
||||||||||||||||||||||
|
Puts a to an integer converted double factor to the parameter list.
|
|
|
Does rotate 180.
|
|
|
Does rotate 270.
|
|
|
Does rotate 90.
|
|
||||||||||||||||||||||
|
Scales the image.
|
|
|
Does vertical mirroring.
|
|
|
The effects.
|
|
|
The parameters of the effects.
|
1.2.9.1 written by Dimitri van Heesch,
© 1997-2001