save and restore matrices and attrib state when drawing UIControllers. fixes #11