MSDN Wiki Post

6/10/2006 6:28:31 PM

MSDN Wiki Post

I have complained about MSDN documentation before. It seems as an answer to my prayers have been released. MSDN Wiki Beta was launch

I posted my first wiki content on Graphics.Save/BeginContainer in the MSDN documentation site, a problem I noted in an earlier blog post.

The documentation does not differentiate between calls to BeginContainer/EndContainer and calls to Graphics.Save and GraphicsRestore. In addition, there are a few errors in the documentation. [e.g., GraphicsState is incorrectly asserted to be used by BeginContainer]

In my use, BeginContainer/EndContainer appears to save and restore the current transform. It does not actually save the clipping region as the documentation asserts, and it may not save any of the other properties in the graphics objects.

With Save/Restore, I was actually able to save/restore the clipping region, current transform, and other settings. It appears to be, if not complete, more "complete" than the container functions. Therefore, I suspect a performance/completeness tradeoff with the two different methods.

I also doubt whether the documentation is correct in stating that GraphicsState objects (used by Save) are stored in the stack as are GraphicsContainer objects (used by BeginContainer). I suspect that GraphicsState may not even be placed on a stack, but I have not tested this hypothesis.

Comments

 

Navigation

Categories

About

Net Undocumented is a blog about the internals of .NET including Xamarin implementations. Other topics include managed and web languages (C#, C++, Javascript), computer science theory, software engineering and software entrepreneurship.

Social Media