A component effect that adds a coloured blur around the component's contents. More...
Inherits ImageEffectFilter.
Public Member Functions | |
| GlowEffect () | |
| Creates a default 'glow' effect. | |
| ~GlowEffect () | |
| Destructor. | |
| void | setGlowProperties (float newRadius, const Colour &newColour) |
| Sets the glow's radius and colour. | |
| void | applyEffect (Image &sourceImage, Graphics &destContext, float alpha) |
| Overridden to render the effect. | |
A component effect that adds a coloured blur around the component's contents.
(This will only work on non-opaque components).
| GlowEffect::GlowEffect | ( | ) |
Creates a default 'glow' effect.
To customise its appearance, use the setGlowProperties() method.
| GlowEffect::~GlowEffect | ( | ) |
Destructor.
| void GlowEffect::setGlowProperties | ( | float | newRadius, |
| const Colour & | newColour | ||
| ) |
Sets the glow's radius and colour.
The radius is how large the blur should be, and the colour is used to render it (for a less intense glow, lower the colour's opacity).
Overridden to render the effect.
The implementation of this method must use the image that is passed in as its source, and should render its output to the graphics context passed in.
| sourceImage | the image that the source component has just rendered with its paint() method. The image may or may not have an alpha channel, depending on whether the component is opaque. |
| destContext | the graphics context to use to draw the resultant image. |
| alpha | the alpha with which to draw the resultant image to the target context |
Implements ImageEffectFilter.