Sprite: Adds margin functionality with setting.
Fixes #1446.
Merge pull request #1451 from am11/master

Sprite: Adds margin functionality with setting