Sped up graphic drawing

only draw and erase segments that need to be on each redraw