Strokes.Rotate 方法

围绕中心点旋转 Strokes 集合。

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

语法

声明
Public Sub Rotate ( _
    degrees As Single, _
    point As Point _
)
用法
Dim instance As Strokes
Dim degrees As Single
Dim point As Point

instance.Rotate(degrees, point)
public void Rotate(
    float degrees,
    Point point
)
public:
void Rotate(
    float degrees, 
    Point point
)
public void Rotate(
    float degrees,
    Point point
)
public function Rotate(
    degrees : float, 
    point : Point
)

参数

示例

在此示例中,InkOverlay 对象的 Strokes 集合顺时针旋转 60 度。旋转围绕 Strokes 集合边界框的中心进行。

' Access to the Strokes property returns a copy of the Strokes object.
' This copy must be implicitly (via using statement) or explicitly
' disposed of in order to avoid a memory leak.
Using allStrokes As Strokes = mInkOverlay.Ink.Strokes
    Dim bounds As Rectangle = allStrokes.GetBoundingBox()
    ' create a point at the center of bounding box
    Dim center As Point = New Point(bounds.Left + (bounds.Width / 2), bounds.Top + (bounds.Height / 2))
    allStrokes.Rotate(60.0F, center)
End Using
// Access to the Strokes property returns a copy of the Strokes object.
// This copy must be implicitly (via using statement) or explicitly
// disposed of in order to avoid a memory leak.
using (Strokes allStrokes = mInkOverlay.Ink.Strokes)
{
    Rectangle bounds = allStrokes.GetBoundingBox();
    // create a point at the center of bounding box
    Point center = new Point(bounds.Left+(bounds.Width/2), bounds.Top+(bounds.Height/2));
    allStrokes.Rotate(60.0f, center);
}

平台

Windows Vista

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

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

Strokes 类

Strokes 成员

Microsoft.Ink 命名空间

Strokes.Transform

Stroke.Rotate