Loading...
Searching...
No Matches
juce::GlowEffect Class Reference

## Detailed Description

A component effect that adds a coloured blur around the component's contents.

(This will only work on non-opaque components).

See also
  Component::setComponentEffect, DropShadowEffect

The documentation for this class was generated from the following file:

- juce_graphics/effects/juce_GlowEffect.h

Inheritance diagram for juce::GlowEffect:

## Public Member Functions

| GlowEffect ()
| Creates a default 'glow' effect.
| ~GlowEffect () override
| Destructor.
void | setGlowProperties (float newRadius, Colour newColour, Point< int > offset={})
| Sets the glow's radius and colour.
void | applyEffect (Image &, Graphics &, float scaleFactor, float alpha) override
| Overridden to render the effect.
Public Member Functions inherited from juce::ImageEffectFilter
virtual | ~ImageEffectFilter ()=default
| Destructor.

## Constructors and Destructors

## GlowEffect()

juce::GlowEffect::GlowEffect | ( |  | ) |

Creates a default 'glow' effect.

To customise its appearance, use the setGlowProperties() method.

## ~GlowEffect()

juce::GlowEffect::~GlowEffect | ( |  | ) |

override

Destructor.

## Member Functions

## setGlowProperties()

void juce::GlowEffect::setGlowProperties | ( | float | newRadius,
|  | Colour | newColour,
|  | Point< int > | offset = {} )

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).

## applyEffect()

void juce::GlowEffect::applyEffect | ( | Image & | sourceImage,
|  | Graphics & | destContext,
|  | float | scaleFactor,
|  | float | alpha )

override virtual

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.

Parameters

  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.
  scaleFactor | a scale factor that has been applied to the image - e.g. if this is 2, then the image is actually scaled-up to twice the original resolution
  alpha | the alpha with which to draw the resultant image to the target context

Implements juce::ImageEffectFilter.

References juce::Colours::white.

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited