Sprite: Adds margin functionality with setting

Addresses #1446.