Hacker News new | ask | show | jobs
by User8712 4483 days ago
Couldn't you do something like this for a hack?

http://i.imgur.com/G5U43ZU.png

Calculate the edge points of the circle, draw a line between them, and then your shadow is simply a rectangle. Overlay the circle over the shadow to hide the line.

This will work with circles and ovals, but not more complex curves.

1 comments

That's not a hack, that's actually the best way to do it. And it can work with more complex shapes (even non-convex ones) as long as you can find the tangent points - which isn't always easy.