CanvasDrawingSessionDrawInk Method (IEnumerableInkStroke) |
Namespace: Microsoft.Graphics.Canvas
public void DrawInk( IEnumerable<InkStroke> inkStrokes )
This overload reads the high-contrast accessiblity option from the system environment.
To draw ink from a collection of saved strokes saved to a stream, use the collection's GetStrokes method. For example:
await inkManager.LoadAsync(inputStream); using (CanvasDrawingSession ds = canvasRenderTarget.CreateDrawingSession()) { ds.DrawInk(inkManager.GetStrokes()); }
To draw ink from an InkCanvas using custom drying, use BeginDry from the InkSynchronizer object. For example:
InkSynchronizer inkSynchronizer = inkCanvas.InkPresenter.ActivateCustomDrying(); using (CanvasDrawingSession ds = canvasRenderTarget.CreateDrawingSession()) { var strokes = inkSynchronizer.BeginDry(); ds.DrawInk(strokes); inkSynchronizer.EndDry(); }