Draw shadow of layer-backed NSView beyond bounds
Asked Answered
D

0

6

I'd like to get a custom NSShadow on a borderless NSWindow, and since I'm also applying some animations on the window, I've set up the window's content view to be layer-backed.

When applying the NSShadow on the contentView, the shadow is clipped at the view's border:

enter image description here

One possibility would be to reduce contentView's rect (NSInsetRect), but then the NSWindow's resizing borders wouldn't match the window's appearance!

Is there any chance to draw the layer's shadow beyond its borders?

EDIT: The shown screenshot already has a -10 inset rect!

Delimitate answered 13/8, 2013 at 9:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.