Add functions for drawing line and polygon