Fix Drawing problem in RawDrawFunc, there was a case where the routine
could be exited from without resetting the graphics context correctly.
Also did some general cleanup.
r=kedl
git-svn-id: svn://10.0.0.236/trunk@57828 18797224-902f-48f8-a5cc-f745e15eee43