InkModelerAttributes クラス

定義

InkPresenter オブジェクトで処理できるインク モデラー属性の種類を管理します。

public ref class InkModelerAttributes sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 393216)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class InkModelerAttributes final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 393216)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class InkModelerAttributes
Public NotInheritable Class InkModelerAttributes
継承
Object Platform::Object IInspectable InkModelerAttributes
属性

Windows の要件

デバイス ファミリ
Windows 10, version 1803 (10.0.17134.0 で導入)
API contract
Windows.Foundation.UniversalApiContract (v6.0 で導入)

ここでは、インク ストロークをレンダリングするときの待機時間の増加を使用して、誤った予測によるストローク修正アーティファクトの可能性を減らす方法を示します。 次の使用例は、既定の将来予測時間を 15 ミリ秒から 8 ミリ秒に短縮します。

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);
    }
}

注釈

インク モデリングとは、インク ストロークとしてレンダリングするために入力を処理および最適化するプロセスを指します。 これにより、フィルター処理、スムージング、予測 (認識される待機時間を短縮するため)、変換 (ディスプレイ DPI のスケーリング、ストローク幅へのポインターの圧力のマッピングなど) が含まれる可能性があります。

InkToolbar を使用する場合、InkModelerAttributesInkToolbar.ActiveToolChanged イベントで設定する必要があります。これは、アクティブなツールが変更されるたびに属性が上書きされるためです。

バージョン履歴

Windows のバージョン SDK バージョン 追加された値
2004 19041 UseVelocityBasedPressure

プロパティ

PredictionTime

入力ポインターの予想される位置を予測するために使用される将来の時間を取得または設定します。

ScalingFactor

インク ストロークの座標空間のスケール変換を取得または設定します。

UseVelocityBasedPressure

ペン速度をインクサーフェスの圧力と組み合わせて使用して最終的な圧力値を計算するかどうかを取得または設定します。

適用対象

こちらもご覧ください