共用方式為


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