No need to check for impossible situation.
Rewrote if-statements which fixed a graphic glitch but introduced another.
Easier to read.
Added missing semi-colon.
Fixed bug which caused bottommost line to not draw shadow.
A more gradual fade.
Back to working with the bottommost line glitch.
Managed to fix the bottommost line shadow bug.
An even less gradual, more blocky looking, shadow fade.