An exciting new feature in the Edge rendering engine (EdgeHTML 17) available in the Spring 2018 (1803) update of Windows 10 are the native inking extensions added to the
<canvas>
control. These extensions include support for the methods and properties of the InkCanvas class documented here:
https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.inkcanvas
.
InkingPresenter
is supported since this is supported in EdgeHTML 17.17134 introduced in the Windows 1803 release. If the test is successful we'll display UI that will let us change the inking properties of the canvas control.
function runningWindows10withInkCanvasSupport() {
if (typeof Windows !== 'undefined' &&
typeof Windows.UI !== 'undefined' &&
typeof Windows.UI.Input.Inking.InkPresenter !== 'undefined')
return true;
else
return false;
}
try {
var Inking = Windows.UI.Input.Inking;
var drawingAttributes = new Inking.InkDrawingAttributes();
}
catch (e) { }
// Set initial ink stroke attributes.
Inking.InkInputProcessingMode = InkInputProcessingMode.Inking;
drawingAttributes.color = Windows.UI.Colors.black;
drawingAttributes.ignorePressure = false;
drawingAttributes.fitToCurve = true;
canvasContext.msInkPresenter.updateDefaultDrawingAttributes(drawingAttributes);
canvasContext.msInkPresenter.inputDeviceTypes =
Windows.UI.Core.CoreInputDeviceTypes.mouse |
Windows.UI.Core.CoreInputDeviceTypes.pen |
Windows.UI.Core.CoreInputDeviceTypes.touch;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.