def set_hatch(self, hatch):
hatches = {'<STR_LIT>':<NUM_LIT:0>, '<STR_LIT>':<NUM_LIT:0>, '<STR_LIT>':<NUM_LIT:0>, '<STR_LIT>':<NUM_LIT:0>}<EOL>for letter in hatch:<EOL><INDENT>if   (letter == '<STR_LIT:/>'):    hatches['<STR_LIT>'] += <NUM_LIT:1><EOL>elif (letter == '<STR_LIT:\\>'):   hatches['<STR_LIT>'] += <NUM_LIT:1><EOL>elif (letter == '<STR_LIT:|>'):    hatches['<STR_LIT>']  += <NUM_LIT:1><EOL>elif (letter == '<STR_LIT:->'):    hatches['<STR_LIT>'] += <NUM_LIT:1><EOL>elif (letter == '<STR_LIT:+>'):<EOL><INDENT>hatches['<STR_LIT>'] += <NUM_LIT:1><EOL>hatches['<STR_LIT>'] += <NUM_LIT:1><EOL><DEDENT>elif (letter.lower() == '<STR_LIT:x>'):<EOL><INDENT>hatches['<STR_LIT>'] += <NUM_LIT:1><EOL>hatches['<STR_LIT>'] += <NUM_LIT:1><EOL><DEDENT><DEDENT>def do_hatch(angle, density):<EOL><INDENT>if (density == <NUM_LIT:0>): return "<STR_LIT>"<EOL>return
hatch can be one of:
    /   - diagonal hatching
    \   - back diagonal
    |   - vertical
    -   - horizontal
    +   - crossed
    X   - crossed diagonal

letters can be combined, in which case all the specified
hatchings are done

if same letter repeats, it increases the density of hatching
in that direction