JUCE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Public Member Functions | List of all members
DropShadowEffect Class Reference

An effect filter that adds a drop-shadow behind the image's content. More...

Inherits ImageEffectFilter.

Public Member Functions

 DropShadowEffect ()
 Creates a default drop-shadow effect.
 
 ~DropShadowEffect ()
 Destructor.
 
void setShadowProperties (const DropShadow &newShadow)
 Sets up parameters affecting the shadow's appearance.
 
void applyEffect (Image &sourceImage, Graphics &destContext, float scaleFactor, float alpha)
 
- Public Member Functions inherited from ImageEffectFilter
virtual ~ImageEffectFilter ()
 Destructor.
 

Detailed Description

An effect filter that adds a drop-shadow behind the image's content.

(This will only work on images/components that aren't opaque, of course).

When added to a component, this effect will draw a soft-edged shadow based on what gets drawn inside it. The shadow will also be applied to the component's children.

For speed, this doesn't use a proper gaussian blur, but cheats by using a simple bilinear filter. If you need a really high-quality shadow, check out ImageConvolutionKernel::createGaussianBlur()

See Also
Component::setComponentEffect

Constructor & Destructor Documentation

DropShadowEffect::DropShadowEffect ( )

Creates a default drop-shadow effect.

To customise the shadow's appearance, use the setShadowProperties() method.

DropShadowEffect::~DropShadowEffect ( )

Destructor.

Member Function Documentation

void DropShadowEffect::setShadowProperties ( const DropShadow newShadow)

Sets up parameters affecting the shadow's appearance.

void DropShadowEffect::applyEffect ( Image sourceImage,
Graphics destContext,
float  scaleFactor,
float  alpha 
)
virtual

Implements ImageEffectFilter.


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