consistent with projection painting. Also did some refactoring of this code, moving the brush image creation code out of brush.c and making it consistent with image updating code.