Add remaining files
[juce-lv2.git] / juce / source / src / gui / graphics / effects / juce_GlowEffect.h
blobe843c053d905a5befedf313e0070f0be38417d01
1 /*
2 ==============================================================================
4 This file is part of the JUCE library - "Jules' Utility Class Extensions"
5 Copyright 2004-11 by Raw Material Software Ltd.
7 ------------------------------------------------------------------------------
9 JUCE can be redistributed and/or modified under the terms of the GNU General
10 Public License (Version 2), as published by the Free Software Foundation.
11 A copy of the license is included in the JUCE distribution, or can be found
12 online at www.gnu.org/licenses.
14 JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
18 ------------------------------------------------------------------------------
20 To release a closed-source product which uses JUCE, commercial licenses are
21 available: visit www.rawmaterialsoftware.com/juce for more information.
23 ==============================================================================
26 #ifndef __JUCE_GLOWEFFECT_JUCEHEADER__
27 #define __JUCE_GLOWEFFECT_JUCEHEADER__
29 #include "juce_ImageEffectFilter.h"
32 //==============================================================================
33 /**
34 A component effect that adds a coloured blur around the component's contents.
36 (This will only work on non-opaque components).
38 @see Component::setComponentEffect, DropShadowEffect
40 class JUCE_API GlowEffect : public ImageEffectFilter
42 public:
43 //==============================================================================
44 /** Creates a default 'glow' effect.
46 To customise its appearance, use the setGlowProperties() method.
48 GlowEffect();
50 /** Destructor. */
51 ~GlowEffect();
53 //==============================================================================
54 /** Sets the glow's radius and colour.
56 The radius is how large the blur should be, and the colour is
57 used to render it (for a less intense glow, lower the colour's
58 opacity).
60 void setGlowProperties (float newRadius,
61 const Colour& newColour);
64 //==============================================================================
65 /** @internal */
66 void applyEffect (Image& sourceImage, Graphics& destContext, float alpha);
68 private:
69 //==============================================================================
70 float radius;
71 Colour colour;
73 JUCE_LEAK_DETECTOR (GlowEffect);
77 #endif // __JUCE_GLOWEFFECT_JUCEHEADER__