#include <faith/pixmapeffect.h>
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 Pixmap & | gradient (Pixmap &pixmap, const Color &ca, const Color &cb, GradientType type, int ncols=3) |
| static Pixmap & | unbalancedGradient (Pixmap &pixmap, const Color &ca, const Color &cb, GradientType type, int xfactor=100, int yfactor=100, int ncols=3) |
| static Pixmap & | toGray (Pixmap &pixmap, bool fast=false) |
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.
| 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.
| 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. |
Converts a pixmap to grayscale.
| 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. |
| 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.
| 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. |
1.4.7