JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
juce::DropShadow Struct Reference

Defines a drop-shadow effect. More...

#include "juce_DropShadowEffect.h"

Public Member Functions

 DropShadow ()=default
 Creates a default drop-shadow effect.
 
 DropShadow (Colour shadowColour, int radius, Point< int > offset) noexcept
 Creates a drop-shadow object with the given parameters.
 
void drawForImage (Graphics &g, const Image &srcImage) const
 Renders a drop-shadow based on the alpha-channel of the given image.
 
void drawForPath (Graphics &g, const Path &path) const
 Renders a drop-shadow based on the shape of a path.
 
void drawForRectangle (Graphics &g, const Rectangle< int > &area) const
 Renders a drop-shadow for a rectangle.
 

Public Attributes

Colour colour
 The colour with which to render the shadow.
 
int radius
 The approximate spread of the shadow.
 
Point< intoffset
 The offset of the shadow.
 

Detailed Description

Defines a drop-shadow effect.

@tags{Graphics}

Definition at line 35 of file juce_DropShadowEffect.h.

Constructor & Destructor Documentation

◆ DropShadow()

juce::DropShadow::DropShadow ( Colour  shadowColour,
int  radius,
Point< int offset 
)
noexcept

Creates a drop-shadow object with the given parameters.

Definition at line 70 of file juce_DropShadowEffect.cpp.

Member Function Documentation

◆ drawForImage()

void juce::DropShadow::drawForImage ( Graphics g,
const Image srcImage 
) const

Renders a drop-shadow based on the alpha-channel of the given image.

Definition at line 76 of file juce_DropShadowEffect.cpp.

◆ drawForPath()

void juce::DropShadow::drawForPath ( Graphics g,
const Path path 
) const

Renders a drop-shadow based on the shape of a path.

Definition at line 92 of file juce_DropShadowEffect.cpp.

◆ drawForRectangle()

void juce::DropShadow::drawForRectangle ( Graphics g,
const Rectangle< int > &  area 
) const

Renders a drop-shadow for a rectangle.

Note that for speed, this approximates the shadow using gradients.

Definition at line 129 of file juce_DropShadowEffect.cpp.

Member Data Documentation

◆ colour

Colour juce::DropShadow::colour

The colour with which to render the shadow.

In most cases you'll probably want to leave this as black with an alpha value of around 0.5

Definition at line 58 of file juce_DropShadowEffect.h.

◆ offset

Point<int> juce::DropShadow::offset

The offset of the shadow.

Definition at line 64 of file juce_DropShadowEffect.h.

◆ radius

int juce::DropShadow::radius

The approximate spread of the shadow.

Definition at line 61 of file juce_DropShadowEffect.h.


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