Implements scaleMode and align
Merge pull request #290 from yurydelendik/scaleMode

Implements scaleMode and align