only draw the rectangles that are on the screen