Shape util for npm / canvas