Stroke.GetPoints 方法 (Int32, Int32)

返回在指定范围内构成 Stroke 对象的 Point 结构。

命名空间:  Microsoft.Ink
程序集:  Microsoft.Ink(在 Microsoft.Ink.dll 中)

语法

声明
Public Function GetPoints ( _
    index As Integer, _
    count As Integer _
) As Point()
用法
Dim instance As Stroke
Dim index As Integer
Dim count As Integer
Dim returnValue As Point()

returnValue = instance.GetPoints(index, _
    count)
public Point[] GetPoints(
    int index,
    int count
)
public:
array<Point>^ GetPoints(
    int index, 
    int count
)
public Point[] GetPoints(
    int index,
    int count
)
public function GetPoints(
    index : int, 
    count : int
) : Point[]

参数

返回值

类型:array<System.Drawing.Point[]
返回构成 Stroke 对象的 Point 结构的数组。

示例

在此示例中,检查 InkOverlay 的所有选定 Stroke 对象。如果 Stroke 对象至少包含 90 个数据包,则获取 Stroke 对象的 50 个 Point 对象(从位置 39 处的 Point 对象开始),并使用这些点对象创建一个新的 Stroke 对象。然后,将新建的 Stroke 对象沿 XY 方向移动 200 HIMETRIC 单位。

For Each S As Stroke In mInkOverlay.Selection
    If S.PacketCount >= 90 Then
        Dim sPts() As Point = S.GetPoints(39, 50)
        Dim newStroke As Stroke = S.Ink.CreateStroke(sPts)
        newStroke.Move(200, 200)
    End If
Next
foreach (Stroke S in mInkOverlay.Selection)
{
    if (S.PacketCount >= 90)
    {
        Point[] sPts = S.GetPoints(39, 50);
        Stroke newStroke = S.Ink.CreateStroke(sPts);
        newStroke.Move(200, 200);
    }
}

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

Stroke 类

Stroke 成员

GetPoints 重载

Microsoft.Ink 命名空间

Stroke.GetPoint