CanvasCompositionCreateDrawingSession Method (CompositionDrawingSurface, Rect, Single) |
Namespace: Microsoft.Graphics.Canvas.UI.Composition
public static CanvasDrawingSession CreateDrawingSession( CompositionDrawingSurface drawingSurface, Rect updateRectInPixels, float dpi )
This API is only available when running on Windows 10 build 10586 (released November 2015) or greater.
The drawing session will use the specified DPI. If this is any value other than the default 96, DIPs and pixels will not be the same, so drawing will be scaled up or down accordingly. Note that this DPI setting only affects the scale of drawing performed by the returned drawing session. Other composition APIs, including the updateRectInPixels parameter to this method, always operate in pixel units.
For more information, see DPI and DIPs.