drawbot
drawbot copied to clipboard
drop shadow is applied to stroke through fill
When applying a drop shadow to a stroked shape, it is visible in the supposedly-filled area:
strokeWidth(100)
stroke(1, 0, 0)
fill(0, 1, 0)
offset = (50, -50)
shadow(offset, 50, (0, 0, 1))
rect(200, 200, 600, 600)
saveImage('shady.png')

fill and stroke are two drawing instructions :) each of them have shadow properties switch one of them off to remove the shadow for the stroke
I thought the shade belongs to the rect? Can you illustrate what you mean by “switch one of them off”? Thanks!
a different shadow for fill and stroke
sw = 100
with savedState():
fill(0, 1, 0)
offset = (50, -50)
shadow(offset, 50, (0, 0, 1))
rect(200-sw*.5, 200-sw*.5, 600+sw, 600+sw)
with savedState():
strokeWidth(sw)
stroke(1, 0, 0)
fill(None)
offset = (-50, 50)
shadow(offset, 50, (1, 0, 1))
rect(200, 200, 600, 600)
can this be closed?
Not sure. Is this really the intended behavior?