validate coordinates for single-pixel writes

in the long run, we need to check our painting directives since this is quite expensive