PeachDrawing.Win2D.Win2dCanvas
Win2dCanvas.FromSession(Win2dRenderContext, CanvasDrawingSession, Rect, Win2dLinkOptions) Method
Makes a canvas that draws into a drawing session the caller already has: the one a CanvasControl hands its Draw handler, a
render target’s, a swap chain’s.
public static PeachDrawing.Win2D.Win2dCanvas FromSession(PeachDrawing.Win2D.Win2dRenderContext context, Microsoft.Graphics.Canvas.CanvasDrawingSession session, PeachDrawing.Core.Rect bounds, PeachDrawing.Win2D.Win2dLinkOptions? linkOptions=null);
Parameters
context Win2dRenderContext
where fonts and images come from; its PixelsPerPoint sets the canvas’s
session Microsoft.Graphics.Canvas.CanvasDrawingSession
the session to draw into. It is borrowed: this canvas never closes or disposes it, and puts back the transform, blend and anti-aliasing it found when it is disposed
bounds Rect
the area being drawn, in layout units (the initial clip bound that culling reads)
linkOptions Win2dLinkOptions
which links Links may open, or null for the defaults
Returns
Win2dCanvas
the canvas; dispose it when the drawing is done