View Single Post
Bug: Can't reset shadow to immediately beneath object

Workaround: Create different layers and put the graphics in the right layer such that the shadow is cast on the layer.

set middleLayer to make new layer at end of layers with properties {name:"middleLayer"}
set imageShape to make new shape at end of graphics of middleLayer with properties {draws shadow:true, size:{218, 150}, origin:{25, 28}, thickness:1, shadow vector:{3, -3}}
-- Can't set image directly in a layer
tell imageShape to set {image} to {"/path/to/image.jpg"}

set backLayer to make new layer at end of layers with properties {name:"backLayer"}
set backShape to make new shape at beginning of graphics of backLayer with properties {draws shadow:false, size:{270, 198}, origin:{0, 0}, thickness:0, fill:"linear blend", fill color:{0.576, 0.576, 0.576}, gradient color:{0.18, 0.18, 0.18}, gradient angle:90, gradient center:{-1, -1}}
And now the shadow from the image appears on the background shape.

Issues: You can't put the graphics into a group to manipulate them further, and similar cross-layer issues, but at least they look correct.