Added drawing for rects and lines.