Class IViewManager provides methods Add/Drop ViewDecoration and ElementDecorator.
IViewManager
Add/Drop
ViewDecoration
ElementDecorator
Both types of decorator must inherit from IViewDecoration, which has a single method to be overridden: _DrawDecoration (IndexedViewportR);
IViewDecoration
_DrawDecoration (IndexedViewportR);
What is the difference between a view decoration and an element decorator? If we want to create an element decorator, what should we do in method _DrawDecoration (since it gives us a Viewport but not an element)?
_DrawDecoration
Viewport
The ElementDecorator inherits the render mode, lighting, and other view flags just as persistent elements do. If the view is 3d, you can draw 3d geometry in your decorator that will intermix with the persistent geometry according to z value. This type of decoration doesn't get used much internally as "dynamics" or IViewTransients are often more appropriate.
The ViewDecoration is called after switching into "overlay" mode. Overlay mode is effectively smooth shading with default lighting. Here z wrting/testing is disabled, so it's suitable for drawing 2d geometry that you want to appear on top of the persistent geometry.
HTH
-B
Answer Verified By: Jon Summers