JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::GlowEffect Class Reference

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

#include <juce_GlowEffect.h>

Inheritance diagram for juce::GlowEffect:
Collaboration diagram for juce::GlowEffect:

Public Member Functions

 GlowEffect ()
 Creates a default 'glow' effect. More...
 
 ~GlowEffect () override
 Destructor. More...
 
void applyEffect (Image &, Graphics &, float scaleFactor, float alpha) override
 
void setGlowProperties (float newRadius, Colour newColour, Point< int > offset={})
 Sets the glow's radius and colour. More...
 

Private Attributes

Colour colour { Colours::white }
 
Point< intoffset
 
float radius = 2.0f
 

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

@tags{Graphics}

Constructor & Destructor Documentation

◆ GlowEffect()

juce::GlowEffect::GlowEffect ( )

Creates a default 'glow' effect.

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

◆ ~GlowEffect()

juce::GlowEffect::~GlowEffect ( )
override

Destructor.

Member Function Documentation

◆ applyEffect()

void juce::GlowEffect::applyEffect ( Image ,
Graphics ,
float  scaleFactor,
float  alpha 
)
overridevirtual

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

Member Data Documentation

◆ colour

Colour juce::GlowEffect::colour { Colours::white }
private

◆ offset

Point<int> juce::GlowEffect::offset
private

◆ radius

float juce::GlowEffect::radius = 2.0f
private

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