resize directly before redraw