用paint来绘制segment