InkModelerAttributes InkModelerAttributes InkModelerAttributes InkModelerAttributes InkModelerAttributes Class

Definition

Manages which types of ink modeler attributes can be processed by the the InkPresenter object.

public : sealed class InkModelerAttributes : IInkModelerAttributes
struct winrt::Windows::UI::Input::Inking::InkModelerAttributes : IInkModelerAttributes
public sealed class InkModelerAttributes : IInkModelerAttributes
Public NotInheritable Class InkModelerAttributes Implements IInkModelerAttributes
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10, version 1803 (introduced v10.0.17134.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v6)

Examples

Here, we show how increasing latency when rendering ink strokes can be used to reduce possible stroke correction artifacts due to incorrect prediction. This example reduces the default forward-looking prediction time from 15ms to 8ms.

public sealed partial class AdjustPrediction : Page
{
    public AdjustPrediction()
    {
        this.InitializeComponent();
        var inkPresenter = inkCanvas.InkPresenter;
        InkDrawingAttributes drawingAttributes =
            inkPresenter.CopyDefaultDrawingAttributes();

        InkModelingAttributes modelingAttributes = drawingAttributes.ModelingAttributes;
        modelingAttributes.PredictionTime = TimeSpan.FromMilliseconds(8);
        inkPresenter.UpdateDefaultDrawingAttributes(drawingAttributes);
    }
}

Remarks

Ink modeling refers to the process of processing and optimizing input for rendering as ink strokes. This can inlcude filtering, smoothing, prediction (to reduce perceived latency), and transformation (such as scaling for display DPI, or mapping pointer pressure to stroke width).

Properties

PredictionTime PredictionTime PredictionTime PredictionTime PredictionTime

Gets or sets the amount of time into the future used to predict the expected location of the input pointer.

ScalingFactor ScalingFactor ScalingFactor ScalingFactor ScalingFactor

Gets or sets the scale transform for the coordinate space of the ink stroke.

See Also