#include <faith/imageeffect.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 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 Image & | toGray (Image &image, 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.
This enum provides a gradient type specification
| 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.
Convert an image to grayscale.
| 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. |
| 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.
| 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. |
1.4.7