Stroke オブジェクトを Point の入力値の配列から作成します。
名前空間 : Microsoft.Ink
アセンブリ : Microsoft.Ink (Microsoft.Ink.dll 内)
構文
'宣言
Public Function CreateStroke ( _
points As Point() _
) As Stroke
'使用
Dim instance As Ink
Dim points As Point()
Dim returnValue As Stroke
returnValue = instance.CreateStroke(points)
public Stroke CreateStroke(
Point[] points
)
public:
Stroke^ CreateStroke(
array<Point>^ points
)
public Stroke CreateStroke(
Point[] points
)
public function CreateStroke(
points : Point[]
) : Stroke
パラメータ
- points
型 : array<System.Drawing.Point[]
Stroke オブジェクトを構成するポイントの配列。
戻り値
型 : Microsoft.Ink.Stroke
新しく作成されたストローク。
新しく作成された Stroke オブジェクト。
解説
ポイント配列内のポイントの最小値と最大値は、それぞれ System.Int32.MinValue フィールドと System.Int32.MaxValue フィールドです。ただし、これらのポイントは、最大幅または最大の高さが System.Int32.MaxValue を超えることのできないインク空間の四角形を定義します。このため、x 座標の最小値と最大値または y 座標の最小値と最大値の差異が System.Int32.MaxValue を超えることはできません。
例
この例では、Ink オブジェクト内に Stroke オブジェクトが作成されます。ストロークは、インク領域の左上隅から右下隅に引かれます。
' get the bottom right point of the client area for ink
' Note: InkOverlay.AttachedControl property must be set
Dim bottomRight As Point = New Point(mInkOverlay.AttachedControl.ClientSize)
' convert to HIMETRIC units
Using g As Graphics = mInkOverlay.AttachedControl.CreateGraphics()
mInkOverlay.Renderer.PixelToInkSpace(g, bottomRight)
End Using
' create the stroke
Dim strokePoints As Point() = New Point(1) {New Point(0), bottomRight}
mInkOverlay.Ink.CreateStroke(strokePoints)
mInkOverlay.AttachedControl.Invalidate()
// get the bottom right point of the client area for ink
// Note: InkOverlay.AttachedControl property must be set
Point bottomRight = new Point(mInkOverlay.AttachedControl.ClientSize);
// convert to HIMETRIC units
using (Graphics g = mInkOverlay.AttachedControl.CreateGraphics())
{
mInkOverlay.Renderer.PixelToInkSpace(g, ref bottomRight);
}
// create the stroke
Point[] strokePoints = new Point[2] { new Point(0), bottomRight };
mInkOverlay.Ink.CreateStroke(strokePoints);
mInkOverlay.AttachedControl.Invalidate();
プラットフォーム
Windows Vista
.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。
バージョン情報
.NET Framework
サポート対象 : 3.0
参照
参照
TabletPropertyDescriptionCollection.InkToDeviceScaleX