タブレットがこのプロパティに報告する最大値 (論理単位) を指定します。
名前空間 : Microsoft.Ink
アセンブリ : Microsoft.Ink (Microsoft.Ink.dll 内)
構文
'宣言
Public Maximum As Integer
'使用
Dim instance As TabletPropertyMetrics
Dim value As Integer
value = instance.Maximum
instance.Maximum = value
public int Maximum
public:
int Maximum
public int Maximum
public var Maximum : int
フィールド値
型 : System.Int32
タブレットがこのプロパティに報告する最大値。
解説
たとえば、0 ~ 9000 の x 値を報告するタブレットの論理的な最大値は 9000 です。
例
この例では、InkOverlay オブジェクトで選択された各 Stroke オブジェクトは、ストロークの後半部分の各ポイントが許可される最大の NormalPressure パケット値を含むように変更されます。
GetPacketValuesByProperty メソッドを使用して、Stroke オブジェクトの後半部分の NormalPressure パケット値が取得されます。次に、この値は (GetPacketDescriptionPropertyMetrics メソッドによって取得された) 許可される最大値に設定され、SetPacketValuesByProperty メソッドを使用してストロークに再適用されます。
Try
For Each S As Stroke In mInkOverlay.Selection
' get the PacketProperty.NormalPressure metrics for the stroke
Dim metrics As TabletPropertyMetrics = S.GetPacketDescriptionPropertyMetrics(PacketProperty.NormalPressure)
' get the starting point
Dim startPt As Integer = S.PacketCount / 2
' get the NormalPressure values starting at startPt
Dim npValues() As Integer = S.GetPacketValuesByProperty(PacketProperty.NormalPressure, startPt)
' set the NormalPressure values to max
For k As Integer = 0 To npValues.Length - 1
npValues(k) = metrics.Maximum
Next
' set the NormalPressure values starting at startPt
S.SetPacketValuesByProperty(PacketProperty.NormalPressure, startPt, npValues)
Next
Catch ex As ArgumentException
' This exception will be raised if PacketProperty.NormalPressure is not supported
' This will be the case if creating strokes with a mouse
End Try
try
{
foreach (Stroke S in mInkOverlay.Selection)
{
// get the PacketProperty.NormalPressure metrics for the stroke
TabletPropertyMetrics metrics = S.GetPacketDescriptionPropertyMetrics(PacketProperty.NormalPressure);
// get the starting point
int startPt = S.PacketCount / 2;
// get the NormalPressure values starting at startPt
int[] npValues = S.GetPacketValuesByProperty(PacketProperty.NormalPressure, startPt);
// set the NormalPressure values to max
for (int k = 0; k < npValues.Length; k++)
{
npValues[k] = metrics.Maximum;
}
// set the NormalPressure values starting at startPt
S.SetPacketValuesByProperty(PacketProperty.NormalPressure, startPt, npValues);
}
}
catch (ArgumentException)
{
// This exception will be raised if PacketProperty.NormalPressure is not supported
// This will be the case if creating strokes with a mouse
}
プラットフォーム
Windows Vista
.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。
バージョン情報
.NET Framework
サポート対象 : 3.0