Fixes #543

Updated graphics cacheAsBitmap to use getLocalBounds
Tweaks to getLocalBounds
Tweaks to getBounds
removed unnecessary variable declaration in updateTransform