output drawing code