Wacom Ink SDK for devices
Capturing raw pen stroke data using the CDL for UWP
Raw pen data can be captured when the device is in real-time drawing mode or file transfer mode,
provided that a parameter is set at service start.
This is done by setting the provideRawData parameter to true:
Task StartAsync(bool provideRawData, CancellationToken ct);
Please see also the following article: LiveMode - Get Real Time Inking
The StrokeEnded event is raised at the end of each stroke and the event arguments provide a parameter called Stroke (of type InkStroke).
The InkStroke type has a property RawData which contains the raw data associated with the stroke.
The actual container is the Points property of RawData – it is an array of data objects.
Here is a code snippet that demonstrates the usage:
private void OnStrokeEnded(object sender, StrokeEndedEventArgs e)
{
SmartPadPoint[] rawPoints = (SmartPadPoint[])e.Stroke.RawData.Points;
foreach (var rp in rawPoints)
{
Debug.WriteLine(string.Format("STROKE: [\{0:hh:mm:ss.fff} ] X:{1:0.0}, Y:{2:0.0}", rp.Timestamp, rp.X, rp.Y));
}
}