In computer graphics, a drop shadow is a visual effect consisting of drawing that looks like the shadow of an object, giving the impression that the object is raised above the objects behind it. The drop shadow is often used for elements of a graphical user interface such as windows or menus, and for simple text. The text label for icons on desktops in many desktop environments has a drop shadow, as this effect effectively distinguishes the text from any colored background it may be in front of.
A simple way of drawing a drop shadow of a rectangular object is to draw a gray or black area underneath and offset from the object. In general, a drop shadow is a copy in black or gray of the object, drawn in a slightly different position. Realism may be increased by:
- Darkening the colors of the pixels where the shadow casts instead of making them gray. This can be done with alpha blending the shadow with the area it is cast on.
- Softening the edges of the shadow. This can be done by adding Gaussian blur to the shadow's alpha channel before blending.
Famous quotes containing the words drop and/or shadow:
“Do they merit vitriol, even a drop of it? Yes, because they corrupt the young, persuading them that the mature world, which produced Beethoven and Schweitzer, sets an even higher value on the transient anodynes of youth than does youth itself.... They are the Hollow Men. They are electronic lice.”
—Anthony Burgess (b. 1917)
“I have a little shadow that goes in and out with me,
And what can be the use of him is more than I can see.
He is very, very like me from the heels up to the head;
And I see him jump before me, when I jump into my bed.”
—Robert Louis Stevenson (18501894)