IMapRendererRequiredRendermodes Property |
Namespace: Telogis.GeoBase
The RenderMode values are a set of flags that specify which stages of rendering a renderer's Render method should be called. For example, before the map draws its labels, it would call all its renderers whose RequiredRendermodes property returned RenderMode.Prelabelling.
A renderer can also be called at multiple stages of the rendering process. This is achieved by using the 'or' operator (|) to specify any additional stages the renderer should be called.
return RenderMode.Prelabelling | RenderMode.Labelling;
Whenever a renderer is used in multiple stages of the rendering process, it is possible to find out which stage the renderer is currently in using the RenderContext.Mode property that is passed in to the Render() method.
public RenderMode RequiredRendermodes { get { return RenderMode.PreLabelling | RenderMode.Labelling | RenderMode.PostLabelling; } }
public RenderMode RequiredRendermodes { get { return RenderMode.Labelling; } } public void Render(Graphics graphics, RenderContext rc) { if (rc.Mode != RenderMode.Labelling) { Debug.Assert(false); } // Do some stuff }