forked from: PaintSample

see http://gihyo.jp/design/feature/01/frocessing/0003