processing code for hatching