Use dynamic pad-width for arbitrary mask shapes