removed unused setting
Moved transform calculations out of draw().