Loading...
Searching...
No Matches
juce::DropShadow Struct Reference

## Detailed Description

Defines a drop-shadow effect.

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

- juce_graphics/effects/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 { 0x90000000 }
| The colour with which to render the shadow.
int | radius { 4 }
| The approximate spread of the shadow.
Point< int > | offset
| The offset of the shadow.

## Constructors and Destructors

## DropShadow() [1/2]

juce::DropShadow::DropShadow | ( |  | ) |

default

Creates a default drop-shadow effect.

## DropShadow() [2/2]

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

noexcept

Creates a drop-shadow object with the given parameters.

References offset, and radius.

## Member Functions

## drawForImage()

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

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

## drawForPath()

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

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

## 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.

## Member Data Documentation

## colour

Colour juce::DropShadow::colour { 0x90000000 }

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

## radius

int juce::DropShadow::radius { 4 }

The approximate spread of the shadow.

Referenced by DropShadow().

## offset

Point<int> juce::DropShadow::offset

The offset of the shadow.

Referenced by DropShadow().

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited