Adds support for programmatically setting scale.