Adding polygon drawing code.