openshot-audio  0.1.5
Public Member Functions | List of all members
GlowEffect Class Reference

#include <juce_GlowEffect.h>

Inheritance diagram for GlowEffect:
ImageEffectFilter

Public Member Functions

 GlowEffect ()
 
 ~GlowEffect ()
 
void setGlowProperties (float newRadius, Colour newColour)
 
void applyEffect (Image &sourceImage, Graphics &destContext, float scaleFactor, float alpha)
 
- Public Member Functions inherited from ImageEffectFilter
virtual ~ImageEffectFilter ()
 

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

Constructor & Destructor Documentation

◆ GlowEffect()

GlowEffect::GlowEffect ( )

Creates a default 'glow' effect.

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

◆ ~GlowEffect()

GlowEffect::~GlowEffect ( )

Destructor.

Member Function Documentation

◆ applyEffect()

void GlowEffect::applyEffect ( Image sourceImage,
Graphics destContext,
float  scaleFactor,
float  alpha 
)
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
sourceImagethe 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.
destContextthe graphics context to use to draw the resultant image.
scaleFactora 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
alphathe alpha with which to draw the resultant image to the target context

Implements ImageEffectFilter.

◆ setGlowProperties()

void GlowEffect::setGlowProperties ( float  newRadius,
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).


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