# Drawing shadows with graphics class?

**URL:** <https://forum.juce.com/t/drawing-shadows-with-graphics-class/3794>\
**Category:** General JUCE discussion\
**Created:** [March 27, 2009, 9:19pm UTC](https://forum.juce.com/t/drawing-shadows-with-graphics-class/3794 "2009-03-27T21:19:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![amcleran](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@amcleran](https://forum.juce.com/u/amcleran)\
**Post date:** [March 27, 2009, 9:19pm UTC](https://forum.juce.com/t/drawing-shadows-with-graphics-class/3794/1 "2009-03-27T21:19:06Z")

</div>

Hi,

Is it possible to automatically draw drop shadows on drawn graphics objects? I know you can assign the DropShadowEffect() to components, but what about about Graphics()? If not, I’d like to make an official feature request… 🙂

I would like to be able to do something similar to the Cocoa NSShadow class:

```auto
NSShadow* theShadow = [[NSShadow alloc] init];
[theShadow setShadowOffset:NSMakeSize(2.0f, 0.0f)];
[theShadow setShadowBlurRadius:5.0f];
[theShadow setShadowColor:[[NSColor blackColor] colorWithAlphaComponent:0.5f]];
[theShadow set];

// bunch of drawing that now has drop shadow...

[theShadow release];
```

so it might look like:

```auto
DropShadowEffect theShadow();
theShadow.setShadowProperties(5.0f, 0.5f, 2.0f, 0.0f);
g.setShadow(theShadow); // here is the new bit of code?
g.drawStuff(); // i.e. rectangles, etc
```

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [March 28, 2009, 11:47am UTC](https://forum.juce.com/t/drawing-shadows-with-graphics-class/3794/2 "2009-03-28T11:47:25Z")

</div>

I’ve got some ideas for a new way of handling the drawing code that would allow this kind of thing…

---

<div class="post-metadata">

**Author:** ![amcleran](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@amcleran](https://forum.juce.com/u/amcleran)\
**Post date:** [March 28, 2009, 8:25pm UTC](https://forum.juce.com/t/drawing-shadows-with-graphics-class/3794/3 "2009-03-28T20:25:28Z")

</div>

Great! I’ll be looking forward to it…
