public virtual void RenderLayers(Graphics graphics, Rectangle renderRectangle, Paging paging) { //Render the elements if the renderer isnt locked if (!_locked) { foreach (Layer layer in Layers) { if (layer.Visible) { _worldOpacity = layer.Opacity; _currentLayer = layer; LayerRenderEventArgs e2 = new LayerRenderEventArgs(graphics, renderRectangle, layer); OnLayerPreRender(e2); if (!e2.Cancel) { RenderLayer(graphics, layer, _elementRenderList, renderRectangle); OnLayerPostRender(e2); } } } //Reset current layer _currentLayer = null; } }
//Raises the PostRender event protected virtual void OnLayerPostRender(LayerRenderEventArgs e) { if (LayerPostRender != null) { LayerPostRender(this, e); } }