curve : enlarge mask buffer to prevent crashs
curve : fill border gaps if sharp edges