Optimize the drawshape