I get the idea, but to be honest, I doubt I my implementation of this functionality would be any more convenient than using any generic graphics editor with different types of brushes and stuff and, more importantly, the ability to save, restore and update the mask layer.