Drop shadows with lifted corners

Posted on August 6, 2017

There is an old question on TeX.SE asking how to draw drop shadows with a lifted corner. For fun, I decided to translate the code to Metapost and release it as a module: t-backgrounds. I hope to add a few other backgrounds to the module in the near future.

The module provides two overlays liftedshadow:big and liftedshadow:medium. These may be used like any other overlay. Let’s see an example:

Simple example

which is achieved using:










Apart from these two overlays, there are very little configuration options. The module provides a MPgraphic backgrounds::liftedshadow, which accepts two options: shadowcolor and shadow.

Here is an example that shows how to change the shadow color and shadow size:

    [\useMPgraphic{backgrounds::liftedshadow}{shadowcolor=blue, shadow={(4mm, 6mm, 0.3mm)}}]

using which gives

Changing shadow color and size

Note that, the backgrounds::liftedshadow graphic just draws the shadow. It does not fill the overlay box with background color. So, while using the background, we must specify:


The options background={liftedshadow:big, color} means that the liftedshadow:big overlay is drawn first and then the color overlay is drawn. The color overlay fills the frame with backgroundcolor. If you wish, you can replace the color overlay with another overlay that does a fancier fill (say shading or hatching).

This entry was posted in Visualization and tagged metapost, backgrounds, shadows.