doDrawRect

Add function-doDrawRect, avoid redundant code lines