Move _setGlobalProps(...) up.

The _setGlobalProps(...) should be called before ctx.drawImage(...) to set the global properties correctly.