Changed drawing functions to use transformation stack