Take Item#matrix into account when drawing gradients.

Closes #267.