public virtual void Draw(IRenderer Renderer) { if (DefaultDrawHandler != null) { DefaultDrawHandler.Draw(Renderer); } }
public void DrawShape(IRenderer Renderer, IDrawableRect ShapeToDraw) { // Substitute the Renderer'child DrawOperations with our own, // smart, coordinate translating DrawOperations // (Scroller : TranslateTransform : DrawOperations) Scroller.SourceDrawOperations = Renderer.DrawOperations; Renderer.DrawOperations = Scroller; // Draw on modified Renderer: // all coordinates are recalculated while drawing ShapeToDraw.Draw(Renderer); // restore the Renderer's child default DrawOperations Renderer.DrawOperations = Scroller.SourceDrawOperations; }