rect and lines drawing update