John Lam over at IUnknown talks about some various techniques for unit testing UI components.
Instead of writing a custom wrapper for the .NET graphics object, one could take advantage of the fact that the Graphics object is MarshalByRef and use Ingo's trick to define a custom remoting proxy. It might then be possible to intercept and log all calls to the underlying Graphics object without requiring the calling code to be compiled against a specific surrogate of the Graphics class.
I don't really have the bandwidth to try it, but it seems like it should work in theory...
