private void OnDraw(CanvasControl sender, CanvasDrawEventArgs args) { if (_graphics == null) { _graphics = new NativeGraphics(); _graphics.destination = new AsyncGraphics(args.DrawingSession); _graphics.resetClip(); } else { ((AsyncGraphics)_graphics.destination).getInternal().setGraphics(args.DrawingSession); } if (renderingOperations.Count > 0) { foreach (AsyncOp o in renderingOperations) { //Debug.WriteLine("OnDraw - execute " + o); o.executeWithClip(((AsyncGraphics)_graphics.destination).getInternal()); } } args.DrawingSession.Dispose(); renderingOperations.Clear(); }
private void OnDraw(CanvasControl sender, CanvasDrawEventArgs args) { if (_graphics == null) { _graphics = new NativeGraphics(); _graphics.destination = new AsyncGraphics(args.DrawingSession); _graphics.resetClip(); } else { ((AsyncGraphics)_graphics.destination).getInternal().setGraphics(args.DrawingSession); } if (renderingOperations.Count > 0) { foreach (AsyncOp o in renderingOperations) { //Debug.WriteLine("OnDraw - execute " + o); o.executeWithClip(((AsyncGraphics)_graphics.destination).getInternal()); } } args.DrawingSession.Dispose(); renderingOperations.Clear(); }