Added basic mask drawing code.